Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

devtu-fix-tooldevtu 修复工具

Agent Skill

devtu-fix-tool 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,824

周安装

201

GitHub Stars

1,312

下载量

1,608
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:devtu-fix-tool(devtu 修复工具)
来源仓库:https://github.com/mims-harvard/tooluniverse
仓库路径:skills/devtu-fix-tool
安装命令:
npx skills add https://github.com/mims-harvard/tooluniverse --skill devtu-fix-tool
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mims-harvard/tooluniverse --skill devtu-fix-tool

简介

诊断并修复失败的 ToolUniverse 工具,定位根本原因。

  • 强调输入层验证而非输出层恢复,防止静默错误传播。
  • 提供参数合法性检查与 API 调用失败场景处理指南。
  • 支持自动 nor 突变检测,避免无效输入被忽略。
  • devtu-fix-tool 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Fix ToolUniverse Tools

Diagnose and fix failing ToolUniverse tools through systematic error identification, targeted fixes, and validation.

First Principles for Bug Fixes

Before writing any fix, ask: why does the user reach this failure state?

  1. Prevent, don't recover — fix the root cause so the failure can't happen, rather than adding hint text after it does
  2. Validate at input, not at output — wrong parameters, unknown disease names, unsupported drugs should be caught and rejected early with clear guidance, not discovered after a silent API call
  3. Don't mask silent mutations — if input is auto-normalized (fusion notation, Title Case), either accept both forms natively OR reject with explicit guidance; never silently transform and hide it
  4. Distinguish "no data" from "bad query" — zero results because the filter is wrong is different from zero results because the data doesn't exist; the response must distinguish these clearly
  5. Fix the abstraction, not the instance — if a parameter name is inconsistent, fix the interface; don't add an alias list that grows forever

Anti-patterns to avoid:

  • Adding hint text to zero-result messages instead of validating upfront
  • Adding parameter aliases instead of fixing naming consistency
  • Post-hoc probing to rescue a failed query instead of pre-validating

Bug Verification (CRITICAL)

Before implementing any bug report, verify it via CLI first:

python3 -m tooluniverse.cli run <ToolName> '<json_args>'

Many agent-reported bugs are false positives caused by MCP interface confusion. Always confirm the bug is reproducible before implementing a fix.


Instructions

When fixing a failing tool:

  1. Run targeted test to identify error:
python scripts/test_new_tools.py <tool-pattern> -v
  1. Verify API is correct - search online for official API documentation to confirm endpoints, parameters, and patterns are correct
  2. Identify error type (see Error Types section)
  3. Apply appropriate fix based on error pattern
  4. Regenerate tools if you modified JSON configs or tool classes:
python -m tooluniverse.generate_tools
  1. Check and update tool tests if they exist in tests/tools/:
ls tests/tools/test_<tool-name>_tool.py
  1. Verify fix by re-running both integration and unit tests
  2. Provide fix summary with problem, root cause, solution, and test results

Where to Fix

