[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F1REJS3RMK05CSM4FD6SP5":3,"skill-same:01M7F1REJS3RMK05CSM4FD6SP5":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7F1REJS3RMK05CSM4FD6SP5","mcp-chaining",null,"Research-to-implement pipeline chaining 5 MCP tools with graceful degradation","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-chaining\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: mcp-chaining\ndescription: Research-to-implement pipeline chaining 5 MCP tools with graceful degradation\nallowed-tools: [Bash, Read]\nuser-invocable: false\n---\n\n# MCP Chaining Pipeline\n\nA research-to-implement pipeline that chains 5 MCP tools for end-to-end workflows.\n\n## When to Use\n\n- Building multi-tool MCP pipelines\n- Understanding how to chain MCP calls with graceful degradation\n- Debugging MCP environment variable issues\n- Learning the tool naming conventions for different MCP servers\n\n## What We Built\n\nA pipeline that chains these tools:\n\n| Step | Server | Tool ID | Purpose |\n|------|--------|---------|---------|\n| 1 | nia | `nia__search` | Search library documentation |\n| 2 | ast-grep | `ast-grep__find_code` | Find AST code patterns |\n| 3 | morph | `morph__warpgrep_codebase_search` | Fast codebase search |\n| 4 | qlty | `qlty__qlty_check` | Code quality validation |\n| 5 | git | `git__git_status` | Git operations |\n\n## Key Files\n\n- `scripts\u002Fresearch_implement_pipeline.py` - Main pipeline implementation\n- `scripts\u002Ftest_research_pipeline.py` - Test harness with isolated sandbox\n- `workspace\u002Fpipeline-test\u002Fsample_code.py` - Test sample code\n\n## Usage Examples\n\n```bash\n# Dry-run pipeline (preview plan without changes)\nuv run python -m runtime.harness scripts\u002Fresearch_implement_pipeline.py \\\n    --topic \"async error handling python\" \\\n    --target-dir \".\u002Fworkspace\u002Fpipeline-test\" \\\n    --dry-run --verbose\n\n# Run tests\nuv run python -m runtime.harness scripts\u002Ftest_research_pipeline.py --test all\n\n# View the pipeline script\ncat scripts\u002Fresearch_implement_pipeline.py\n```\n\n## Critical Fix: Environment Variables\n\nThe MCP SDK's `get_default_environment()` only includes basic vars (PATH, HOME, etc.), NOT `os.environ`. We fixed `src\u002Fruntime\u002Fmcp_client.py` to pass full environment:\n\n```python\n# In _connect_stdio method:\nfull_env = {**os.environ, **(resolved_env or {})}\n```\n\nThis ensures API keys from `~\u002F.claude\u002F.env` reach subprocesses.\n\n## Graceful Degradation Pattern\n\nEach tool is optional. If unavailable (disabled, no API key, etc.), the pipeline continues:\n\n```python\nasync def check_tool_available(tool_id: str) -> bool:\n    \"\"\"Check if an MCP tool is available.\"\"\"\n    server_name = tool_id.split(\"__\")[0]\n    server_config = manager._config.get_server(server_name)\n    if not server_config or server_config.disabled:\n        return False\n    return True\n\n# In step function:\nif not await check_tool_available(\"nia__search\"):\n    return StepResult(status=StepStatus.SKIPPED, message=\"Nia not available\")\n```\n\n## Tool Name Reference\n\n### nia (Documentation Search)\n```\nnia__search              - Universal documentation search\nnia__nia_research        - Research with sources\nnia__nia_grep            - Grep-style doc search\nnia__nia_explore         - Explore package structure\n```\n\n### ast-grep (Structural Code Search)\n```\nast-grep__find_code      - Find code by AST pattern\nast-grep__find_code_by_rule - Find by YAML rule\nast-grep__scan_code      - Scan with multiple patterns\n```\n\n### morph (Fast Text Search + Edit)\n```\nmorph__warpgrep_codebase_search  - 20x faster grep\nmorph__edit_file                 - Smart file editing\n```\n\n### qlty (Code Quality)\n```\nqlty__qlty_check         - Run quality checks\nqlty__qlty_fmt           - Auto-format code\nqlty__qlty_metrics       - Get code metrics\nqlty__smells             - Detect code smells\n```\n\n### git (Version Control)\n```\ngit__git_status          - Get repo status\ngit__git_diff            - Show differences\ngit__git_log             - View commit history\ngit__git_add             - Stage files\n```\n\n## Pipeline Architecture\n\n```\n                    +----------------+\n                    |   CLI Args     |\n                    | (topic, dir)   |\n                    +-------+--------+\n                            |\n                    +-------v--------+\n                    | PipelineContext|\n                    | (shared state) |\n                    +-------+--------+\n                            |\n    +-------+-------+-------+-------+-------+\n    |       |       |       |       |       |\n+---v---+---v---+---v---+---v---+---v---+\n| nia   |ast-grp| morph | qlty  | git   |\n|search |pattern|search |check  |status |\n+---+---+---+---+---+---+---+---+---+---+\n    |       |       |       |       |\n    +-------v-------v-------v-------+\n                    |\n            +-------v--------+\n            | StepResult[]   |\n            | (aggregated)   |\n            +----------------+\n```\n\n## Error Handling\n\nThe pipeline captures errors without failing the entire run:\n\n```python\ntry:\n    result = await call_mcp_tool(\"nia__search\", {\"query\": topic})\n    return StepResult(status=StepStatus.SUCCESS, data=result)\nexcept Exception as e:\n    ctx.errors.append(f\"nia: {e}\")\n    return StepResult(status=StepStatus.FAILED, error=str(e))\n```\n\n## Creating Your Own Pipeline\n\n1. Copy the pattern from `scripts\u002Fresearch_implement_pipeline.py`\n2. Define your steps as async functions\n3. Use `check_tool_available()` for graceful degradation\n4. Chain results through `PipelineContext`\n5. Aggregate with `print_summary()`\n","# MCP Chaining Pipeline\n\nA research-to-implement pipeline that chains 5 MCP tools for end-to-end workflows.\n\n## When to Use\n\n- Building multi-tool MCP pipelines\n- Understanding how to chain MCP calls with graceful degradation\n- Debugging MCP environment variable issues\n- Learning the tool naming conventions for different MCP servers\n\n## What We Built\n\nA pipeline that chains these tools:\n\n| Step | Server | Tool ID | Purpose |\n|------|--------|---------|---------|\n| 1 | nia | `nia__search` | Search library documentation |\n| 2 | ast-grep | `ast-grep__find_code` | Find AST code patterns |\n| 3 | morph | `morph__warpgrep_codebase_search` | Fast codebase search |\n| 4 | qlty | `qlty__qlty_check` | Code quality validation |\n| 5 | git | `git__git_status` | Git operations |\n\n## Key Files\n\n- `scripts\u002Fresearch_implement_pipeline.py` - Main pipeline implementation\n- `scripts\u002Ftest_research_pipeline.py` - Test harness with isolated sandbox\n- `workspace\u002Fpipeline-test\u002Fsample_code.py` - Test sample code\n\n## Usage Examples\n\n```bash\n# Dry-run pipeline (preview plan without changes)\nuv run python -m runtime.harness scripts\u002Fresearch_implement_pipeline.py \\\n    --topic \"async error handling python\" \\\n    --target-dir \".\u002Fworkspace\u002Fpipeline-test\" \\\n    --dry-run --verbose\n\n# Run tests\nuv run python -m runtime.harness scripts\u002Ftest_research_pipeline.py --test all\n\n# View the pipeline script\ncat scripts\u002Fresearch_implement_pipeline.py\n```\n\n## Critical Fix: Environment Variables\n\nThe MCP SDK's `get_default_environment()` only includes basic vars (PATH, HOME, etc.), NOT `os.environ`. We fixed `src\u002Fruntime\u002Fmcp_client.py` to pass full environment:\n\n```python\n# In _connect_stdio method:\nfull_env = {**os.environ, **(resolved_env or {})}\n```\n\nThis ensures API keys from `~\u002F.claude\u002F.env` reach subprocesses.\n\n## Graceful Degradation Pattern\n\nEach tool is optional. If unavailable (disabled, no API key, etc.), the pipeline continues:\n\n```python\nasync def check_tool_available(tool_id: str) -> bool:\n    \"\"\"Check if an MCP tool is available.\"\"\"\n    server_name = tool_id.split(\"__\")[0]\n    server_config = manager._config.get_server(server_name)\n    if not server_config or server_config.disabled:\n        return False\n    return True\n\n# In step function:\nif not await check_tool_available(\"nia__search\"):\n    return StepResult(status=StepStatus.SKIPPED, message=\"Nia not available\")\n```\n\n## Tool Name Reference\n\n### nia (Documentation Search)\n```\nnia__search              - Universal documentation search\nnia__nia_research        - Research with sources\nnia__nia_grep            - Grep-style doc search\nnia__nia_explore         - Explore package structure\n```\n\n### ast-grep (Structural Code Search)\n```\nast-grep__find_code      - Find code by AST pattern\nast-grep__find_code_by_rule - Find by YAML rule\nast-grep__scan_code      - Scan with multiple patterns\n```\n\n### morph (Fast Text Search + Edit)\n```\nmorph__warpgrep_codebase_search  - 20x faster grep\nmorph__edit_file                 - Smart file editing\n```\n\n### qlty (Code Quality)\n```\nqlty__qlty_check         - Run quality checks\nqlty__qlty_fmt           - Auto-format code\nqlty__qlty_metrics       - Get code metrics\nqlty__smells             - Detect code smells\n```\n\n### git (Version Control)\n```\ngit__git_status          - Get repo status\ngit__git_diff            - Show differences\ngit__git_log             - View commit history\ngit__git_add             - Stage files\n```\n\n## Pipeline Architecture\n\n```\n                    +----------------+\n                    |   CLI Args     |\n                    | (topic, dir)   |\n                    +-------+--------+\n                            |\n                    +-------v--------+\n                    | PipelineContext|\n                    | (shared state) |\n                    +-------+--------+\n                            |\n    +-------+-------+-------+-------+-------+\n    |       |       |       |       |       |\n+---v---+---v---+---v---+---v---+---v---+\n| nia   |ast-grp| morph | qlty  | git   |\n|search |pattern|search |check  |status |\n+---+---+---+---+---+---+---+---+---+---+\n    |       |       |       |       |\n    +-------v-------v-------v-------+\n                    |\n            +-------v--------+\n            | StepResult[]   |\n            | (aggregated)   |\n            +----------------+\n```\n\n## Error Handling\n\nThe pipeline captures errors without failing the entire run:\n\n```python\ntry:\n    result = await call_mcp_tool(\"nia__search\", {\"query\": topic})\n    return StepResult(status=StepStatus.SUCCESS, data=result)\nexcept Exception as e:\n    ctx.errors.append(f\"nia: {e}\")\n    return StepResult(status=StepStatus.FAILED, error=str(e))\n```\n\n## Creating Your Own Pipeline\n\n1. Copy the pattern from `scripts\u002Fresearch_implement_pipeline.py`\n2. Define your steps as async functions\n3. Use `check_tool_available()` for graceful degradation\n4. Chain results through `PipelineContext`\n5. Aggregate with `print_summary()`\n",{"name":5,"description":7,"allowed-tools":24,"user-invocable":20},[25,26],"Bash","Read","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Fmcp-chaining",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill mcp-chaining",{"tool":41,"command":42},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill mcp-chaining",{"tool":44,"command":45},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill mcp-chaining","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-chaining\u002FSKILL.md",true,[],[50,57,62,69,76,83],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":58,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]