sova-optimize-knowledge
Skill3 starsChanged 4 days agoApache-2.0View on GitHub
Analyze all knowledge, memories, and skills for quality gaps, staleness, and optimization opportunities.
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-extract-knowledgeSkill
- sova-find-taskSkill
- sova-health-auditSkill
- sova-ingest-reviewSkill
- sova-integrate-prSkill
- sova-issueSkill
- sova-new-featureSkill
- 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
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 51
Read ALL discovered files.
- Distinctive: line 59
Could it prevent a class of bugs?: If yes, it belongs as a pre-flight check in the relevant skill.
- Distinctive: line 69
Is it still true?: Verify claims about file paths, function names, branch names against current code.
- Distinctive: line 75
Check each layer for:
- Distinctive: line 111
Update skill files with approved improvements
- Distinctive: line 116
Verify all files are within size guidelines
- Very specific: line 120
If the arguments provided when this skill is invoked specifies a focus area (e.g., "skills only", "cleanup only", "specific domain"), limit …
- Distinctive: line 124
Do NOT delete knowledge without verifying it's obsolete: check current code
- Distinctive: line 125
Do NOT bloat skills with boilerplate: keep additions concise and actionable
- Distinctive: line 129
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
Optimize Knowledge System
Audit the entire project knowledge system for this project. Find gaps between what's known and what's enforced, prune stale entries, and embed lessons into skills.
Focus: the arguments provided when this skill is invoked
Instructions
Phase 1: Discover and Read
Auto-discover all knowledge layers. Read every file found.
Layer 1: Shared knowledge (cross-project):
ls ~/.claude/shared-knowledge/*.md 2>/dev/nullLayer 2: Project rules (stable patterns):
ls .claude/rules/*.md 2>/dev/nullLayer 3: Agent memory (accumulated learnings):
ls .claude/agent-memory/*.md 2>/dev/nullLayer 4: Auto-memory (user preferences, feedback, project state):
# Find the project memory directory
find ~/.claude/projects/ -maxdepth 2 -name "MEMORY.md" -path "*/memory/*" 2>/dev/null
# Then list all files in that directoryLayer 5: Skills/commands:
ls .claude/commands/*.md 2>/dev/null
ls ~/.claude/commands/*.md 2>/dev/nullLayer 6: Project instructions:
cat CLAUDE.md 2>/dev/null | head -5Read ALL discovered files. Skip binary files and files over 500 lines (summarize those instead).
Phase 2: Cross-Reference Analysis
2a. Knowledge vs Skills (gap detection)
For each feedback memory and cookbook/learnings entry:
- Is it enforced in any skill? A "never do X" that no skill checks for is a gap waiting to bite.
- Could it prevent a class of bugs? If yes, it belongs as a pre-flight check in the relevant skill.
For each skill:
- Does it miss patterns from the knowledge system? Cookbook says "check X before Y" but the skill doesn't.
- Does it reference outdated things? Old branch names, deprecated tools, removed workflows.
- Does it have error recovery gaps? What happens when a step fails?
2b. Staleness check
For each knowledge entry:
- Is it still true? Verify claims about file paths, function names, branch names against current code.
- Is it too specific? One-time fixes that will never recur don't belong in long-term memory.
- Is it duplicated? Same lesson in multiple layers, so consolidate to the most appropriate layer.
2c. Layer health
Check each layer for:
- Size: agent-memory files should be under 200 lines each. Project memories should be concise.
- Empty stubs: files with just a header and no content, so delete them.
- Orphaned references: MEMORY.md links to files that don't exist.
Phase 3: Report
Organize findings into three sections:
A. Skill Improvements
For each finding:
- Which skill to modify
- What to add/change (be specific and include the text)
- Which knowledge source backs this up
- Expected impact (prevents bug class / improves consistency / removes friction)
Prioritize by impact: bug prevention > consistency > ergonomics.
B. Knowledge Cleanup
- Merge: files covering the same topic across layers
- Promote: cookbook entries confirmed 2+ times that should move to rules
- Prune: stale, too-specific, or duplicated entries
- Delete: empty stubs and orphaned files
C. Missing Knowledge
- Patterns implicitly followed but not documented
- Error classes that recur but aren't captured
- Skill interactions worth documenting (e.g., "always run X before Y")
Phase 4: Implement (with approval)
Present the full report. Wait for user to approve specific items. Then:
- Update skill files with approved improvements
- Clean up knowledge files (merge, deduplicate, prune)
- Promote confirmed patterns to the right layer
- Remove stale entries
- Delete empty stubs
- Verify all files are within size guidelines
Scope Control
If the arguments provided when this skill is invoked specifies a focus area (e.g., "skills only", "cleanup only", "specific domain"), limit the audit to that area. Otherwise, do the full audit.
Rules
- Do NOT delete knowledge without verifying it's obsolete: check current code
- Do NOT bloat skills with boilerplate: keep additions concise and actionable
- Prioritize by real impact, not completeness
- The goal is better Claude output, not more documentation
- Present findings before making changes: never auto-implement
- 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.