Issue TypeFile to Modify
Binary responsesrc/tooluniverse/*_tool.py + src/tooluniverse/data/*_tools.json
Schema mismatchsrc/tooluniverse/data/*_tools.json (return_schema)
Missing data wrappersrc/tooluniverse/*_tool.py (operation methods)
Endpoint URLsrc/tooluniverse/data/*_tools.json (endpoint field)
Invalid test examplesrc/tooluniverse/data/*_tools.json (test_examples)
Tool test updatestests/tools/test_*_tool.py (if exists)
API key as parametersrc/tooluniverse/data/*_tools.json (remove param) + *_tool.py (use env var)
Tool not loading (optional key)src/tooluniverse/data/*_tools.json (use optional_api_keys not required_api_keys)

Error Types

1. JSON Parsing Errors

Symptom: Expecting value: line 1 column 1 (char 0)

Cause: Tool expects JSON but receives binary data (images, PDFs, files)

Fix: Check Content-Type header. For binary responses, return a description string instead of parsing JSON. Update return_schema to {"type": "string"}.

2. Schema Validation Errors

Symptom: Schema Mismatch: At root:... is not of type 'object' or Data: None

Cause: Missing data field wrapper OR wrong schema type

Fix depends on the error:

  • If Data: None → Add data wrapper to ALL operation methods (see Multi-Operation Pattern below)
  • If type mismatch → Update return_schema in JSON config:

- Data is string: {"type": "string"} - Data is array: {"type": "array", "items": {...}} - Data is object: {"type": "object", "properties": {...}}

Key concept: Schema validates the data field content, NOT the full response.

3. Nullable Field Errors

Symptom: Schema Mismatch: At N->fieldName: None is not of type 'integer'

Cause: API returns None/null for optional fields

Fix: Allow nullable types in JSON config using {"type": ["<base_type>", "null"]}. Use for optional fields, not required identifiers.

4. Mutually Exclusive Parameter Errors

Symptom: Parameter validation failed for 'param_name': None is not of type 'integer' when passing a different parameter

Cause: Tool accepts EITHER paramA OR paramB (mutually exclusive), but both are defined with fixed types. When only one is provided, validation fails because the other is None.

Example:

{
  "neuron_id": {"type": "integer"},      // ❌ Fails when neuron_name is used
  "neuron_name": {"type": "string"}      // ❌ Fails when neuron_id is used
}

Fix: Make mutually exclusive parameters nullable:

{
  "neuron_id": {"type": ["integer", "null"]},      // ✅ Allows None
  "neuron_name": {"type": ["string", "null"]}      // ✅ Allows None
}

Common patterns:

  • id OR name parameters (get by ID or by name)
  • acronym OR name parameters (search by symbol or full name)
  • Optional filter parameters that may not be provided

Important: Also make truly optional parameters (like filter_field, filter_value) nullable even if not mutually exclusive.

5. Mixed Type Field Errors

Symptom: Schema Mismatch: At N->field: {object} is not of type 'string', 'null'

Cause: Field returns different structures depending on context

Fix: Use oneOf in JSON config for fields with multiple distinct schemas. Different from nullable ({"type": ["string", "null"]}) which is same base type + null.

6. Invalid Test Examples

Symptom: 404 ERROR - Not found or 400 Bad Request

Cause: Test example uses invalid/outdated IDs

Fix: Discover valid examples using the List → Get or Search → Details patterns below.

7. API Parameter Errors

Symptom: 400 Bad Request or parameter validation errors

Fix: Update parameter schema in JSON config with correct types, required fields, and enums.

8. API Key Configuration Errors

Symptom: Tool not loading when API key is optional, or api_key parameter causing confusion

Cause: Using required_api_keys for keys that should be optional, or exposing API key as tool parameter

Key differences:

  • required_api_keys: Tool is skipped if keys are missing
  • optional_api_keys: Tool loads and works without keys (with reduced performance)

Fix: Use optional_api_keys in JSON config for APIs that work anonymously but have better rate limits with keys. Read API key from environment only (os.environ.get()), never as a tool parameter.

9. API Endpoint Pattern Errors

Symptom: 404 for valid resources, or unexpected results

Fix: Verify official API docs - check if values belong in URL path vs query parameters.

10. Transient API Failures

Symptom: Tests fail intermittently with timeout/connection/5xx errors

Fix: Use pytest.skip() for transient errors in unit tests - don't fail on external API outages.

Common Fix Patterns

Schema Validation Pattern

Schema validates the data field content, not the full response. Match return_schema type to what's inside data (array, object, or string).

Multi-Operation Tool Pattern

Every internal method must return {"status": "...", "data": {...}}. Don't use alternative field names at top level.

Finding Valid Test Examples

When test examples fail with 400/404, discover valid IDs by:

  • List → Get: Call a list endpoint first, extract ID from results
  • Search → Details: Search for a known entity, use returned ID
  • Iterate Versions: Try different dataset versions if supported

Unit Test Management

Check for Unit Tests

After fixing a tool, check if unit tests exist:

ls tests/tools/test_<tool-name>_tool.py

When to Update Unit Tests

Update unit tests when you:

  1. Change return structure: Update assertions checking result["data"] structure
  2. Add/modify operations: Add test cases for new operations
  3. Change error handling: Update error assertions
  4. Modify required parameters: Update parameter validation tests
  5. Fix schema issues: Ensure tests validate correct data structure
  6. Add binary handling: Add tests for binary responses

Running Unit Tests

# Run specific tool tests
pytest tests/tools/test_<tool-name>_tool.py -v

# Run all unit tests
pytest tests/tools/ -v

Unit Test Checklist

  • Check if tests/tools/test_<tool-name>_tool.py exists
  • Run unit tests before and after fix
  • Update assertions if data structure changed
  • Ensure both direct and interface tests pass

For detailed unit test patterns and examples, see unit-tests-reference.md.

Verification

Run Integration Tests

python scripts/test_new_tools.py <pattern> -v

Run Unit Tests (if exist)

pytest tests/tools/test_<tool-name>_tool.py -v

Regenerate Tools

After modifying JSON configs or tool classes:

python -m tooluniverse.generate_tools

Regenerate after:

  • Changing src/tooluniverse/data/*_tools.json files
  • Modifying tool class implementations

Not needed for test script changes.

Output Format

After fixing, provide this summary:

Problem: [Brief description]

Root Cause: [Why it failed]

Solution: [What was changed]

Changes Made:

  • File 1: [Description]
  • File 2: [Description]
  • File 3 (if applicable): [Unit test updates]

Integration Test Results:

  • Before: X tests, Y passed (Z%), N failed, M schema invalid
  • After: X tests, X passed (100.0%), 0 failed, 0 schema invalid

Unit Test Results (if applicable):

  • Before: X tests, Y passed, Z failed
  • After: X tests, X passed, 0 failed

Testing Best Practices

Verify Parameter Names Before Testing

CRITICAL: Always read the tool's JSON config or generated wrapper to get the correct parameter names. Don't assume parameter names.

Example of incorrect testing:

# ❌ WRONG - assumed parameter name
AllenBrain_search_genes(query='Gad1')  # Fails: unexpected keyword 'query'

Correct approach:

# ✅ RIGHT - checked config first
# Config shows parameters: gene_acronym, gene_name
AllenBrain_search_genes(gene_acronym='Gad1')  # Works!

How to find correct parameter names:

  1. Read the JSON config: src/tooluniverse/data/*_tools.json
  2. Check the generated wrapper: src/tooluniverse/tools/<ToolName>.py
  3. Look at test_examples in the JSON config

Systematic Testing Approach

When testing multiple tools:

  1. Sample first: Test 1-2 tools per API to identify patterns
  2. Categorize errors: Group by error type (param validation, API errors, data structure)
  3. Fix systematically: Fix all tools with same issue type together
  4. Regenerate once: Run python -m tooluniverse.generate_tools after all JSON changes
  5. Verify all: Test all fixed tools comprehensively

Understanding Data Structure

Tools can return different data structures:

  • Object: {"data": {"id": 1, "name": "..."}} - single result
  • Array: {"data": [{"id": 1}, {"id": 2}]} - multiple results
  • String: {"data": "description text"} - text response

Test accordingly:

# For object data
result = tool()
data = result.get('data', {})
value = data.get('field_name')  # ✅

# For array data
result = tool()
items = result.get('data', [])
count = len(items)  # ✅
first = items[0] if items else {}  # ✅

Common Pitfalls

  1. Schema validates data field, not full response
  2. All methods need {"status": "...", "data": {...}} wrapper
  3. JSON config changes require regeneration
  4. Use optional_api_keys for APIs that work without keys
  5. Check official API docs for correct endpoint patterns
  6. Unit tests should skip on transient API failures, not fail
  7. Mutually exclusive parameters MUST be nullable - most common new tool issue
  8. Verify parameter names from configs - don't assume or guess
  9. Test with correct data structure expectations - list vs dict vs string

Debugging

  • Inspect API response: Check status code, Content-Type header, and body preview
  • Check tool config: Load ToolUniverse and inspect the tool's configuration
  • Add debug prints: Log URL, params, status, and Content-Type in the run method

Quick Reference

TaskCommand
Run integration testspython scripts/test_new_tools.py <pattern> -v
Run unit testspytest tests/tools/test_<tool-name>_tool.py -v
Check if unit tests existls tests/tools/test_<tool-name>_tool.py
Regenerate toolspython -m tooluniverse.generate_tools
Check status`git status --short \grep -E "(data\tools\.*_tool.py\tests/tools)"`
Error TypeFix Location
JSON parse errorsrc/tooluniverse/*_tool.py run() method
Schema mismatchsrc/tooluniverse/data/*_tools.json return_schema
404 errorssrc/tooluniverse/data/*_tools.json test_examples or endpoint
Parameter errorssrc/tooluniverse/data/*_tools.json parameter schema
Unit test failurestests/tools/test_*_tool.py assertions
Tool skipped (optional key)src/tooluniverse/data/*_tools.json use optional_api_keys
API key as parameterRemove from JSON params, use os.environ.get() in Python

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.19%
按下载量换算566

Claude

32.39%
按下载量换算521

Cursor

18.2%
按下载量换算293

Gemini CLI

9.34%
按下载量换算150

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills