agentleFS
xsovad06xsovad06/sova/.agents/skills/source-command-extract-knowledge/SKILL.md

source-command-extract-knowledge

Skill2 starsChanged 3 months agoApache-2.0View on GitHub

Extract reusable knowledge from this session into the project's knowledge system.

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. About 0 are common, 12 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    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
  1. Very specific:

    Use this skill when the user asks to run the migrated source command extract-knowledge.

    line 8
  2. Distinctive:

    Run git diff and git diff --cached to see current changes.

    line 39
  3. Distinctive:

    Read the target file

    line 55
  4. Distinctive:

    Check for existing entries about the same topic

    line 56
  5. Distinctive:

    Update existing entries rather than adding duplicates

    line 57
  6. Distinctive:

    Remove entries that are now outdated or wrong

    line 58
  7. Distinctive:

    Follow the existing structure and formatting of the target file.

    line 63
  8. Very specific:

    Follow the two-step process: write topic file, then update MEMORY.md index

    line 71
  9. Distinctive:

    Only for genuinely new user preferences or workflow changes

    line 72
  10. Very specific:

    If a pattern has matured from agent-memory into a stable convention, promote it to the appropriate .Codex/rules/*.md file and remove the …

    line 80
  11. Very specific:

    Broader assessment: Run /agent-readiness to evaluate the full knowledge system

    line 100
  12. Distinctive:

    Only save confirmed, stable patterns: not one-off debugging notes

    line 104
  13. Distinctive:

    Update existing entries when the pattern evolved

    line 105
  14. Distinctive:

    Keep entries actionable: someone reading them should know exactly what to do

    line 106
  15. Distinctive:

    No session-specific context (task details, in-progress work)

    line 107
  16. Distinctive:

    NEVER use emojis in any output

    line 109

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

source-command-extract-knowledge

Use this skill when the user asks to run the migrated source command extract-knowledge.

Command Template

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: ~/.Codex/shared-knowledge/ (cross-project patterns)

Reusable patterns that apply across multiple repositories. Loaded by agent startup scripts.

Tier 1: .Codex/rules/*.md (canonical, always loaded via AGENTS.md)

Stable patterns loaded into every session via AGENTS.md. Primary destination for confirmed conventions.

Tier 2: .Codex/agent-memory/ (agent learnings, loaded by morning agent)

Lessons learned from development and review cycles. Destination for agent-specific patterns that improve autonomous development quality.

  • MEMORY.md: Index file
  • cookbook.md: Topical knowledge by domain, common mistakes with occurrence counts

Tier 3: User auto-memory (~/.Codex/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 typeDestination
Domain-specific patterns (security, performance, etc.).Codex/rules/<domain>.md
ORM/framework gotchas, review lessons, recurring mistakes.Codex/agent-memory/cookbook.md (under matching domain section)
Agent workflow or project pattern changes.Codex/agent-memory/MEMORY.md
User preferences, workflow, collaboration styleUser auto-memory

3. Check for Duplicates

Before writing anything:

  1. Read the target file
  2. Check for existing entries about the same topic
  3. Update existing entries rather than adding duplicates
  4. Remove entries that are now outdated or wrong

4. Write Knowledge

For .Codex/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: keep entries actionable and specific to this project.

For .Codex/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.md index
  • 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)
  • cookbook.md: under 200 lines (prune oldest [confirmed: 0] entries if needed)

If a pattern has matured from agent-memory into a stable convention, promote it to the appropriate .Codex/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: /review (Step 9) and /after-merge (post-merge learning)
  • Broader assessment: Run /agent-readiness 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 .Codex/rules/*.md
  • NEVER use emojis in any output

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.