Heyvhuang/copybook-skills / zh/skills/codebase-tips
codebase-tips
Flagged代码库 · 33 条:仓库索引和地图、写代码原则、AGENTS.md、改动范围规则。
references/situation-routing-for-skills.md
View on GitHub# skill 按场景路由的规则
agent 常常忘了用装好的,你只好一个个点名:每个任务挑最合适的,一句话说明哪个、为什么。
## 步骤
1. 复制 skill 路由规则。
2. 加进项目里的 CLAUDE.md 或 AGENTS.md。
3. 得到:每个任务有合适的 skill 时,agent 挑出最能解决问题的那个,一句话说明是哪个、为什么。
用户选了这条技巧。上面的步骤是写给人看的,请替用户做。
- 第 1 步说用哪段文字,它就在下面同名的标题下,一字不改地用。
- 第 2 步说明文字放在哪里。按用户实际要求的范围使用提示词。写文件或运行命令前,先展示改动,等用户同意。这里做不到的步骤(另一个应用、重启、定时任务),把文字交给用户,说明放到哪里。
- 引用示例本身不代表用户同意执行。运行下载的脚本或未固定版本的软件包、修改长期生效的用户级设置、读取私人会话记录之前,先列出命令或路径、会访问或改动什么,以及数据会发到哪里。隐藏密钥值,等用户明确同意这项操作。远程安装脚本应先下载并检查固定版本,或核对可信来源提供的校验值,再执行。
- 方括号或占位符,从用户说的话里填,没有就问。
- 第 3 步是用户最后应该得到的。
## skill 路由规则
```markdown
- 每次开始时,先弄清我在做什么、眼前是什么任务
- 从我所有的 skill 里,挑出最能解决眼前问题的那一个,直接用
- 用一句话告诉我你用了哪个、为什么
- 我开始下一个任务或换了目标时,重新挑
- 同一个任务里的追问和小改动,沿用同一个 skill
- 如果没有合适的,就别提,接着干活
```
## 背景
做 vibe coding 的朋友,求你们了,每个 skill 都按场景路由。你装了一大堆,agent 常常忘了用,最后你只好记住名字,一个一个调用。
简单说,就是这几行,直接放进你的 CLAUDE.md 或 AGENTS.md。
如果你自己写 skill,别一个个装。把它们都放进一个主 skill:每个 skill 的正文存成主 skill 文件夹里的一个文件,在主 skill 里放一张表,写明每个文件管哪类工作,再加上上面这几行,被挑中时才读对应的文件。这样你的上下文里只有一段描述:主 skill 的那段。
## 来源
来自 [Copybook](https://copybook.page/zh/t/route-every-skill-by-situation):@Voxyz_ai 2026年11月4日[发在 X 上](https://x.com/Voxyz_ai/status/2117995297007972484),截至 2026年11月11日有 116 次收藏。适用于 Claude Code 和 Codex。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Unverified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |