新增第26章: NAS照片发送到Telegram
This commit is contained in:
33
wiki/concepts/Tool-Wrapper.md
Normal file
33
wiki/concepts/Tool-Wrapper.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
id: tool-wrapper
|
||||
title: "Tool Wrapper"
|
||||
type: concept
|
||||
tags: [Agent, Skill, 设计模式]
|
||||
sources: [Google-5-Agent-Skill-design-patterns-2026-03-19]
|
||||
last_updated: 2026-04-17
|
||||
---
|
||||
|
||||
## Summary
|
||||
最容易上手的 Agent Skill 设计模式,让 agent 快速成为某个领域的专家。
|
||||
|
||||
## Definition
|
||||
Tool Wrapper 模式把某个库或框架的规范文档打包成一个 skill,agent 只有在真正用到这个技术时才会加载相关文档。
|
||||
|
||||
## How It Works
|
||||
1. **监听特定关键词**:SKILL.md 监听特定的库关键词(如 `FastAPI`、`React`)
|
||||
2. **动态加载文档**:当用户开始使用特定技术时,动态加载 references 目录下的规范文档
|
||||
3. **规则执行**:把加载的规则当作绝对真理来执行
|
||||
|
||||
## Use Cases
|
||||
- 分发团队内部的编码规范
|
||||
- 实现特定框架的最佳实践
|
||||
- 快速成为某个技术栈的专家
|
||||
|
||||
## Advantages
|
||||
- 减少 system prompt 膨胀
|
||||
- 按需加载,降低 token 消耗
|
||||
- 易于维护和更新
|
||||
|
||||
## Related Concepts
|
||||
- [[Agent-Skill-设计模式]]
|
||||
- [[渐进式披露]]
|
||||
Reference in New Issue
Block a user