Files
nexus/wiki/concepts/Tool-Wrapper.md

1.0 KiB
Raw Blame History

id, title, type, tags, sources, last_updated
id title type tags sources last_updated
tool-wrapper Tool Wrapper concept
Agent
Skill
设计模式
Google-5-Agent-Skill-design-patterns-2026-03-19
2026-04-17

Summary

最容易上手的 Agent Skill 设计模式,让 agent 快速成为某个领域的专家。

Definition

Tool Wrapper 模式把某个库或框架的规范文档打包成一个 skillagent 只有在真正用到这个技术时才会加载相关文档。

How It Works

  1. 监听特定关键词SKILL.md 监听特定的库关键词(如 FastAPIReact
  2. 动态加载文档:当用户开始使用特定技术时,动态加载 references 目录下的规范文档
  3. 规则执行:把加载的规则当作绝对真理来执行

Use Cases

  • 分发团队内部的编码规范
  • 实现特定框架的最佳实践
  • 快速成为某个技术栈的专家

Advantages

  • 减少 system prompt 膨胀
  • 按需加载,降低 token 消耗
  • 易于维护和更新