npx skills add https://github.com/grail-computer/self-improving-agent --skill self-improving-agent何时使用此技能:
- 完成一项重要任务后(任务后反思)
- 当你注意到自己正在重复一个多步骤的工作流程时
- 当人类纠正了你的行为,并且你需要持久化这个纠正时
- 当
AGENTS.md中的代码库地图过时时- 在工作会话结束时
完成工作后问自己这些问题:
AGENTS.md 中的 代码库地图AGENTS.md 中的 本地规范、防护栏 或 模式与陷阱AGENTS.md 中的 模式与陷阱When to use this skill:
- After completing a significant task (post-task reflection)
- When you notice yourself repeating a multi-step workflow
- When a human corrects your behavior and you need to persist the correction
- When the codebase map in AGENTS.md is stale
- At the end of a working session
Ask yourself these questions after completing work:
Did I wander? Did I spend time searching for files that should have been in the codebase map?
AGENTS.mdDid I get corrected? Did the human tell me to do something differently?
AGENTS.mdDid I repeat a workflow? Did I follow a multi-step procedure that I've done before (or will likely do again)?
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
AGENTS.md 是否过时了? 其中的规范、入口点或约定是否不再与实际代码库匹配?
* → 立即更新过时的部分如果以上都不适用,则无需采取行动。不要为了创建而创建。
更新 AGENTS.md 时,请遵循以下规则:
AGENTS.md 中的当前地图。find 或 ls(非递归全树)查看实际的顶层结构。当你确定了一个值得捕捉的可重复工作流程时,使用此流程。
Is it a multi-step procedure with a clear output?
→ YES → Skill
→ NO → AGENTS.md entry
Is it specific to HOW this repo works (norms, navigation)?
→ YES → AGENTS.md entry
→ NO → Skill
Am I unsure?
→ Start as an AGENTS.md entry. Promote to skill if it grows.
选择名称。 使用反映工作的动词-名词模式:debug-ci、draft-release-notes、run-migration 等。
创建文件夹和文件:
skills/<skill-name>/SKILL.md
使用以下结构编写 SKILL.md:
When to use: <clear trigger condition>
<What "done" looks like. Be specific about format, location, and quality.>
优秀技能的关键原则:
* 围绕 **要完成的工作** 来构建,而不是工具("调试 CI 失败",而不是"使用 grep")
* 明确 **触发条件** —— 智能体何时应该使用此技能?
* 定义 **输出契约** —— "完成"是什么样子的?
* 如果有助于理解,可以包含 **良好输出的示例** 作为资产(放在 `skills/<name>/examples/` 中)
* 保持步骤 **命令式和具体化** —— 避免模糊的指令
5. 将新技能添加到 AGENTS.md 中的技能表:
| [<skill-name>](skills/<skill-name>/SKILL.md) | <purpose> | <trigger> |
如果某个技能需要确定性执行(不仅仅是 LLM 的判断),请添加脚本:
skills/<skill-name>/
├── SKILL.md # 操作手册(始终必需)
├── scripts/ # 用于确定性步骤的辅助脚本
│ └── validate.sh
└── examples/ # 展示"良好"质量的参考输出
└── example-output.md
在 SKILL.md 中引用它们:"运行 scripts/validate.sh 来验证输出。"
Does this skill only matter for THIS repo?
→ Keep it in skills/ within this repo (repo-local)
Have I felt this pain in another repo too?
→ Promote to ~/.agent/skills/<name>/ (machine-global)
→ Copy the skill folder there
Does my team keep repeating this workflow?
→ Promote to a shared repo or registry (shared)
→ Move the skill folder into the team's shared skills repo
当将技能从仓库本地升级到全局时:
SKILL.md 中移除任何仓库特定的路径或引用。进行任何更改(更新 AGENTS.md 或新增技能)后:
重新阅读更新后的文件。 它读起来清晰吗?一个新的智能体会话会从中受益吗?
检查矛盾。 新条目是否与任何现有内容冲突?
检查臃肿。 这个文件是否变得太长了?如果 AGENTS.md 超过约 200 行,请考虑:
* 归档不再相关的旧陷阱
* 将详细流程移到技能中
* 总结冗长的条目
提交更改 并附上清晰的消息:
docs: update AGENTS.md with <what you learned>
或
feat: add <skill-name> skill for <job description>
| ❌ 不要做 | ✅ 应该这样做 |
|---|---|
| 添加通用建议("编写干净的代码") | 添加仓库特定的规则("使用 pnpm,而不是 npm") |
| 为一次性任务创建技能 | 为你会再次执行的任务创建技能 |
让 AGENTS.md 无限增长 | 修剪过时的条目,将流程移到技能中 |
| 编写模糊的技能步骤("找出问题所在") | 编写具体的步骤("运行 npm test,读取第一个失败的断言") |
| 围绕工具创建技能 | 围绕要完成的工作创建技能 |
| 从共享/全局技能开始 | 从仓库本地开始,当痛点重复出现时再升级 |
Work on task
↓
Complete task
↓
Reflect: Did I wander? Get corrected? Repeat a workflow? Discover a gotcha?
↓
├── Navigation miss → Update Codebase Map
├── Behavior correction → Add to Local Norms / Guardrails
├── Repeated workflow → Create a Skill
├── Surprise discovery → Add to Patterns & Gotchas
└── Nothing notable → Move on
↓
Next task starts from a better baseline
"最有价值的技能是观察自己工作的习惯。" 每一次改进都让未来的改进变得更容易。这就是智能体如何实现复利。
每周安装量
276
仓库
首次出现
2026年2月14日
安全审计
安装于
opencode270
codex270
gemini-cli269
cursor269
github-copilot268
kimi-cli267
Did something surprise me? Did I discover a gotcha, a deprecated API, or a non-obvious coupling?
AGENTS.mdIs the AGENTS.md stale? Do the norms, entry points, or conventions no longer match the actual codebase?
If none of these apply, no action is needed. Don't create artifacts for the sake of it.
When updating AGENTS.md, follow these rules:
AGENTS.md.find or ls (not recursive full-tree) to see the actual top-level structure.Use this procedure when you've identified a repeatable workflow worth capturing.
Is it a multi-step procedure with a clear output?
→ YES → Skill
→ NO → AGENTS.md entry
Is it specific to HOW this repo works (norms, navigation)?
→ YES → AGENTS.md entry
→ NO → Skill
Am I unsure?
→ Start as an AGENTS.md entry. Promote to skill if it grows.
Choose a name. Use a verb-noun pattern reflecting the job: debug-ci, draft-release-notes, run-migration, etc.
Create the folder and file:
skills/<skill-name>/SKILL.md
Write the SKILL.md with this structure:
---
name: <skill-name>
description: <one-line description of what job this skill does>
---
# <Skill Name>
> **When to use:** <clear trigger condition>
## Steps
1. <Step 1 — be specific and imperative>
2. <Step 2>
3. ...
## Output Contract
<What "done" looks like. Be specific about format, location, and quality.>
Key principles for good skills:
skills/<name>/examples/)Add the new skill to the skills table in AGENTS.md:
| [<skill-name>](skills/<skill-name>/SKILL.md) | <purpose> | <trigger> |
If a skill needs deterministic execution (not just LLM judgment), add scripts:
skills/<skill-name>/
├── SKILL.md # The playbook (always required)
├── scripts/ # Helper scripts for deterministic steps
│ └── validate.sh
└── examples/ # Reference outputs showing "good" quality
└── example-output.md
Reference these from SKILL.md: "Run scripts/validate.sh to verify the output."
Does this skill only matter for THIS repo?
→ Keep it in skills/ within this repo (repo-local)
Have I felt this pain in another repo too?
→ Promote to ~/.agent/skills/<name>/ (machine-global)
→ Copy the skill folder there
Does my team keep repeating this workflow?
→ Promote to a shared repo or registry (shared)
→ Move the skill folder into the team's shared skills repo
When promoting a skill from repo-local to global:
After making any changes (AGENTS.md update or new skill):
Re-read the updated file. Does it read clearly? Would a fresh agent session benefit from it?
Check for contradictions. Does the new entry conflict with anything existing?
Check for bloat. Is this file getting too long? If AGENTS.md exceeds ~200 lines, consider:
Commit the changes with a clear message:
docs: update AGENTS.md with <what you learned>
or
feat: add <skill-name> skill for <job description>
| ❌ Don't | ✅ Do Instead |
|---|---|
| Add generic advice ("write clean code") | Add repo-specific rules ("use pnpm, not npm") |
| Create skills for one-off tasks | Create skills for tasks you'll do again |
| Let AGENTS.md grow unbounded | Prune stale entries, move procedures to skills |
| Write vague skill steps ("figure out what's wrong") | Write specific steps ("run npm test, read the first failing assertion") |
| Create a skill around a tool | Create a skill around a job to be done |
| Start with shared/global skills | Start repo-local, promote when pain repeats |
Work on task
↓
Complete task
↓
Reflect: Did I wander? Get corrected? Repeat a workflow? Discover a gotcha?
↓
├── Navigation miss → Update Codebase Map
├── Behavior correction → Add to Local Norms / Guardrails
├── Repeated workflow → Create a Skill
├── Surprise discovery → Add to Patterns & Gotchas
└── Nothing notable → Move on
↓
Next task starts from a better baseline
"The most valuable skill is the habit of watching yourself work." Each improvement makes future improvements easier. That's how agents compound.
Weekly Installs
276
Repository
First Seen
Feb 14, 2026
Security Audits
Installed on
opencode270
codex270
gemini-cli269
cursor269
github-copilot268
kimi-cli267
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
56,200 周安装