agentleFS
nada-rnada-r/agent-template/.claude/skills/knowledge-base/SKILL.md

knowledge-base

Skill0 starsChanged 4 months agoMITView on GitHub

Graduate project memory from markdown files to a queryable SQLite knowledge base. Use when MEMORY.md exceeds its ~200-line cap despite pruning, ERRORS.md grows past grep-friendliness (~50KB), or cross-cutting queries are needed. Do NOT use while the markdown files are under their caps - files stay the default.

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use standup, orchestrator and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    standup

    Generate a standup update from recent activity. Use when preparing for daily standup, summarizing yesterday's commits and PRs and ticket moves, formatting work into yesterday/today/blockers, or structuring a few rough notes into a shareable update.

    Also in 3 projects that use this

  • tesla0225Skill

    orchestrator

    Issue/要件を受けたら分解→担当割当→実装→検証→統合を回す手順。未整備なら /repo-init でbootstrap。

    Also in 3 projects that use this

  • Microsoft AzureSkill

    skill-authoring

    Write Agent Skills that comply with the agentskills.io specification. WHEN: "create a skill", "new skill", "write a skill", "skill template", "skill structure", "review skill", "skill PR", "skill compliance", "SKILL.md format", "skill frontmatter", "skill best practices". DO NOT USE FOR: general documentation. INVOKES: vally CLI.

    Also in 3 projects that use this

  • GoogleSkill

    code-reviewer

    Also in 3 projects that use this

  • AnthropicSkill

    verify

    Drive the contracts engine's runtime surface (the stdio MCP server) to verify changes end-to-end. Scoped to public-plugins/plugins/healthcare/skills/contracts/ and ../../servers/documents/.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 1

    Distinctive

    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
  1. Distinctive:

    Do NOT graduate speculatively.

    line 15
  2. Very specific:

    Create scripts/kb.ts using node:sqlite (built-in.

    line 19

“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “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

SQLite knowledge base (the scale path)

Files first - this repo's default. Anthropic's own agentic-search finding (grep beat RAG "by a lot") holds while files stay small and pruned. Graduate when a THRESHOLD is hit:

  • MEMORY.md can't stay under ~200 lines despite pruning, or
  • ERRORS.md exceeds ~50KB (grep returns noise, contradictions accumulate), or
  • You need filtered queries: by provider, by date range, by tag.

Do NOT graduate speculatively. If no threshold is hit, stop here.

Setup (once, when graduating)

  1. Create scripts/kb.ts using node:sqlite (built-in; Node 22.5+ needs --experimental-sqlite, stable on Node 24+ - check node --version first; fall back to better-sqlite3 only if needed, respecting the 24h cooldown).
  2. Schema - two tables mirroring the markdown structure they replace:
CREATE TABLE facts (
  id INTEGER PRIMARY KEY,
  date TEXT NOT NULL,            -- ISO 8601
  subject TEXT NOT NULL,         -- e.g. 'birdeye', 'drift', 'railway'
  fact TEXT NOT NULL,
  source TEXT NOT NULL,          -- URL, doc section, or 'measured'
  verified_how TEXT NOT NULL,    -- 'doc-checked' | 'measured' | 'on-chain' | ...
  stale INTEGER DEFAULT 0        -- mark superseded facts; never delete
);
CREATE TABLE incidents (
  id INTEGER PRIMARY KEY,
  date TEXT NOT NULL,
  status TEXT NOT NULL,          -- INCIDENT | ROOT_CAUSE | FIXED | REFUTED
  symptom TEXT NOT NULL,         -- the grep/search key
  root_cause TEXT,
  fix TEXT,
  earlier_catch TEXT,
  dead_ends TEXT
);
  1. CLI commands (namespaced, consolidated - Anthropic tool-design rules):
    • kb add-fact --subject X --fact "..." --source "..." --how measured
    • kb search <term> (LIKE over fact+symptom+root_cause, newest first)
    • kb facts --subject X [--since DATE]
    • kb dump → regenerates kb/kb.sql (the git-committed, diffable artifact)
    • kb init → rebuilds kb/kb.db from kb/kb.sql
  2. Git: commit kb/kb.sql (diffable dump); gitignore kb/kb.db (binary). kb dump runs in the pre-commit flow or /commit-push-pr.
  3. Allowlist in .claude/settings.json: "Bash(npx tsx scripts/kb.ts *)".
  4. Migrate: move MEMORY.md "Verified facts" rows and ERRORS.md entries into the DB. MEMORY.md keeps: Current focus, architecture sketch, stack rationale, and a pointer: "Facts and incidents live in the kb - kb search <term> before assuming anything."

Rules after graduation

  • Same provenance bar: no fact without date + source + verified_how.
  • Mark superseded facts stale=1 - never delete (the trail stays searchable).
  • CLAUDE.md memory protocol still applies; /update-memory writes to the kb instead.
  • The kb is for FACTS and INCIDENTS. Prose (lessons, focus, rationale) stays in markdown - SQL is for what you query, files are for what you read.

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.