agentleFS
willynikes2willynikes2/knowledge-base-server/skill/SKILL.md

kb-workflow

Skill190 starsChanged 9 months agoMITView on GitHub

Use before starting any non-trivial task to search the knowledge base for context, and after completing work to capture findings. Teaches the token-efficient retrieval pattern and self-learning loop.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 1

    1. uttambharadwaj/kb-graph★ 466% same

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

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

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Search the KB for relevant context BEFORE writing code or making decisions:

    line 18
  2. Distinctive:

    Never skip this. The KB has accumulated lessons, fixes, decisions, and architecture docs.

    line 26
  3. Very specific:

    Don't kb_read every document that matches a search — read summaries first

    line 117
  4. Distinctive:

    Don't skip searching because "I probably know this" — the KB knows more than you remember

    line 118
  5. Distinctive:

    Don't forget to capture after significant work — a lesson not captured is a lesson repeated

    line 119
  6. Distinctive:

    Don't index raw code into the KB — use CODEMAP.md structural maps instead

    line 120
  7. Distinctive:

    Don't treat the KB as a dump — classified, typed, tagged notes are 10x more useful than raw text

    line 121

≈ “Common” is an estimate: at least 1 in 5 of the 383,637 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 Base Workflow

What This Skill Does

This skill teaches you how to use the knowledge-base-server MCP tools efficiently. It does NOT replace the MCP server — it complements it by giving you the retrieval strategy that saves 90%+ tokens.

Think of it this way:

  • MCP server = the engine (search, read, write, capture)
  • This skill = the driving instructions (when to search, what to read, how to capture)

Before Starting Any Task

Search the KB for relevant context BEFORE writing code or making decisions:

1. kb_context("topic") — get summaries only (~100 tokens per doc, 90% savings)
2. Review titles and summaries — decide which docs matter
3. kb_read(id) — read full content ONLY for docs you actually need

Never skip this. The KB has accumulated lessons, fixes, decisions, and architecture docs. Searching first prevents:

  • Repeating solved problems
  • Contradicting past decisions
  • Missing known pitfalls
  • Wasting tokens on re-discovery

The Three-Tier Retrieval Pattern

The KB has three tiers of information. Query the right tier for your need:

NeedToolTokensWhen
Quick contextkb_context~100/docAlways start here
Specific searchkb_search~200/resultLooking for something specific
Conceptual matchkb_search_smart~200/resultFuzzy/semantic queries
Full documentkb_read~500-5000/docOnly after context confirms relevance

Rule: Never kb_read without kb_context first. You wouldn't read an entire book to check if it's relevant — you'd read the summary.

After Completing Work

Capture what you learned so the next session starts smarter:

After debugging sessions:

kb_capture_session:
  goal: "What you were trying to do"
  commands_worked: "What worked"
  commands_failed: "What failed and why"
  root_causes: "The actual problem"
  fixes: "What fixed it"
  lessons: "What to do differently next time"

After bug fixes:

kb_capture_fix:
  title: "Short fix title"
  symptom: "What was broken"
  cause: "Root cause"
  resolution: "How it was fixed"

After research or decisions:

kb_write:
  title: "Decision or finding title"
  type: "decision" or "research" or "lesson"
  content: "What was decided and why"

The Self-Learning Loop

This is how the system compounds intelligence:

Session N:
  1. Search KB for context (maybe find nothing)
  2. Do the work (hit problems, make decisions)
  3. Capture findings to KB

Session N+1:
  1. Search KB for context (find Session N's captures!)
  2. Skip the problems Session N already solved
  3. Capture NEW findings

Session N+100:
  1. Search KB for context (find 100 sessions of accumulated knowledge)
  2. One-shot clean implementation because context covers everything
  3. Capture only genuinely new learnings

This is NOT fine-tuning. The model doesn't change. The context it receives improves. And context is everything.

When to Use Each Tool

SituationToolWhy
Starting a new taskkb_contextGet the lay of the land
"How did we do X?"kb_searchFind specific past work
"What do we know about X?"kb_search_smartConceptual/fuzzy match
Need full implementation detailskb_readAfter context identified the doc
Finished debuggingkb_capture_sessionRecord what happened
Fixed a bugkb_capture_fixRecord symptom/cause/fix
Made a decisionkb_write type=decisionRecord the decision and why
Found useful researchkb_write type=researchSave for future reference
Want cross-cutting insightskb_synthesizeConnect dots across sources
New content needs taggingkb_classifyAuto-classify unprocessed notes

What NOT to Do

  • Don't kb_read every document that matches a search — read summaries first
  • Don't skip searching because "I probably know this" — the KB knows more than you remember
  • Don't forget to capture after significant work — a lesson not captured is a lesson repeated
  • Don't index raw code into the KB — use CODEMAP.md structural maps instead
  • Don't treat the KB as a dump — classified, typed, tagged notes are 10x more useful than raw text

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.