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
- uttambharadwaj/kb-graphedited, first seen Sep 20, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 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.
- llms.txtllms.txt
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
- Distinctive: line 18
Search the KB for relevant context BEFORE writing code or making decisions:
- Distinctive: line 26
Never skip this. The KB has accumulated lessons, fixes, decisions, and architecture docs.
- Very specific: line 117
Don't kb_read every document that matches a search — read summaries first
- Distinctive: line 118
Don't skip searching because "I probably know this" — the KB knows more than you remember
- Distinctive: line 119
Don't forget to capture after significant work — a lesson not captured is a lesson repeated
- Distinctive: line 120
Don't index raw code into the KB — use CODEMAP.md structural maps instead
- Distinctive: line 121
Don't treat the KB as a dump — classified, typed, tagged notes are 10x more useful than raw text
≈ “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.
Files
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 needNever 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:
| Need | Tool | Tokens | When |
| Quick context | kb_context | ~100/doc | Always start here |
| Specific search | kb_search | ~200/result | Looking for something specific |
| Conceptual match | kb_search_smart | ~200/result | Fuzzy/semantic queries |
| Full document | kb_read | ~500-5000/doc | Only 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 learningsThis is NOT fine-tuning. The model doesn't change. The context it receives improves. And context is everything.
When to Use Each Tool
| Situation | Tool | Why |
| Starting a new task | kb_context | Get the lay of the land |
| "How did we do X?" | kb_search | Find specific past work |
| "What do we know about X?" | kb_search_smart | Conceptual/fuzzy match |
| Need full implementation details | kb_read | After context identified the doc |
| Finished debugging | kb_capture_session | Record what happened |
| Fixed a bug | kb_capture_fix | Record symptom/cause/fix |
| Made a decision | kb_write type=decision | Record the decision and why |
| Found useful research | kb_write type=research | Save for future reference |
| Want cross-cutting insights | kb_synthesize | Connect dots across sources |
| New content needs tagging | kb_classify | Auto-classify unprocessed notes |
What NOT to Do
- Don't
kb_readevery 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
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.

