learn
Capture corrections and patterns as reusable knowledge. Routes to the right instruction file. Use when patterns repeat 3+ times or to save insights. NOT for one-time fixes or code review.
Capture corrections and patterns as reusable knowledge. Routes to the right instruction file. Use when patterns repeat 3+ times or to save insights. NOT for one-time fixes or code review.
Quick Start
Install:
npx skills add github:wyattowalsh/agents --skill learn -y -g --agent antigravity --agent claude-code --agent codex --agent crush --agent cursor --agent gemini-cli --agent github-copilot --agent grok --agent opencode Use: /learn [correction or insight to capture]
Works with Claude Code, Gemini CLI, OpenCode, and other agentskills.io-compatible agents.
What It Does
Section titled “What It Does”Record corrections, insights, and patterns. Route them to the correct instruction file. Apply kaizen principles to keep instructions lean and effective.
$ARGUMENTS | Action |
|---|---|
"<correction text>" | Route correction to appropriate instruction file |
review | Show pending learnings and their frequency |
promote | Promote high-frequency learnings (3+ occurrences) to instruction files |
audit | Check for stale, contradictory, or duplicate learnings |
| Empty | Display usage summary |
Verification Checklist
Section titled “Verification Checklist”- Verify against actual practice — confirm the pattern reflects real usage
- Check for contradictions with existing instructions
- Assess token impact — keep always-loaded content minimal
- Get user approval — never modify instruction files without consent
- Test the change — run
python scripts/check.pyafter any instruction file edit
Critical Rules
Section titled “Critical Rules”- Never modify instruction files without explicit user approval
- Require 3+ corrections across 2+ sessions before promoting
- Check for contradictions with existing instructions
- Route to narrowest applicable scope (rule before skill, skill before global)
- Keep always-loaded content under token budget
- Run
python scripts/check.pyafter every instruction file modification - Prefer hooks/rules over prose (poka-yoke principle)
Routing Protocol
Section titled “Routing Protocol”Route proposed updates to the correct target:
| Scope | Target |
|---|---|
| Cross-project conventions | instructions/global.md |
| Language-specific tooling | Convention skill (python-conventions, etc.) |
| Orchestration/parallelism | orchestrator skill body |
| Project-specific standards | Project’s AGENTS.md |
| File-scoped enforcement | .claude/rules/<topic>.md |
| Skill behavior | The skill’s own SKILL.md |
Routing Decision Steps
Section titled “Routing Decision Steps”- Determine the scope: does this apply to all projects or just one?
- If cross-project, does it relate to a specific language or tool?
- If language-specific, route to the corresponding convention skill
- If general, route to
instructions/global.md - If project-only, route to the project’s
AGENTS.md - If file-scoped enforcement only, create a
.claude/rules/entry
Kaizen Principles
Section titled “Kaizen Principles”-
Step — Incremental > revolutionary — Smallest viable change, verify before next
-
Step — Poka-yoke — Prefer hooks/tooling over prose instructions (error-proof by design)
-
Step — Standards work — Follow existing patterns, document what works
-
Step — JIT — Build only what is needed, optimize when measured
Canonical Terms
Section titled “Canonical Terms”instruction file— any file that provides agent instructions (global.md, AGENTS.md, SKILL.md)routing— the process of choosing the correct target file for a changecorrection pattern— a repeated fix that indicates a missing or wrong instructiontoken budget— the limit on always-loaded instruction contentscope— cross-project, language-specific, orchestration, project-specific, or file-scoped
Validation Contract
Section titled “Validation Contract”Run from this skill directory before declaring changes complete:
python scripts/check.pyCompletion criteria:
scripts/check.pyexits 0.- No portable-CLI violations remain under this skill directory.
| Field | Value |
|---|---|
| Source Type | repo-owned |
| Display Source | github:wyattowalsh/agents |
| Source Kind | repo |
| Installability | portable command |
| Review State | reviewed |
| Target Agents | antigravity, claude-code, codex, crush, cursor, gemini-cli, github-copilot, grok, opencode |
| Field | Value |
|---|---|
| Name | learn |
| License | MIT |
| Version | 1.0.0 |
| Author | wyattowalsh |
| Field | Value |
|---|---|
| Argument Hint | [correction or insight to capture] |
Related Skills
Section titled “Related Skills”View Full SKILL.md
---name: learndescription: >- Capture corrections and patterns as reusable knowledge. Routes to the right instruction file. Use when patterns repeat 3+ times or to save insights. NOT for one-time fixes or code review.argument-hint: "[correction or insight to capture]"user-invocable: truedisable-model-invocation: falselicense: MITmetadata: author: wyattowalsh version: "1.0.0"---
# Learn — Capture and Route Project Knowledge
Record corrections, insights, and patterns. Route them to the correct instruction file. Apply kaizen principles to keep instructions lean and effective.
## Dispatch
| `$ARGUMENTS` | Action ||---|---|| `"<correction text>"` | Route correction to appropriate instruction file || `review` | Show pending learnings and their frequency || `promote` | Promote high-frequency learnings (3+ occurrences) to instruction files || `audit` | Check for stale, contradictory, or duplicate learnings || Empty | Display usage summary |
## References
| File | Purpose ||------|---------|| `references/routing-rules.md` | Decision tree for where to route instruction changes || `references/kaizen-principles.md` | Error-proofing patterns, when to use hooks vs prose vs rules |
## Routing Protocol
Route proposed updates to the correct target:
| Scope | Target ||-------|--------|| Cross-project conventions | `instructions/global.md` || Language-specific tooling | Convention skill (`python-conventions`, etc.) || Orchestration/parallelism | `orchestrator` skill body || Project-specific standards | Project's `AGENTS.md` || File-scoped enforcement | `.claude/rules/<topic>.md` || Skill behavior | The skill's own `SKILL.md` |
### Routing Decision Steps
1. Determine the scope: does this apply to all projects or just one?2. If cross-project, does it relate to a specific language or tool?3. If language-specific, route to the corresponding convention skill4. If general, route to `instructions/global.md`5. If project-only, route to the project's `AGENTS.md`6. If file-scoped enforcement only, create a `.claude/rules/` entry
## Kaizen Principles
1. **Incremental > revolutionary** — Smallest viable change, verify before next2. **Poka-yoke** — Prefer hooks/tooling over prose instructions (error-proof by design)3. **Standards work** — Follow existing patterns, document what works4. **JIT** — Build only what is needed, optimize when measured
## Verification Checklist
1. Verify against actual practice — confirm the pattern reflects real usage2. Check for contradictions with existing instructions3. Assess token impact — keep always-loaded content minimal4. Get user approval — never modify instruction files without consent5. Test the change — run `python scripts/check.py` after any instruction file edit
## Critical Rules
1. Never modify instruction files without explicit user approval2. Require 3+ corrections across 2+ sessions before promoting3. Check for contradictions with existing instructions4. Route to narrowest applicable scope (rule before skill, skill before global)5. Keep always-loaded content under token budget6. Run `python scripts/check.py` after every instruction file modification7. Prefer hooks/rules over prose (poka-yoke principle)
## Canonical Terms
- `instruction file` — any file that provides agent instructions (global.md, AGENTS.md, SKILL.md)- `routing` — the process of choosing the correct target file for a change- `correction pattern` — a repeated fix that indicates a missing or wrong instruction- `token budget` — the limit on always-loaded instruction content- `scope` — cross-project, language-specific, orchestration, project-specific, or file-scoped
## Validation Contract
Run from this skill directory before declaring changes complete:
```bashpython scripts/check.py```
Completion criteria:
1. `scripts/check.py` exits 0.2. No portable-CLI violations remain under this skill directory.