sova-extract-knowledge
Skill3 starsChanged 5 days agoApache-2.0View on GitHub
Extract reusable knowledge from this session into the project's knowledge system.
In this repository44 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- dashboard-designSkill
- database-patternsSkill
- design-systemSkill
- design-tasteSkill
- issue-templateSkill
- sova-address-prSkill
- sova-after-mergeSkill
- sova-agent-readinessSkill
- sova-audit-instructionsSkill
- sova-debugSkill
- sova-develop-explainSkill
- sova-develop-fullSkill
- sova-developSkill
- sova-find-taskSkill
- sova-health-auditSkill
- sova-ingest-reviewSkill
- sova-integrate-prSkill
- sova-issueSkill
- sova-new-featureSkill
- sova-optimize-knowledgeSkill
- sova-prSkill
- sova-rearrange-commitsSkill
- sova-researchSkill
- sova-review-fullSkill
- sova-review-prSkill
- sova-reviewSkill
- sova-simplifySkill
- sova-specSkill
- sova-standupSkill
- sova-statusSkill
- sova-testSkill
- sova-update-docsSkill
- testing-patternsSkill
- visual-auditSkill
- dashboard-designSkill
- database-patternsSkill
- design-tasteSkill
- issue-templateSkill
- testing-patternsSkill
- visual-auditSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 13 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Always write Tier 2 files in the PRIMARY checkout (git rev-parse --git-common-dir resolves it from a worktree): .claude/agent-memory/ may …
- Distinctive: line 36
Run git diff and git diff --cached to see current changes.
- Distinctive: line 53
Read the target file
- Distinctive: line 54
Check for existing entries about the same topic
- Distinctive: line 55
Update existing entries rather than adding duplicates
- Distinctive: line 56
Remove entries that are now outdated or wrong
- Distinctive: line 61
Follow the existing structure and formatting of the target file
- Distinctive: line 62
Write concise entries with bold labels, then the lesson
- Very specific: line 71
Follow the two-step process: write topic file, then update MEMORY.md index
- Distinctive: line 72
Only for genuinely new user preferences or workflow changes
- Very specific: line 80
If a pattern has matured from agent-memory into a stable convention, promote it to the appropriate .claude/rules/*.md file and remove the …
- Very specific: line 100
Broader assessment: Run the sova-agent-readiness skill to evaluate the full knowledge system
- Distinctive: line 104
Only save confirmed, stable patterns, not one-off debugging notes
- Distinctive: line 105
Update existing entries when the pattern evolved
- Distinctive: line 106
Keep entries actionable: someone reading them should know exactly what to do
- Distinctive: line 107
No session-specific context (task details, in-progress work)
- Distinctive: line 109
NEVER use emojis in any output
≈ “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
Extract Knowledge
Review this session's work and extract reusable knowledge into the project's knowledge system.
Knowledge Architecture
This project uses a four-tier knowledge system:
Tier 0: ~/.claude/shared-knowledge/ (cross-project patterns)
Reusable patterns that apply across multiple repositories. Loaded by agent startup scripts.
Tier 1: .claude/rules/*.md (project rules, always loaded)
Stable patterns loaded into every session via CLAUDE.md. Primary destination for confirmed conventions that apply to all contributors (human and agent).
Tier 2: .claude/agent-memory/ (agent learnings)
Lessons learned from development and review cycles. Destination for agent-specific patterns not yet promoted to Tier 1.
MEMORY.md: index file (if the project has one)cookbook/<domain>.md(index incookbook/README.md), or a singlecookbook.mdin smaller projects: topical knowledge by domain, one bullet per lesson with(PR #N; confirmed: N)common-mistakes.md: recurring mistakes with(occurrences: N), checked against every diff by thesova-reviewskill
Always write Tier 2 files in the PRIMARY checkout (git rev-parse --git-common-dir resolves it from a worktree): .claude/agent-memory/ may be gitignored, and a worktree's copy is deleted with the worktree.
Tier 3: User auto-memory (~/.claude/projects/.../memory/)
User preferences, workflow conventions, and project state.
Steps
1. Identify What Changed
Run git diff and git diff --cached to see current changes. Also review the conversation for patterns, gotchas, decisions, and fixes that came up during the session.
2. Categorize Findings
For each finding, determine the right destination:
| Finding type | Destination |
| Domain-specific patterns (security, performance, etc.) | .claude/rules/<domain>.md |
| ORM/framework gotchas, review lessons | the matching .claude/agent-memory/cookbook/<domain>.md (or the section of cookbook.md) |
| Recurring mistakes | .claude/agent-memory/common-mistakes.md |
| Agent workflow or project pattern changes | .claude/agent-memory/MEMORY.md |
| User preferences, workflow, collaboration style | User auto-memory |
3. Check for Duplicates
Before writing anything:
- Read the target file
- Check for existing entries about the same topic
- Update existing entries rather than adding duplicates
- Remove entries that are now outdated or wrong
4. Write Knowledge
For .claude/rules/*.md (Tier 1):
- Follow the existing structure and formatting of the target file
- Write concise entries with bold labels, then the lesson
- These are always loaded, so keep entries actionable and specific to this project
For .claude/agent-memory/ (Tier 2):
- One line per pattern: bold label, then the lesson
- Include the "why": not just what to do, but why it matters
- Include file paths when relevant
For user auto-memory (Tier 3):
- Follow the two-step process: write topic file, then update
MEMORY.mdindex - Only for genuinely new user preferences or workflow changes
5. Verify Sizes
Agent memory files should stay concise:
MEMORY.md: under 20 lines (index only)- Each cookbook file (or a single
cookbook.md): under 200 lines and about 40 KB, since agents read whole files. Entries stay one bullet of at most ~500 characters; the incident narrative belongs in the PR, not the cookbook. When a domain file outgrows that, prune stale entries (verify against the code first), drop entries that are now enforced by a test or invariant, and promote confirmed ones; split a singlecookbook.mdintocookbook/<domain>.mdfiles once it outgrows the limit.
If a pattern has matured from agent-memory into a stable convention, promote it to the appropriate .claude/rules/*.md file and remove the agent-memory entry.
6. Summary
List what was extracted and where it was saved. Flag any patterns promoted from Tier 2 to Tier 1.
What to Look For
- Bugs fixed: root cause, how to avoid next time
- Performance issues: the pattern used to fix them
- Permission/auth issues: framework quirks, permission patterns
- Migration gotchas: schema vs data, deployment considerations
- ORM/framework patterns: query tricks, validation edge cases
- Test patterns: new fixtures, assertion techniques, edge case coverage
- Review feedback: what reviewers flagged and why
- Recurring mistakes: same issue appearing in multiple sessions
Cross-References
- Called by: the
sova-reviewskill (Step 9). Thesova-integrate-prskill then verifies, before merging, that review learnings were captured (its Documentation and Knowledge phase) - Broader assessment: Run the
sova-agent-readinessskill to evaluate the full knowledge system
Rules
- Only save confirmed, stable patterns, not one-off debugging notes
- Update existing entries when the pattern evolved
- Keep entries actionable: someone reading them should know exactly what to do
- No session-specific context (task details, in-progress work)
- Promote mature patterns from agent-memory to
.claude/rules/*.md - NEVER use emojis in any output
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.

