[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F1PQV71Y1C55Y5ATSFT9FM":3,"skill-same:01M7F1PQV71Y1C55Y5ATSFT9FM":67},{"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":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":48},"01M7F1PQV71Y1C55Y5ATSFT9FM","workflow-patterns",null,"Choose and implement mcp-agent workflow patterns including routers, intent classifiers, parallel fan-out\u002Ffan-in, orchestrators, evaluators, swarms, and structured outputs.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fworkflow-patterns\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: workflow-patterns\ndescription: \"Choose and implement mcp-agent workflow patterns including\n  routers, intent classifiers, parallel fan-out\u002Ffan-in, orchestrators,\n  evaluators, swarms, and structured outputs.\"\ndisable-model-invocation: true\nmetadata:\n  disco-role: operating\nlicense: Apache 2.0\n---\n\n# mcp-agent Workflow Patterns\n\nUse this sub-skill when a task asks you to choose, compose, or implement an mcp-agent workflow pattern beyond basic `Agent`\u002F`AugmentedLLM` setup. It covers routers, embedding routers, intent classifiers, parallel map-reduce\u002Ffan-out\u002Ffan-in, orchestrator\u002Fdeep orchestrator flows, evaluator-optimizer loops, swarm handoffs, planner-style compositions, and structured outputs.\n\nFor basic `MCPApp`, `Agent`, server connections, and LLM setup, use the sibling `..\u002Fcore-sdk\u002FSKILL.md`. For Temporal or durable execution semantics, use `..\u002Fdurable-execution\u002FSKILL.md`. This sub-skill focuses on in-process pattern selection and code structure.\n\n## Fast Pattern Choice\n\n- Use `LLMRouter` or `create_router_llm(...)` when a request must be dispatched to the best agent, MCP server, or callable based on candidate descriptions and reasoning.\n- Use `EmbeddingRouter` or `create_router_embedding(...)` when categories are stable and semantic-similarity scoring is preferable to another LLM call.\n- Use `LLMIntentClassifier` or embedding intent classifiers when you need a fixed intent taxonomy, confidence, and optional extracted entities before routing.\n- Use `ParallelLLM` or `create_parallel_llm(...)` when independent specialists can process the same input concurrently and a fan-in step can aggregate their outputs.\n- Use `Orchestrator` or `create_orchestrator(...)` when the system must plan sequential steps and delegate tasks to workers dynamically.\n- Use `DeepOrchestrator` or `create_deep_orchestrator(...)` for long-horizon research with budgets, memory, policy-driven replanning, and knowledge extraction.\n- Use `EvaluatorOptimizerLLM` or `create_evaluator_optimizer_llm(...)` when a clear quality rubric can drive bounded refinement.\n- Use `SwarmAgent` plus `OpenAISwarm`, `AnthropicSwarm`, or `create_swarm(...)` when a conversation should hand off between agents while preserving context variables.\n\n## Implementation Checklist\n\n1. Start inside `async with app.run() as running_app:` and pass `context=running_app.context` to factory helpers so server registry, executor, secrets, tracing, and token tracking are shared.\n2. Model specialists as `AgentSpec`, `Agent`, existing `AugmentedLLM`, or deterministic callables depending on the helper. Keep agent names unique and instructions capability-specific.\n3. Prefer factory helpers from `mcp_agent.workflows.factory` for ordinary application code; drop to provider-specific classes only when you need direct constructor control.\n4. For routers, use `LLMRouter`, not `RouterLLM`. Prefer `route_to_agent`, `route_to_server`, or `route_to_function` when the destination type is known.\n5. For embedding routers\u002Fclassifiers, confirm the optional provider package and API key are configured before instantiating provider default models.\n6. For parallel workflows, make every fan-out worker independent; aggregate by source name and avoid assuming the first response is the winner.\n7. For evaluator loops, pass an explicit `QualityRating` threshold and a small `max_refinements` cap.\n8. For structured output, define Pydantic response models and call `generate_structured(..., response_model=YourModel, request_params=RequestParams(strict=True))` where the provider supports strict mode.\n9. Inspect token costs with `await workflow.get_token_node()` after nested runs when budget matters.\n10. Keep reusable code in your application, not in ad-hoc notebooks; use `scripts\u002Fpattern_skeletons.py` from this skill to print safe starting templates.\n\n## Reference Map\n\n- Pattern selection guide: `references\u002Fpattern-selection.md`\n- Current API and constructors: `references\u002Fapi-reference.md`\n- Reusable workflow skeletons: `references\u002Fworkflows.md`\n- Troubleshooting and validation: `references\u002Ftroubleshooting.md`\n- Import sanity checker: `scripts\u002Fcheck_workflow_imports.py`\n- Skeleton printer: `scripts\u002Fpattern_skeletons.py`\n\n## Safety Notes\n\n- Provider examples may require optional extras and configured API keys. Import checks should not instantiate network clients unless you explicitly opt in.\n- Parallel and orchestrator patterns multiply LLM calls. Estimate worst-case calls before enabling high `top_k`, many fan-out agents, or high refinement counts.\n- Router and intent classifier confidence should gate irreversible actions. Escalate or ask a clarifying question when top candidates are close or low-confidence.\n- Do not use workflow patterns to expose MCP servers or cloud\u002FCLI operations; use the sibling skills for those areas.\n","# mcp-agent Workflow Patterns\n\nUse this sub-skill when a task asks you to choose, compose, or implement an mcp-agent workflow pattern beyond basic `Agent`\u002F`AugmentedLLM` setup. It covers routers, embedding routers, intent classifiers, parallel map-reduce\u002Ffan-out\u002Ffan-in, orchestrator\u002Fdeep orchestrator flows, evaluator-optimizer loops, swarm handoffs, planner-style compositions, and structured outputs.\n\nFor basic `MCPApp`, `Agent`, server connections, and LLM setup, use the sibling `..\u002Fcore-sdk\u002FSKILL.md`. For Temporal or durable execution semantics, use `..\u002Fdurable-execution\u002FSKILL.md`. This sub-skill focuses on in-process pattern selection and code structure.\n\n## Fast Pattern Choice\n\n- Use `LLMRouter` or `create_router_llm(...)` when a request must be dispatched to the best agent, MCP server, or callable based on candidate descriptions and reasoning.\n- Use `EmbeddingRouter` or `create_router_embedding(...)` when categories are stable and semantic-similarity scoring is preferable to another LLM call.\n- Use `LLMIntentClassifier` or embedding intent classifiers when you need a fixed intent taxonomy, confidence, and optional extracted entities before routing.\n- Use `ParallelLLM` or `create_parallel_llm(...)` when independent specialists can process the same input concurrently and a fan-in step can aggregate their outputs.\n- Use `Orchestrator` or `create_orchestrator(...)` when the system must plan sequential steps and delegate tasks to workers dynamically.\n- Use `DeepOrchestrator` or `create_deep_orchestrator(...)` for long-horizon research with budgets, memory, policy-driven replanning, and knowledge extraction.\n- Use `EvaluatorOptimizerLLM` or `create_evaluator_optimizer_llm(...)` when a clear quality rubric can drive bounded refinement.\n- Use `SwarmAgent` plus `OpenAISwarm`, `AnthropicSwarm`, or `create_swarm(...)` when a conversation should hand off between agents while preserving context variables.\n\n## Implementation Checklist\n\n1. Start inside `async with app.run() as running_app:` and pass `context=running_app.context` to factory helpers so server registry, executor, secrets, tracing, and token tracking are shared.\n2. Model specialists as `AgentSpec`, `Agent`, existing `AugmentedLLM`, or deterministic callables depending on the helper. Keep agent names unique and instructions capability-specific.\n3. Prefer factory helpers from `mcp_agent.workflows.factory` for ordinary application code; drop to provider-specific classes only when you need direct constructor control.\n4. For routers, use `LLMRouter`, not `RouterLLM`. Prefer `route_to_agent`, `route_to_server`, or `route_to_function` when the destination type is known.\n5. For embedding routers\u002Fclassifiers, confirm the optional provider package and API key are configured before instantiating provider default models.\n6. For parallel workflows, make every fan-out worker independent; aggregate by source name and avoid assuming the first response is the winner.\n7. For evaluator loops, pass an explicit `QualityRating` threshold and a small `max_refinements` cap.\n8. For structured output, define Pydantic response models and call `generate_structured(..., response_model=YourModel, request_params=RequestParams(strict=True))` where the provider supports strict mode.\n9. Inspect token costs with `await workflow.get_token_node()` after nested runs when budget matters.\n10. Keep reusable code in your application, not in ad-hoc notebooks; use `scripts\u002Fpattern_skeletons.py` from this skill to print safe starting templates.\n\n## Reference Map\n\n- Pattern selection guide: `references\u002Fpattern-selection.md`\n- Current API and constructors: `references\u002Fapi-reference.md`\n- Reusable workflow skeletons: `references\u002Fworkflows.md`\n- Troubleshooting and validation: `references\u002Ftroubleshooting.md`\n- Import sanity checker: `scripts\u002Fcheck_workflow_imports.py`\n- Skeleton printer: `scripts\u002Fpattern_skeletons.py`\n\n## Safety Notes\n\n- Provider examples may require optional extras and configured API keys. Import checks should not instantiate network clients unless you explicitly opt in.\n- Parallel and orchestrator patterns multiply LLM calls. Estimate worst-case calls before enabling high `top_k`, many fan-out agents, or high refinement counts.\n- Router and intent classifier confidence should gate irreversible actions. Escalate or ask a clarifying question when top candidates are close or low-confidence.\n- Do not use workflow patterns to expose MCP servers or cloud\u002FCLI operations; use the sibling skills for those areas.\n",{"name":5,"license":24,"metadata":25,"description":7,"disable-model-invocation":27},"Apache 2.0",{"disco-role":26},"operating",true,"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fworkflow-patterns",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":37,"prompt":47,"zipAvailable":27},[38,41,44],{"tool":39,"command":40},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill workflow-patterns",{"tool":42,"command":43},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill workflow-patterns",{"tool":45,"command":46},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill workflow-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fworkflow-patterns\u002FSKILL.md",[49,55,59,63],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fapi-reference.md","REFERENCE","参考文档",14392,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fworkflow-patterns\u002Freferences\u002Fapi-reference.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fpattern-selection.md",6872,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fworkflow-patterns\u002Freferences\u002Fpattern-selection.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Ftroubleshooting.md",9434,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fworkflow-patterns\u002Freferences\u002Ftroubleshooting.md",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fworkflows.md",13508,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fworkflow-patterns\u002Freferences\u002Fworkflows.md",[68,76,81,88,95,102],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"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.","MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":77,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"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":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"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":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"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":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"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":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"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",[],[]]