Loading...
Loading...
Meta-skill for making the agent self-improving. Covers updating AGENTS.md, creating new skills from repeated workflows, and deciding what to systematize. Invoke after completing tasks, when noticing repeated friction, or at session end.
npx skill4agent add grail-computer/self-improving-agent self-improving-agentWhen 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
AGENTS.mdAGENTS.mdAGENTS.mdAGENTS.mdAGENTS.mdfindlsIs 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-cidraft-release-notesrun-migrationskills/<skill-name>/SKILL.md---
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.>skills/<name>/examples/AGENTS.md| [<skill-name>](skills/<skill-name>/SKILL.md) | <purpose> | <trigger> |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.mdscripts/validate.shDoes 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 repodocs: update AGENTS.md with <what you learned>feat: add <skill-name> skill for <job description>| ❌ Don't | ✅ Do Instead |
|---|---|
| Add generic advice ("write clean code") | Add repo-specific rules ("use |
| 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 |
| 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.