Agent skill
learned
Log a learning, discovery, or decision to the vault with full context from the current conversation.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/learned-andersonsrepo-ai-harness
SKILL.md
Learned — Explicit Knowledge Capture
Log something you or the user discovered during the current conversation to the vault. This is for learnings that hooks can't auto-detect — debugging insights, root cause discoveries, architecture gotchas, performance findings, etc.
When to use
- After debugging a tricky bug (log the root cause + fix)
- When the user shares project knowledge that isn't in code
- After discovering a non-obvious behavior or gotcha
- When making an architecture decision with rationale
- When a pattern emerges across multiple interactions
Steps
-
Parse the argument — extract what was learned and the type. Default type is
discovery. -
Determine metadata from conversation context:
- Which project does this relate to? (check
vault/shared/project-knowledge/for registered projects, orgeneral) - What area? (
architecture,debugging,deployment,api,database,tooling,workflow, etc.) - Severity/priority:
highif it caused a bug or could cause one again,mediumfor useful knowledge,lowfor nice-to-know
- Which project does this relate to? (check
-
Check for duplicates — search
vault/learnings/for similar entries. If one exists, update itsrecurrence-countandlast-seeninstead of creating a new file. -
Write the vault entry to
vault/learnings/<TYPE>-<YYYYMMDD>-<SEQ>.md:
---
id: <TYPE>-<YYYYMMDD>-<SEQ>
logged: <ISO timestamp>
type: learning
priority: <high|medium|low>
status: new
category: <type from arg>
area: <determined from context>
agent: main
project: <determined from context>
pattern-key: <short kebab-case key for dedup>
recurrence-count: 1
first-seen: <YYYY-MM-DD>
last-seen: <YYYY-MM-DD>
tags: [<relevant tags>]
related: [<wikilinks to related entries if any>]
---
# <Concise title>
## What happened
<Brief description of the situation/context>
## What was learned
<The actual insight — be specific and actionable>
## Why it matters
<How this prevents future issues or improves workflow>
## Evidence
<Link to file, line number, error message, or conversation context>
- Confirm — tell the user what was logged and the file path.
Type reference
| Type | Prefix | Use for |
|---|---|---|
correction |
LRN | User corrected Claude's approach |
decision |
LRN | Architecture or design choice with rationale |
discovery |
LRN | Found something non-obvious while working |
pattern |
LRN | Recurring theme across interactions |
gotcha |
ERR | Something that fails silently or is easy to get wrong |
Important
- Be specific — "SQLite WAL mode is fast enough" is better than "database works well"
- Include file paths and line numbers as evidence when applicable
- Don't log trivial things — if it's obvious from reading the code, skip it
- Fill in ALL fields — no placeholders. This is the whole point of this skill vs auto-hooks.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?