[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CF5ZAJRXJBDXWECKMHF5F4":3,"skill-same:01M6CF5ZAJRXJBDXWECKMHF5F4":91},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":50,"install":51,"resources":64},"01M6CF5ZAJRXJBDXWECKMHF5F4","building-agent-systems",null,"AI agent and LLM system engineering reference covering single-agent dev (ReAct, tool calling, plan-execute), multi-agent coordination (swarm, role decomposition, file locking), LLM security (prompt injection, jailbreak defense, output filtering), RAG architecture (chunking, hybrid retrieval, rerank), and prompt engineering \u002F evaluation (RAGAS, LLM-as-Judge). Use when building AI agents, designing RAG pipelines, orchestrating multi-agent workflows, hardening LLM apps, or writing prompts.","telagod\u002Fcode-abyss","telagod","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F39987513?v=4","01M6CF4EH93PP5CWH3J34Z66DP","01M6CF4EN6W4QFXK3PRE9W29X8",244,"MIT","https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Fskills\u002Fbuilding-agent-systems\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"building agent systems","Evaluation","multi-agent","coordination","system","plan","injection","defense","jailbreak","Output Filtering","writing","rag","architecture","react","workflows","ai agent","security","ai agents","prompt injection","llm security","2026-11-10 10:12:30",false,"---\nname: building-agent-systems\ndescription: AI agent and LLM system engineering reference covering single-agent dev (ReAct, tool calling, plan-execute), multi-agent coordination (swarm, role decomposition, file locking), LLM security (prompt injection, jailbreak defense, output filtering), RAG architecture (chunking, hybrid retrieval, rerank), and prompt engineering \u002F evaluation (RAGAS, LLM-as-Judge). Use when building AI agents, designing RAG pipelines, orchestrating multi-agent workflows, hardening LLM apps, or writing prompts.\nuser-invocable: false\n---\n\n# 丹鼎秘典 · Agent \u002F LLM 工程\n\n> **判断先于执行**：决定「是否做 \u002F 选什么 \u002F 如何取舍」（栈、方案、架构、权衡）前，先读领域判断内核 `skills\u002F_kernel\u002Fml\u002FSKILL.md`——它管 judgment，本秘典管 execution；冲突时以内核判断为准。\n\n> 单 Agent 是器，多 Agent 是阵。先选规模，再选模式。\n\n## 路由\n\n| 意图 | 加载 | 核心 |\n|------|------|------|\n| 单 Agent 开发（工具调用、ReAct） | [agent-dev](references\u002Fagent-dev.md) | ReAct \u002F Plan-Execute \u002F Reflection |\n| 多 Agent 协同（>=3 文件 or >=2 并行） | [multi-agent-coordination](references\u002Fmulti-agent-coordination.md) | 蚁群仿生、文件锁、依赖图 |\n| 多 Agent 协议细节（消息素、收阵报告） | [multi-agent-protocol](references\u002Fmulti-agent-protocol.md) | Codex 原生协议、角色定义 |\n| LLM 安全（注入、越狱、输出过滤） | [llm-security](references\u002Fllm-security.md) | OWASP LLM Top 10 视角 |\n| RAG 系统（向量、检索、重排） | [rag-system](references\u002Frag-system.md) | Chunking \u002F 混合检索 \u002F Cohere rerank |\n| Prompt + 评估 | [prompt-and-eval](references\u002Fprompt-and-eval.md) | Few-shot \u002F CoT \u002F RAGAS \u002F LLM-as-Judge |\n\n## 规模决策\n\n```\n单步任务（一文件、一查询）         → 直接执行（不需要 Agent 框架）\n多步任务（计划 + 工具）             → 单 Agent (ReAct)\n复杂任务（>5 步、需反思）           → 单 Agent (Plan-Execute \u002F Reflection)\n独立并行任务（>=3 文件、>=2 流）    → 多 Agent (TeamCreate)\n跨域协作（角色明确）                → 多 Agent (角色分工)\n```\n\n**犹豫时优先 TeamCreate** — 串行降级容易，并行升级难。\n\n## 通用原则\n\n```\nPrompt 即代码须版控 | 输入输出皆验证 | 成本效果平衡 | 持续评估迭代 | 安全边界明确\n```\n\n### 跨场景铁律\n\n1. **Prompt 版控** — Prompt 是代码，必须 Git；变更要走 review\n2. **I\u002FO 验证** — 输入侧防注入，输出侧防 hallucination 落地（结构化 schema、引用追溯）\n3. **评估前置** — 上线前必有 eval set；RAGAS \u002F LLM-as-Judge 至少二选一\n4. **成本观测** — token \u002F latency \u002F 失败率必埋点；预算阈值自动告警\n5. **降级路径** — 多 Agent 失败 → 单 Agent；单 Agent 失败 → 直接回答 + 标记 `[unverified]`\n\n## 多 Agent 启用判据\n\n| 信号 | 启用 TeamCreate |\n|------|-----------------|\n| 涉及 ≥3 独立文件 | ✅ |\n| 需 ≥2 并行流 | ✅ |\n| 总步骤 >10 | ✅ |\n| 用户明确要求 | ✅ |\n| 单一探索任务 | ❌（用 explorer 或单 Agent） |\n| 单文件改动 | ❌（用 worker 或直接执行） |\n| 单步任务 | ❌（直接执行） |\n\n详细生命周期、文件锁规则、依赖感知、过载保护、降级链：[multi-agent-coordination.md](references\u002Fmulti-agent-coordination.md)\n\n## 与其他 skill 联动\n\n- 涉及部署 → [provisioning-infrastructure](..\u002Fprovisioning-infrastructure\u002FSKILL.md)（Vector DB、模型服务）\n- 涉及前端 → [applying-ui-design-system](..\u002Fapplying-ui-design-system\u002FSKILL.md)（Chat UI \u002F Agent 状态可视化）\n- 涉及安全审计 → [securing-systems](..\u002Fsecuring-systems\u002FSKILL.md)（LLM AppSec 子域）\n- 涉及评估自动化 → [automating-devops](..\u002Fautomating-devops\u002FSKILL.md)（CI 中跑 eval）\n","# 丹鼎秘典 · Agent \u002F LLM 工程\n\n> **判断先于执行**：决定「是否做 \u002F 选什么 \u002F 如何取舍」（栈、方案、架构、权衡）前，先读领域判断内核 `skills\u002F_kernel\u002Fml\u002FSKILL.md`——它管 judgment，本秘典管 execution；冲突时以内核判断为准。\n\n> 单 Agent 是器，多 Agent 是阵。先选规模，再选模式。\n\n## 路由\n\n| 意图 | 加载 | 核心 |\n|------|------|------|\n| 单 Agent 开发（工具调用、ReAct） | [agent-dev](references\u002Fagent-dev.md) | ReAct \u002F Plan-Execute \u002F Reflection |\n| 多 Agent 协同（>=3 文件 or >=2 并行） | [multi-agent-coordination](references\u002Fmulti-agent-coordination.md) | 蚁群仿生、文件锁、依赖图 |\n| 多 Agent 协议细节（消息素、收阵报告） | [multi-agent-protocol](references\u002Fmulti-agent-protocol.md) | Codex 原生协议、角色定义 |\n| LLM 安全（注入、越狱、输出过滤） | [llm-security](references\u002Fllm-security.md) | OWASP LLM Top 10 视角 |\n| RAG 系统（向量、检索、重排） | [rag-system](references\u002Frag-system.md) | Chunking \u002F 混合检索 \u002F Cohere rerank |\n| Prompt + 评估 | [prompt-and-eval](references\u002Fprompt-and-eval.md) | Few-shot \u002F CoT \u002F RAGAS \u002F LLM-as-Judge |\n\n## 规模决策\n\n```\n单步任务（一文件、一查询）         → 直接执行（不需要 Agent 框架）\n多步任务（计划 + 工具）             → 单 Agent (ReAct)\n复杂任务（>5 步、需反思）           → 单 Agent (Plan-Execute \u002F Reflection)\n独立并行任务（>=3 文件、>=2 流）    → 多 Agent (TeamCreate)\n跨域协作（角色明确）                → 多 Agent (角色分工)\n```\n\n**犹豫时优先 TeamCreate** — 串行降级容易，并行升级难。\n\n## 通用原则\n\n```\nPrompt 即代码须版控 | 输入输出皆验证 | 成本效果平衡 | 持续评估迭代 | 安全边界明确\n```\n\n### 跨场景铁律\n\n1. **Prompt 版控** — Prompt 是代码，必须 Git；变更要走 review\n2. **I\u002FO 验证** — 输入侧防注入，输出侧防 hallucination 落地（结构化 schema、引用追溯）\n3. **评估前置** — 上线前必有 eval set；RAGAS \u002F LLM-as-Judge 至少二选一\n4. **成本观测** — token \u002F latency \u002F 失败率必埋点；预算阈值自动告警\n5. **降级路径** — 多 Agent 失败 → 单 Agent；单 Agent 失败 → 直接回答 + 标记 `[unverified]`\n\n## 多 Agent 启用判据\n\n| 信号 | 启用 TeamCreate |\n|------|-----------------|\n| 涉及 ≥3 独立文件 | ✅ |\n| 需 ≥2 并行流 | ✅ |\n| 总步骤 >10 | ✅ |\n| 用户明确要求 | ✅ |\n| 单一探索任务 | ❌（用 explorer 或单 Agent） |\n| 单文件改动 | ❌（用 worker 或直接执行） |\n| 单步任务 | ❌（直接执行） |\n\n详细生命周期、文件锁规则、依赖感知、过载保护、降级链：[multi-agent-coordination.md](references\u002Fmulti-agent-coordination.md)\n\n## 与其他 skill 联动\n\n- 涉及部署 → [provisioning-infrastructure](..\u002Fprovisioning-infrastructure\u002FSKILL.md)（Vector DB、模型服务）\n- 涉及前端 → [applying-ui-design-system](..\u002Fapplying-ui-design-system\u002FSKILL.md)（Chat UI \u002F Agent 状态可视化）\n- 涉及安全审计 → [securing-systems](..\u002Fsecuring-systems\u002FSKILL.md)（LLM AppSec 子域）\n- 涉及评估自动化 → [automating-devops](..\u002Fautomating-devops\u002FSKILL.md)（CI 中跑 eval）\n",{"name":5,"description":7,"user-invocable":39},"main","2544577cf03a67522466450000731e52c64a5184","skills\u002Fbuilding-agent-systems",35,"https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fcode-abyss","https:\u002F\u002Fgithub.com\u002Ftelagod","2026-07-19 23:15:32",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add telagod\u002Fcode-abyss --skill building-agent-systems",{"tool":57,"command":58},"bunx","bunx skills add telagod\u002Fcode-abyss --skill building-agent-systems",{"tool":60,"command":61},"pnpm","pnpm dlx skills add telagod\u002Fcode-abyss --skill building-agent-systems","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Fskills\u002Fbuilding-agent-systems\u002FSKILL.md",true,[65,71,75,79,83,87],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fagent-dev.md","REFERENCE","参考文档",5441,"https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Fskills\u002Fbuilding-agent-systems\u002Freferences\u002Fagent-dev.md",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fllm-security.md",10859,"https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Fskills\u002Fbuilding-agent-systems\u002Freferences\u002Fllm-security.md",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fmulti-agent-coordination.md",7696,"https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Fskills\u002Fbuilding-agent-systems\u002Freferences\u002Fmulti-agent-coordination.md",{"path":80,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fmulti-agent-protocol.md",3426,"https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Fskills\u002Fbuilding-agent-systems\u002Freferences\u002Fmulti-agent-protocol.md",{"path":84,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fprompt-and-eval.md",8007,"https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Fskills\u002Fbuilding-agent-systems\u002Freferences\u002Fprompt-and-eval.md",{"path":88,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Frag-system.md",15012,"https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Fskills\u002Fbuilding-agent-systems\u002Freferences\u002Frag-system.md",[92,111,123,133,148,161],{"skillNo":93,"name":94,"nameZh":95,"description":6,"descriptionZh":96,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":109,"publishedAt":38},"01M6CF94Y2R0JYCS270NC9BKM5","parse-error","解析错误样例","","https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fskill-contract\u002Fparse-error\u002Ftools\u002Fparse-error\u002FSKILL.md",[99,104],{"categoryNo":100,"categoryName":101,"taxonomyType":102,"taxonomyTypeDesc":103},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师","PROFESSION","适用职业",{"categoryNo":105,"categoryName":106,"taxonomyType":107,"taxonomyTypeDesc":108},"01M8BSYDSNXQT2W2GMZGF0ZHH4","示例与演示技能","SCENARIO","使用场景",[110],"parse error",{"skillNo":112,"name":113,"nameZh":114,"description":115,"descriptionZh":116,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":121,"publishedAt":38},"01M6CF925B128W5YAHWVYSJQTG","multi-script","多脚本样例","too many scripts","脚本数量过多","https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fskill-contract\u002Fmulti-script\u002Ftools\u002Fmulti-script\u002FSKILL.md",[119,120],{"categoryNo":100,"categoryName":101,"taxonomyType":102,"taxonomyTypeDesc":103},{"categoryNo":105,"categoryName":106,"taxonomyType":107,"taxonomyTypeDesc":108},[122],"multi script",{"skillNo":124,"name":125,"nameZh":126,"description":6,"descriptionZh":96,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":131,"publishedAt":38},"01M6CF8ZYT3KZ4ZZAATFJH0DV4","missing-description","缺失描述样例","https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fskill-contract\u002Fmissing-description\u002Ftools\u002Fmissing-description\u002FSKILL.md",[129,130],{"categoryNo":100,"categoryName":101,"taxonomyType":102,"taxonomyTypeDesc":103},{"categoryNo":105,"categoryName":106,"taxonomyType":107,"taxonomyTypeDesc":108},[132],"missing description",{"skillNo":134,"name":135,"nameZh":136,"description":137,"descriptionZh":138,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":143,"publishedAt":38},"01M6CF8XB2Z8NAPYW3W7S7KW1S","invalid-tools","无效工具名样例","invalid tool name","无效的工具名称","https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fskill-contract\u002Finvalid-tools\u002Ftools\u002Finvalid-tools\u002FSKILL.md",[141,142],{"categoryNo":100,"categoryName":101,"taxonomyType":102,"taxonomyTypeDesc":103},{"categoryNo":105,"categoryName":106,"taxonomyType":107,"taxonomyTypeDesc":108},[144,145,146,147],"Tools","invalid tools","Bash","tool",{"skillNo":149,"name":150,"nameZh":151,"description":152,"descriptionZh":153,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":158,"publishedAt":38},"01M6CF8TTPYFV83HSF057F95QM","clash-skill","技能冲突样例（一）","first duplicate","第一个重复项","https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fskill-contract\u002Fduplicate\u002Ftools\u002Falpha\u002FSKILL.md",[156,157],{"categoryNo":100,"categoryName":101,"taxonomyType":102,"taxonomyTypeDesc":103},{"categoryNo":105,"categoryName":106,"taxonomyType":107,"taxonomyTypeDesc":108},[159,160],"clash skill","first",{"skillNo":162,"name":150,"nameZh":163,"description":164,"descriptionZh":165,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":170,"publishedAt":38},"01M6CF8RAHFEPXNB6SWBR2T49M","技能冲突样例（二）","second duplicate","第二个重复项","https:\u002F\u002Fgithub.com\u002Ftelagod\u002Fcode-abyss\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fskill-contract\u002Fduplicate\u002Fdomains\u002Falpha\u002FSKILL.md",[168,169],{"categoryNo":100,"categoryName":101,"taxonomyType":102,"taxonomyTypeDesc":103},{"categoryNo":105,"categoryName":106,"taxonomyType":107,"taxonomyTypeDesc":108},[159]]