AI Agent: Design Principles and Engineering Practice is an open-source book that explains how AI agents combine language models, context, and tools, with accompanying experiments and code. It is intended for readers studying the principles and engineering of AI agents, from fundamentals through production use. The catalogue skills support coding-agent work related to the book's subject matter.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add bojieli/ai-agent-book --skill mcp-skill-hubgit clone --depth 1 https://github.com/bojieli/ai-agent-bookWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/bojieli/ai-agent-book/mcp-skill-hub)<a href="https://agentmods.dev/skills/bojieli/ai-agent-book/mcp-skill-hub"><img src="https://agentmods.dev/badge/skills/bojieli/ai-agent-book/mcp-skill-hub/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/bojieli/ai-agent-book/mcp-skill-hub"><img src="https://agentmods.dev/badge/skills/bojieli/ai-agent-book/mcp-skill-hub.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00116 | $0.01975 |
| Opus 5.5 | $0.00046 | $0.00790 |
| Sonnet 5.5 | $0.00023 | $0.00395 |
| Haiku 4.5 | $0.00012 | $0.00198 |
Grade A, and why
mcp-skill-hub scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 22d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MCP 与 Skill Hub 生态
何时使用
- 决定一项第三方能力走 MCP 还是走 Skill Hub 分发
- 搭建 MCP 服务器,或为 Agent 框架/IDE 接入现成 MCP 服务器
- 设计 MCP 的三类原语(工具 / 资源 / 提示模板)及其边界
- 选择传输方式:本地 stdio 还是远程 Streamable HTTP
- 评估接入一个 MCP 服务器或一个 skill 的 token 成本差异
- 审查第三方 MCP 服务器 / skill 的安全风险(描述投毒、供应链、同名遮蔽)
- 制定凭证、版本锁定与隔离环境策略
核心原则
- MCP 解决的是重复适配问题。 各框架工具定义格式各异(OpenAI function calling、Anthropic tool use、LangChain Tool),MCP 是 Anthropic 2024 年底发布的开放标准,统一 AI 模型与外部工具、数据源的通信协议。
- 一次开发,处处可用。 一个 MCP 服务器可同时被 Cursor、Claude Desktop、OpenClaw 等任何兼容客户端使用,开发者无需关心上游框架差异。本书第 4 章所有实验均基于 MCP 构建工具。
- MCP 是协议,Skill Hub 是注册表。 MCP 统一的是专用工具这种分发机制的接入方式;skill 不需要协议(一个 skill 就是一个装着
SKILL.md的文件夹),所以它的分发机制是包管理器式的注册表。 - 两者的 token 成本差一到两个数量级。 接入 MCP 服务器是运行时建立连接,它暴露的全部工具定义进入每一次会话的上下文;安装 skill 只是往磁盘拷一个文件夹,常驻上下文的只有目录里的
name和description。 - 引入第三方能力 = 把一段不受自己控制的文本注入 Agent 上下文,往往还把一份凭证交到别人手里。 两条渠道都扩大信任边界,都必须审查。
- Skill 的危险系数比 MCP 大得多:它不仅包含工具描述,还包含实现代码,一部分可能运行在用户电脑上。
- 两条渠道正在收敛。 MCP 官方已在推动 skill 经由 MCP 被发现和传递——同一个 skill 既可以躺在 Skill Hub 里等
npx来装,也可以由一台 MCP 服务器供给。
实践模式
1. 渠道选择
| 维度 | MCP(协议) | Skill Hub(注册表) |
|---|---|---|
| 分发形态 | 运行时连接,工具定义进每次会话 | 磁盘拷文件夹,常驻仅 name + description |
| 接入命令 | 配置客户端连接 | npx skills add <owner>/<repo> |
| 常驻 token 成本 | 高(全部工具 schema) | 低一到两个数量级 |
| 承载内容 | 结构化工具定义 | 自然语言流程 + 代码 |
| 代表生态 | MCP 官方服务器目录 | skills.sh(Vercel,2026-01)、ClawHub(OpenClaw 生态) |
经验法则:能力需要结构化参数、可测试、可版本化服务端逻辑时走 MCP;能力是流程性知识、变更频繁、需要人类可读可改时走 Skill。若担心 MCP 服务器越接越多导致上下文膨胀,可保留 MCP 作后端协议、前端用 CLI + Skills 或代理工具做渐进式披露——"是否用 MCP 作协议"与"会话开始时是否暴露全部工具定义"是两个独立决策。
2. MCP 架构与三类原语
客户端-服务器架构:MCP 服务器暴露一组工具,MCP 客户端(Agent 框架或 IDE)通过标准化协议通信。
- 工具(tools):模型可执行的操作。每个工具用 JSON Schema 定义输入参数的类型、约束和描述——直接对应工具描述最佳实践:参数类型明确、附带使用示例、标注性能特征。
- 资源(resources):应用可读取的只读数据(文件内容、数据库记录),客户端可浏览和读取而无需调用工具。
- 提示模板(prompts):服务器提供的可复用提示词模板,供客户端和用户按需选用。
资源与工具的分离让 Agent 能区分"获取信息"和"执行操作"两类不同性质的动作。
3. 传输层
- 本地:stdio(标准输入输出),服务器作为本地进程运行。
- 远程:Streamable HTTP。
- 早期 SSE 方案已弃用,新服务器不要再用。
- 同一个 MCP 服务器既可本地进程运行,也可部署为远程服务。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 22d ago First seen · 83 lines · 116 tokens per session scan A cae89584a8c1
mcp-skill-hub is a skill published in the GitHub repository bojieli/ai-agent-book (54,406 stars, last pushed 7d ago), licensed Apache-2.0. It adds 116 tokens to every session and 1,975 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-24.
Other skills, from other repositories
remem-mcp
Long-term memory for coding agents. Auto-applies at the start of any coding task — recall past context before answering, capture decisions/learnings/fixes after work, use CodeGraph instead of grep for symbol lookup. Invoke when you see [remem-mcp] in your context or when starting any non-trivial coding work.
tura
Work in the Tura agent-runtime repository. Use for Tura architecture, Rust backend, GUI/TUI, prompts, commands, providers, sessions, documentation, tests, packaging, and release work in this directory.
acontext-installer
Install Acontext, Login & Init Acontext Project, Add Skill Memory to Agent.
ccc
This skill should be used when code search is needed (whether explicitly requested or as part of completing a task), when indexing the codebase after changes, or when the user asks about ccc, cocoindex-code, or the codebase index. Trigger phrases include 'search the codebase', 'find code related to', 'update the…
openlore
Query and publish to an OpenLore knowledge repository over SSH using ordinary shell commands. Use when a task needs project documentation, runbooks, shared team knowledge, or a place to publish findings.
system-monitor
Monitor system health: CPU, memory, disk, processes, and network. Alert on thresholds via any channel.