add-learning
Skill73 starsChanged 5 days agoApache-2.0View on GitHub
Add a new learning to the agent learnings file. Use when the user says /add-learning, asks to record a lesson, or when an implementation produced a reusable insight worth preserving for future agents.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- bump-rfcSkill
- closeoutSkill
- create-github-issueSkill
- create-planSkill
- create-pr-descriptionSkill
- fixSkill
- flag-compiler-bugSkill
- fleet-auditSkill
- hello-worldSkill
- loopSkill
- orchestrate-parallel-workSkill
- ralph-loopSkill
- review-and-fixSkill
- review-architectureSkill
- review-code-smellsSkill
- review-docs-claimsSkill
- review-incan-source-qualitySkill
- review-orchestrateSkill
- review-rfcSkill
- review-rust-proseSkill
- review-scopeSkill
- reviewSkill
- review-test-styleSkill
- start-workSkill
- testSkill
- write-commit-messageSkill
- write-rfcSkill
- yeet-prSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Add a learning when an implementation taught a durable, generalizable lesson that a future agent would get wrong without it.
- Very specific: line 27
Read .agents/learnings.md and determine which existing section the learning belongs in:
- Distinctive: line 39
If no existing section fits, create a new one with a descriptive heading.
- Distinctive: line 52
Keep it to 1-2 sentences. If it needs more, it might be too specific.
- Very specific: line 57
Add the bullet to the appropriate section in .agents/learnings.md.
- Distinctive: line 65
If an entry is stale (the file moved, the function was renamed, the described behavior changed), do not silently delete or rewrite it.
- Distinctive: line 72
If nothing in your quick check turns out stale, don't add noise — no need to annotate entries that are still accurate.
- Distinctive: line 76
Read back the file to confirm:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add Learning — Incan Project
When to use
Add a learning when an implementation taught a durable, generalizable lesson that a future agent would get wrong without it. Good learnings are:
- Pitfalls where code passes one stage but fails another
- Non-obvious wiring requirements (e.g., "if you change X, you must also update Y")
- Patterns that look correct but produce subtle bugs
- Architectural constraints that aren't obvious from the code alone
Do not add:
- Implementation details specific to a single feature that are already in the code
- API documentation (that belongs in rustdoc)
- Temporary workarounds or known bugs (those belong in GitHub issues)
Workflow
Step 1: Identify the right section
Read .agents/learnings.md and determine which existing section the learning belongs in:
| Section | Add here if the learning is about... |
| General pipeline pitfalls | Typechecker/lowering/emission interactions, Program struct, type display |
| Testing strategy | Which tests to write, test coverage gaps, snapshot patterns |
| Parser and lexer patterns | Token handling, bracket depth, warning infrastructure, soft keywords |
| Stdlib and registry patterns | STDLIB_NAMESPACES, stub vs wiring, runtime facades |
| Wiring: CLI and LSP | Warning surfacing, feature gates, command coverage |
| Generic bounds and extern functions | Bounds storage, extern diagnostics, shared helpers |
| Docs and RFC tooling | RFC graph maintenance, docs generators, index/reference regeneration |
If no existing section fits, create a new one with a descriptive heading.
Step 2: Write the learning
Format as a bold-label bullet:
- **Concept in 3-5 words**: Explanation of the insight, why it matters, and what goes wrong without it. Include the triggering context (RFC number, issue number) in parentheses if applicable.Guidelines:
- Lead with the principle, not the specific feature that taught it.
- Keep it to 1-2 sentences. If it needs more, it might be too specific.
- Include enough context that an agent can act on it without reading the original RFC/issue.
Step 3: Append to the file
Add the bullet to the appropriate section in .agents/learnings.md. Maintain alphabetical or logical ordering within the section.
Step 3.5: Spot-check 1-2 existing entries in the same section
.agents/learnings.md is never mechanically checked against the code it describes — the only thing that catches a stale learning is an agent noticing while already in that section. So do that noticing on purpose, every time:
- While you're in the section from Step 1, pick 1-2 other entries that name a concrete file path, function, struct, or pattern (not every entry does — skip pure-principle ones).
- Quickly confirm the named thing still exists and the described behavior still matches (a
grep/Readis usually enough — this is a spot-check, not a re-audit). If an entry is stale (the file moved, the function was renamed, the described behavior changed), do not silently delete or rewrite it. Mark it in place so the correction itself is visible:
- **Concept in 3-5 words**: ~~Original explanation~~ **[SUPERSEDED YYYY-MM-DD]**: what's true now, and why the original stopped applying (link the RFC/issue/commit that changed it if there is one).This keeps a record that the learning was wrong and got corrected — which is more useful to a future agent than a silent edit, and is itself worth an
/add-learningnote if the reason it went stale is a generalizable lesson on its own.- If nothing in your quick check turns out stale, don't add noise — no need to annotate entries that are still accurate.
Step 4: Verify
Read back the file to confirm:
- The new bullet is in the right section
- It doesn't duplicate an existing learning
- It's generalizable (would help with future work, not just the current task)
- Step 3.5 happened — either something got marked
[SUPERSEDED ...]or you confirmed the spot-checked entries are still accurate
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

