MCP Server Builder
anthropics/skills
Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.
AI Agent Harness 设计模式 — 记忆、权限、上下文工程、委派、技能、 Hook、Bootstrap。中文版。
$ npx skills add keli-wen/agentic-harness-patterns-skill --skill agentic-harness-patterns-zh -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install keli-wen/agentic-harness-patterns-skill agentic-harness-patterns-zh --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/keli-wen/agentic-harness-patterns-skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/agentic-harness-patterns-zh .claude/skills/agentic-harness-patterns-zh && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "agentic-harness-patterns-zh" agent skill from https://github.com/keli-wen/agentic-harness-patterns-skill/tree/master/skills/agentic-harness-patterns-zh into .claude/skills/agentic-harness-patterns-zh/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agentic-harness-patterns-zh", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/keli-wen/agentic-harness-patterns-skill/tree/master/skills/agentic-harness-patterns-zhType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add keli-wen/agentic-harness-patterns-skill --skill agentic-harness-patterns-zh -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install keli-wen/agentic-harness-patterns-skill agentic-harness-patterns-zh --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/keli-wen/agentic-harness-patterns-skill.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/agentic-harness-patterns-zh .agents/skills/agentic-harness-patterns-zh && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "agentic-harness-patterns-zh" agent skill from https://github.com/keli-wen/agentic-harness-patterns-skill/tree/master/skills/agentic-harness-patterns-zh into .agents/skills/agentic-harness-patterns-zh/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agentic-harness-patterns-zh", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add keli-wen/agentic-harness-patterns-skill --skill agentic-harness-patterns-zh -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install keli-wen/agentic-harness-patterns-skill agentic-harness-patterns-zh --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/keli-wen/agentic-harness-patterns-skill.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/agentic-harness-patterns-zh .cursor/skills/agentic-harness-patterns-zh && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "agentic-harness-patterns-zh" agent skill from https://github.com/keli-wen/agentic-harness-patterns-skill/tree/master/skills/agentic-harness-patterns-zh into .cursor/skills/agentic-harness-patterns-zh/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agentic-harness-patterns-zh", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/keli-wen/agentic-harness-patterns-skill.git --path skills/agentic-harness-patterns-zh--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add keli-wen/agentic-harness-patterns-skill --skill agentic-harness-patterns-zh -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install keli-wen/agentic-harness-patterns-skill agentic-harness-patterns-zh --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/keli-wen/agentic-harness-patterns-skill.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/agentic-harness-patterns-zh .gemini/skills/agentic-harness-patterns-zh && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "agentic-harness-patterns-zh" agent skill from https://github.com/keli-wen/agentic-harness-patterns-skill/tree/master/skills/agentic-harness-patterns-zh into .gemini/skills/agentic-harness-patterns-zh/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agentic-harness-patterns-zh", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install keli-wen/agentic-harness-patterns-skill agentic-harness-patterns-zhInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add keli-wen/agentic-harness-patterns-skill --skill agentic-harness-patterns-zh -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/keli-wen/agentic-harness-patterns-skill.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/agentic-harness-patterns-zh .github/skills/agentic-harness-patterns-zh && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "agentic-harness-patterns-zh" agent skill from https://github.com/keli-wen/agentic-harness-patterns-skill/tree/master/skills/agentic-harness-patterns-zh into .github/skills/agentic-harness-patterns-zh/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agentic-harness-patterns-zh", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add keli-wen/agentic-harness-patterns-skill --skill agentic-harness-patterns-zh -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install keli-wen/agentic-harness-patterns-skill agentic-harness-patterns-zh --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/keli-wen/agentic-harness-patterns-skill.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/agentic-harness-patterns-zh .opencode/skills/agentic-harness-patterns-zh && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "agentic-harness-patterns-zh" agent skill from https://github.com/keli-wen/agentic-harness-patterns-skill/tree/master/skills/agentic-harness-patterns-zh into .opencode/skills/agentic-harness-patterns-zh/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agentic-harness-patterns-zh", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
agentic-harness-patterns-zhAI Agent Harness 设计模式 — 记忆、权限、上下文工程、委派、技能、 Hook、Bootstrap。中文版。
Agentic Harness Patterns Zh is an agent skill from keli-wen/agentic-harness-patterns-skill. AI Agent Harness 设计模式 — 记忆、权限、上下文工程、委派、技能、 Hook、Bootstrap。中文版。
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 15 other files, including reference files (for example `metadata.json`, `references/agent-orchestration-pattern.md` and `references/bootstrap-sequence-pattern.md`).
It sits in Agent Workflows. The repository describes itself as: Agent skill for harness engineering — memory, permissions, context engineering, multi-agent coordination. Distilled from Claude Code, with Codex CLI and Gemini CLI on the… The licence is MIT.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 17549f5. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Agentic Harness Patterns Zh loads about 1.9k tokens when it runs, and up to ~33k if it reads all its reference files. Until then it costs about 23 tokens; SKILL.md has 471 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from keli-wen/agentic-harness-patterns-skill at commit 17549f5, republished under its MIT licence (© keli-wen). 471 words, ~1,860 tokens.
.claude/skills/agentic-harness-patterns-zh/SKILL.md (or your agent's skills folder). This skill also uses 13 other files; get the full folder from GitHub.生产级 AI 编程助手不只是"大模型 + 工具调用循环"。循环本身很简单。Harness — 记忆、技能、安全、上下文控制、委派、可扩展性 — 才是让 Agent 可靠、安全、大规模运行的关键。
适合: 正在构建或扩展 AI Agent 运行时、自定义 Agent、或高级多 Agent 工作流的工程师。 不适合: Prompt 工程、模型选择、通用软件架构、LLM API 入门。
所有原则均从生产级运行时决策中提炼而来。Claude Code 作为实证依据,而非唯一实现。
| 你想要... | 阅读 |
|---|---|
| 让 Agent 跨会话记住并持续改进 | 记忆系统 |
| 打包可复用的工作流和专业知识 | 技能系统 |
| 让 Agent 强大地使用工具但不危险 | 工具与安全 |
| 给 Agent 正确的上下文、合理的成本 | 上下文工程 |
| 将工作拆分给多个 Agent 而不失控 | 多 Agent 协调 |
| 通过 Hook、后台任务或启动逻辑扩展行为 | 生命周期与可扩展性 |
开始构建之前: 先读 踩坑指南 — 这些是最不直觉但最烧时间的失败模式。
用户痛点: "我的 Agent 下次对话就忘了所有纠正和项目规则。"
黄金法则: 区分 Agent 知道的(指令记忆)、Agent 学到的(自动记忆)、和 Agent 提取的(会话记忆)。三层的持久性、信任度、审查需求各不相同。
适用场景: 任何跨会话运行或需要持续积累项目知识的 Agent。
工作原理:
从这里开始: 定义你的记忆层(指令、自动、提取)。实现两步保存不变式(先主题文件,再索引)。核心写入路径稳定后再加后台提取。
在 Claude Code 中: 使用
/remember审计和晋升各层自动记忆条目。
权衡:
深入阅读: references/memory-persistence-pattern.md
用户痛点: "我想让 Agent 复用工作流和领域知识,不用每次重新解释。"
黄金法则: 技能是懒加载的指令集,不是立即注入的 prompt。发现必须廉价(仅元数据);完整内容只在激活时加载。
适用场景: 任何需要可复用、可组合工作流并根据用户意图匹配激活的 Agent。
工作原理:
从这里开始: 选一种元数据格式(推荐 frontmatter)。实现两阶段发现:启动时廉价列表,调用时懒加载内容。在目录增长前设好每条字符上限。
权衡:
深入阅读: references/skill-runtime-pattern.md
用户痛点: "我想让 Agent 强大地使用工具,但不要危险。"
黄金法则: 默认关闭(fail-closed)。工具是串行的、有门控的,除非显式标记为并发安全且通过了权限管道。
适用场景: 任何需要工具注册、并发控制或权限门控的 Agent 运行时。
工作原理:
从这里开始: 让每个工具调用都通过一个权限关卡。默认 fail-closed(拒绝/询问)。在上线任何自动批准模式之前,先加上受保护路径的免豁免规则。
在 Claude Code 中: 使用
/update-config配置权限规则和 Hook。
权衡:
深入阅读: references/tool-registry-pattern.md | references/permission-gate-pattern.md
用户痛点: "我的 Agent 看到太多、太少、或者看错了。"
黄金法则: 把上下文当预算管,不是垃圾桶。窗口里的每个 token 都必须通过四种操作之一赢得它的位置:选择、写回、压缩、隔离。
适用场景: 任何在长会话中性能下降、委派工作污染父上下文、或因急切加载导致启动慢的 Agent。
工作原理:
从这里开始: 审计你当前每轮的上下文成本。对每个变长块加硬上限。在启用任何压缩之前,先加截断恢复指针(告诉模型调用哪个工具获取完整输出)。
权衡:
深入阅读: references/context-engineering-pattern.md(索引) | select | compress | isolate
用户痛点: "我要并行、专业化和协调,但不要混乱。"
黄金法则: 协调者必须自己综合,不能委派理解。"基于你的发现,修复它" 是反模式 — 协调者应该消化 worker 结果成精确规格,然后再派发实现。
适用场景: 当任务对单个 Agent 太大时、需要并行探索时、或想要持久化的专业队友时。
工作原理:
三种委派模式服务不同的任务形态:
| 模式 | 上下文共享 | 适合 |
|---|---|---|
| Coordinator | 无 — worker 从零开始 | 复杂多阶段任务(研究 → 综合 → 实现 → 验证) |
| Fork | 全部 — 子级继承父级历史 | 共享已加载上下文的快速并行拆分 |
| Swarm | 对等共享任务列表 | 长期运行的独立工作流 |
关键约束:
从这里开始: 选一种委派模式并完整实现,再考虑混合模式。每个子 Agent prompt 写成自包含文档。在研究和实现 worker 之间加综合步骤 — 这是协调者创造价值的地方。
Coordinator 模式实现清单:
权衡:
深入阅读: references/agent-orchestration-pattern.md
用户痛点: "我需要 Hook、后台任务和干净的启动序列。"
黄金法则: 可扩展性是注入点,不是继承层次。Hook 在生命周期时刻附加副作用;任务用严格状态机追踪异步工作;Bootstrap 以记忆化阶段按依赖顺序初始化。
适用场景: 需要不修改核心代码就扩展 Agent 行为、追踪长期运行的后台工作、或为多种入口模式结构化初始化时。
工作原理:
从这里开始: 让所有 Hook 通过单一分发点。在加任何外部 Hook 类型之前先实现信任门控。在 init 时注册清理处理器,不在使用点。
在 Claude Code 中: 使用
/update-config配置 Hook(工具执行前/后、prompt 提交)。
权衡:
深入阅读: references/hook-lifecycle-pattern.md | references/task-decomposition-pattern.md | references/bootstrap-sequence-pattern.md
违反这些原则会导致 bug 的非直觉设计:
并发分类是按调用的,不是按工具类型。 同一工具对某些输入安全、对另一些不安全。不要假设工具的并发行为是静态的 — 运行时按调用决定。
权限评估有副作用。 权限检查器追踪拒绝次数、转换模式、更新状态。不要把它当纯查询函数。
大多数异步工作跳过 "pending" 状态。 实践中,工作单元直接注册为 "running"。不要构建假设每个工作单元从 pending 开始的 UI。
Fork 子级不能 fork。 递归保护维护单层不变式。Fork 工具留在子级工具池中(为了 prompt 缓存共享)但在调用时被阻止。
上下文构建器是记忆化的但手动失效。 添加上下文源而不添加对应的失效点,模型在整个会话中看到过时数据。
记忆索引有硬上限。 超过上限的条目被静默截断。不定期清理的话,新条目变得不可见。
技能列表预算很紧。 描述被拼接并按条目限制字符。把最具区分度的触发语言放在前面 — 后面会被截掉。
Hook 信任是全有或全无。 工作区不受信任时,整个 Hook 系统被禁用,不只是个别可疑的 Hook。
工具的默认权限是 "allow"。 没有实现自定义权限逻辑的工具完全委托给基于规则的系统。只在需要工具特定门控(路径 ACL、配额等)时才覆盖。
回收需要通知。 终态工作单元只有在父级收到完成信号后才可被 GC。在通知前回收会产生竞态,父级永远读不到结果。
本技能是关于 Agent 周围的 harness 的,不是:
如果你的问题是关于模型本身而非模型周围的系统,本技能不适用。
© keli-wen, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 13 other files (references) in skills/agentic-harness-patterns-zh of keli-wen/agentic-harness-patterns-skill.
Open the folder on GitHubat commit 17549f5
Agentic Harness Patterns Zh next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Agentic Harness Patterns Zh this skillkeli-wen/agentic-harness-patterns-skill | 305 | — | ~1.9k | Automated safety check: Pass | MIT | |
| MCP Server Builderanthropics/skills | 180k | 63 repos | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| Hook Development for Claude Code Pluginsanthropics/claude-plugins-official | 38k | 10 repos | ~4.1k | Automated safety check: Notes | Apache-2.0 | |
| Using Superpowersfarm-fe/farm | 5.6k | 35 repos | ~1.4k | Automated safety check: Pass | MIT | |
| Executing Plans Inlineobra/superpowers | 297k | 2 repos | ~5.1k | Automated safety check: Pass | MIT | |
| Skill CreatorAzure/azqr | 796 | 89 repos | ~8.2k | Automated safety check: Pass | Apache-2.0 |
anthropics/skills
Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
farm-fe/farm
A skill your agent uses when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions
obra/superpowers
Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.
Azure/azqr
Create new skills, modify and improve existing skills, and measure skill performance.
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
keli-wen/agentic-harness-patterns-skill
Harness patterns for coding agents — memory, permissions, context engineering, delegation, skills, hooks, bootstrap.
Categories
AI Agent Harness 设计模式 — 记忆、权限、上下文工程、委派、技能、 Hook、Bootstrap。中文版。. Agentic Harness Patterns Zh is an agent skill from keli-wen/agentic-harness-patterns-skill.
Agentic Harness Patterns Zh fits situations like: agent Workflows work in your project.
Run `npx skills add keli-wen/agentic-harness-patterns-skill --skill agentic-harness-patterns-zh -a claude-code`. Or copy the skill folder (skills/agentic-harness-patterns-zh in keli-wen/agentic-harness-patterns-skill) into .claude/skills/agentic-harness-patterns-zh in your project. Claude Code loads it when a task matches its description.
Run `npx skills add keli-wen/agentic-harness-patterns-skill --skill agentic-harness-patterns-zh -a codex`. Or copy the skill folder (skills/agentic-harness-patterns-zh in keli-wen/agentic-harness-patterns-skill) into .agents/skills/agentic-harness-patterns-zh in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add keli-wen/agentic-harness-patterns-skill --skill agentic-harness-patterns-zh -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agentic-harness-patterns-zh, .gemini/skills/agentic-harness-patterns-zh, .github/skills/agentic-harness-patterns-zh and .opencode/skills/agentic-harness-patterns-zh in your project.
SKILL.md names no scripts, command-line tools or credentials: Agentic Harness Patterns Zh is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Agentic Harness Patterns Zh is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 31k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Agentic Harness Patterns Zh: MCP Server Builder (anthropics/skills, 180k stars), Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 38k stars), Using Superpowers (farm-fe/farm, 5.6k stars) and Executing Plans Inline (obra/superpowers, 297k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
keli-wen (a GitHub user) maintains it in keli-wen/agentic-harness-patterns-skill, which has 305 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on April 2, 2026.
Source: keli-wen/agentic-harness-patterns-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.