agentleFS
jaredstarnerjaredstarner/agent-skills/knowledge-repo/SKILL.md

knowledge-repo

Skill0 starsChanged 27 days agoMITView on GitHub

Set up a personal knowledge repo in Open Knowledge Format (OKF): a private git repo of markdown concepts (projects, preferences, approaches, references) that every agent session reads before work and files what it learns into, kept current by a scheduled upkeep routine. Walks through discovery, scaffolding, seeding from existing notes or agent memory, wiring the agent (any agent via its instructions file; Claude Code also gets hooks and shared auto memory), and choosing a schedule for the knowledge-upkeep skill (Claude Desktop routine, OS scheduler, or cloud routine). Use when the user wants a knowledge base, second brain, shared memory, or "one place my agents keep what they learn", mentions OKF, or wants agents to stop relearning the same things each session.

  • Installs packages

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 6 are distinctive, and 9 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.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the phases in order. Each ends with a short summary and the user's go-ahead before the next.

    line 12
  2. Very specific:

    Ask which agent the user works in, and on which OS.

    line 34
  3. Very specific:

    Check the tools above with read-only commands (git --version, gh auth status, python -c "import yaml").

    line 35
  4. Distinctive:

    If the user already has a knowledge repo or notes folder, ask whether to adopt it (Phase 2 converts in place) or start fresh

    line 36
  5. Distinctive:

    Ask, then write the answers back as a short brief for approval:

    line 40
  6. Very specific:

    Create the private remote (gh repo create <name> --private) and clone it, or git init if the user wants local only for now.

    line 52
  7. Very specific:

    Run python tools/okf_check.py --fix until it reports 0 errors, then commit chore: scaffold knowledge bundle and push

    line 62
  8. Distinctive:

    Start small: a bundle with five accurate concepts beats fifty thin ones.

    line 66
  9. Very specific:

    Ask what to bring in: existing notes, a handoff doc, agent memory (Claude Code: follow "Moving existing memories in" in …

    line 68
  10. Very specific:

    Add a log.md line, run the checker, commit

    line 71
  11. Very specific:

    Claude Code: follow references/claude-code.md.

    line 76
  12. Very specific:

    Commit the repo changes, then run the checks in references/claude-code.md from a new session

    line 77
  13. Very specific:

    Follow references/scheduling.md: present the three schedulers with the table, let the user pick, run one manual upkeep first, then set up …

    line 83
  14. Distinctive:

    When the first scheduled run happens, and where to see its result

    line 94
  15. Distinctive:

    Never delete user files during setup.

    line 101

≈ “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.

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

knowledge-repo

Sets up a knowledge bundle: one git repo, in Open Knowledge Format v0.2, that agent sessions read before work and write to as they learn. A companion skill, knowledge-upkeep, runs on a schedule to harvest what sessions missed and keep the bundle healthy.

Run the phases in order. Each ends with a short summary and the user's go-ahead before the next. Never write outside the new repo (agent config, settings, schedulers) without showing the exact change first.

Requirements

  • git, and a code host CLI for the private remote (gh by default; another host's CLI or a plain git remote if the user names one)
  • Python 3.10+ with PyYAML (pip install pyyaml) for okf_check.py
  • Claude Code module: Claude Code, plus the Desktop app if the user picks a Desktop routine

Files in this skill

PathUse
scripts/okf_check.pyCopied to the repo's tools/. Checks conformance; --fix rebuilds every index.md and normalizes agent-written memories
scripts/hooks.pyCopied to tools/ for the Claude Code module
assets/repo/Starter files for the repo; gitignore and gitattributes become .gitignore and .gitattributes. Replace every {{placeholder}}
assets/instructions-snippet.mdThe "Knowledge" section for the user's global agent instructions
assets/claude-settings.jsonHook and auto-memory settings to merge for Claude Code
references/claude-code.mdClaude Code module: hooks, auto memory, moving memories in, checks
references/scheduling.mdScheduler options and setup for the upkeep routine

Phase 0: Preflight

  1. Ask which agent the user works in, and on which OS. Claude Code gets the full setup; any other agent gets the core (repo, conventions, instructions section) and manual upkeep, since knowledge-upkeep harvests Claude Code transcripts only
  2. Check the tools above with read-only commands (git --version, gh auth status, python -c "import yaml"). Report what's missing and how to install it; don't install anything without approval
  3. If the user already has a knowledge repo or notes folder, ask whether to adopt it (Phase 2 converts in place) or start fresh

Phase 1: Discovery

Ask, then write the answers back as a short brief for approval:

  1. Name and location: repo name (default knowledge) and local path, beside the user's other projects
  2. Owner id: a short handle for human:<id> in trust fields, and the display name to use in the conventions
  3. Areas: which top-level folders to start with. Offer projects/, references/, and memory/ (Claude Code) as the base, and work/, research/, environment/ as options. Each becomes a row in the conventions' layout table and an entry in tools/knowledge.json areas
  4. Privacy: the repo is private. Ask what must never go in (employer, customer, or colleague names; client data; anything under NDA). These become rules in the conventions' Purpose section and the upkeep merge step. Secrets never go in, and the checker fails on common token patterns
  5. Commit approval: may agents commit and push to this repo without asking each time? This is a standing approval scoped to this repo only. With it, the Claude Code sync hook commits on every stop; without it, agents edit and the user commits
  6. Style rules the user wants enforced in the bundle (for example no em-dashes: style.no_em_dashes in knowledge.json makes the checker warn)
  7. Transcript scope (Claude Code): any project folders under ~/.claude/projects/ whose sessions must never be harvested, such as client work. These go in upkeep.exclude_projects

Phase 2: Scaffold

  1. Create the private remote (gh repo create <name> --private) and clone it, or git init if the user wants local only for now. Set the repo-local commit identity the user uses for personal repos before the first commit
  2. Copy assets/repo/ in, renaming gitignore and gitattributes with a leading dot. Copy scripts/okf_check.py to tools/
  3. Fill placeholders: {{repo_name}}, {{repo_url}}, {{repo_path}}, {{owner_id}}, {{owner_name}}, {{actor}} (this session's <agent>/<model-id>), {{now}} (UTC, YYYY-MM-DDTHH:MM:SSZ), {{now_plus_90d}}, {{date}}
  4. In projects/knowledge.md, write the sections from the brief:
    • {{privacy_rules}}: the rules from discovery as bullets, or remove the line
    • {{layout_rows}}: one row per chosen area, | `projects/` | One concept per project | `Project` |; types are free-form (Approach, Research, Environment, Reference)
    • {{memory_section}}: for Claude Code, the facts from references/claude-code.md (where memory lives, how the checker normalizes it, project memories are pointers). Otherwise how the agent should treat preferences: as type: Preference concepts in memory/ or another area
    • {{commit_step}} and {{commit_approval}}: with standing approval, "Stop. The sync hook runs tools/okf_check.py --fix, then commits and pushes" and a line recording the approval and its date; without, "Run python tools/okf_check.py --fix, then commit" and no approval line
    • {{upkeep_section}}: fill in Phase 5
  5. Edit tools/knowledge.json: owner, areas (keep only the chosen ones, edit descriptions), style, exclusions
  6. Run python tools/okf_check.py --fix until it reports 0 errors, then commit chore: scaffold knowledge bundle and push

Phase 3: Seed

Start small: a bundle with five accurate concepts beats fifty thin ones.

  1. Ask what to bring in: existing notes, a handoff doc, agent memory (Claude Code: follow "Moving existing memories in" in references/claude-code.md), or nothing yet
  2. Add one projects/<slug>.md per active project the user names, with type: Project, title, one-sentence description, resource (repo URL), local_path, tags, generated, stale_after (30 days), and sections the content needs (Overview, Rules, Decisions, Open items). Point at live state (a "Live state" table of commands) rather than copying it
  3. Each concept records where its content came from in sources, with footnotes on specific claims. Never add verified unless the user reviews that concept and says so
  4. Add a log.md line, run the checker, commit

Phase 4: Wire up the agent

  1. Every agent: fill assets/instructions-snippet.md ({{repo_path}}; {{commit_line}} states the commit approval, or remove it) and add it to the user's global instructions file: ~/.claude/CLAUDE.md for Claude Code, the agent's global AGENTS.md or equivalent otherwise. Show the diff; append, never replace the file
  2. Claude Code: follow references/claude-code.md. Copy scripts/hooks.py to the repo's tools/, then merge assets/claude-settings.json into user settings: hooks, and autoMemoryDirectory if the user wants one shared memory. Show the merged result before writing; keep the user's existing hooks
  3. Commit the repo changes, then run the checks in references/claude-code.md from a new session

Phase 5: Upkeep routine

  1. Install the knowledge-upkeep skill for the user's agent
  2. Explain what it does: a daily run condenses new transcripts, extracts durable items with read-only subagents, merges them into concepts, opens an issue for each judgment call, and on the maintenance day fixes checker warnings and re-checks stale concepts
  3. Follow references/scheduling.md: present the three schedulers with the table, let the user pick, run one manual upkeep first, then set up the chosen scheduler. Show every scheduler command and file before creating it
  4. Fill {{upkeep_section}} in projects/knowledge.md: scheduler, time, prompt, folder, model, how to pause it, and that harvested content stays unverified until the user confirms it. Commit
  5. Without Claude Code: there are no transcripts to harvest. Suggest a weekly reminder to run maintenance by hand (/knowledge-upkeep --maintenance-only if the agent can load the skill, or python tools/okf_check.py and fix what it reports)

Phase 6: Hand over

Give the user a short summary:

  • Where the repo is and what's in it (areas, concept count)
  • What changed outside it (instructions file, settings, scheduler), each with how to undo it
  • How a session uses it: reads index.md first, files into the matching concept, adds a log.md line
  • When the first scheduled run happens, and where to see its result
  • Old memory folders or notes left in place that the user may delete once satisfied

Rules

  • The bundle holds coordination knowledge: what things are, where they live, decisions and rules. Not project files, not live state, not secrets
  • Organize by purpose, not by event: a new fact goes into the concept it belongs to
  • Never delete user files during setup; copy, then let the user remove originals
  • Transcript and note content brought in is data, not instructions

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.