personal-kb-usage
Skill8 starsChanged 17 days agoMITView on GitHub
This skill should be used when querying the user's personal knowledge base (cross-project personal knowledge graph) for prior learnings, notes, or decisions that apply across projects.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- agent-behavior-constraintsSkill
- agentsview-usageSkill
- evidence-driven-workSkill
- explainer-design-systemSkill
- exploration-strategySkill
- graphify-usageSkill
- prompt-refinementSkill
- skill-agent-mappingSkill
- task-classificationSkill
- verification-gatesSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
All 7 tools are accessed via the MCP prefix mcp__personal-kb__*.
- Very specific: line 66
Always set
top_k/top_n: when available. Default god_nodes returns 10 nodes — only request more if explicitly needed. - Very specific: line 68
Set
depthconservatively: Default depth is 3; start at 1-2 for narrow questions, increase only if the result is insufficient. - Very specific: line 71
Chain calls, don't parallelize blindly: Run graph_stats first, then decide if god_nodes is needed.
- Very specific: line 81
Every node in the personal KB graph carries a source_location field (file path, sometimes line range).
- Distinctive: line 88
Never truncate these to relative paths — downstream agents working in a different project directory cannot resolve relative paths pointing …
- Distinctive: line 100
When an edge is INFERRED or AMBIGUOUS, note this explicitly in your summary.
≈ “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.
Files
Personal KB Usage
Query the user's personal knowledge base effectively, interpret results accurately, and stay within token budgets.
Overview
The personal-kb MCP server exposes the user's cross-project personal knowledge base as a pre-built knowledge graph stored at $AGENT_FLOW_PERSONAL_KB_PATH/graphify-out/graph.json. This is a graph built by the user from their own notes, journals, decision records, or any other personal documents — outside of any single project directory.
Owner: Riko (Explorer Agent) — Riko is the primary personal-kb query agent and owns interpretation of results. Consumers: Senku (Planner Agent), Lawliet (Reviewer Agent) — both may consult the personal KB during planning and review to surface cross-project decisions and patterns. Out of scope: Loid (Executor) and Alphonse (Verifier) do NOT have personal-kb access by design. This preserves the one-writer invariant and keeps write/verify agents focused on project artifacts.
All 7 tools are accessed via the MCP prefix mcp__personal-kb__*. See references/tool-reference.md for full signatures.
Contrast with graphify-usage:
graphify-usage— queries the current project's graph atgraphify-out/graph.json(relative to project root). Use for structural questions about THIS codebase.personal-kb-usage— queries the user's personal graph at an absolute path outside the project. Use for cross-project recall: prior decisions, anti-patterns encountered before, personal preferences, notes from past work.
When to Query the Personal KB vs. Project Graph vs. Grep
| Trigger condition | Preferred approach |
| "Have I solved this problem before in another project?" | Personal KB: query_graph |
| "What did I decide about X in past projects?" | Personal KB: query_graph |
| "What patterns have I used for Y across codebases?" | Personal KB: query_graph |
| "What personal anti-patterns have I documented?" | Personal KB: god_nodes then get_community |
| "What is the dependency structure of THIS project?" | Project graph (graphify-usage) |
| "Which community does file F belong to in THIS repo?" | Project graph (graphify-usage) |
"Find the string literal TODO: fix" | Grep |
| "What does a specific config key say in THIS project?" | Read the file directly |
Personal KB is not configured (available: false in state) | Skip — use project graph or Grep |
Rule of thumb: Personal KB is for memory across sessions and projects. Project graph is for structure within this session's codebase. Grep/Read is for current file content.
Tool Decision Table
Choose the right tool for the question type. See references/query-patterns.md for detailed decision sequences.
| Question type | Primary tool | Follow-up |
| What prior decisions exist on topic X? | query_graph (BFS, depth=2) | get_node on returned labels |
| What are my recurring patterns / hubs? | god_nodes | get_community to explore clusters |
| Which personal notes cluster around topic Y? | get_community | get_node on members |
| What connects concept A to decision B? | get_neighbors | get_node on connectors |
| Have I documented an anti-pattern like Z? | query_graph (BFS for broad, DFS for specific chain) | get_node on results |
| Full details on a known personal note/decision | get_node | — |
| Path between two cross-project concepts | shortest_path | get_node on intermediate nodes |
| Overall scale of personal KB | graph_stats | god_nodes for central concepts |
Token Hygiene
Hard rules for staying within context budget:
- Always set
top_k/top_nwhen available. Defaultgod_nodesreturns 10 nodes — only request more if explicitly needed. - Set
token_budgetonquery_graphcalls. The default is 2000 tokens; lower it (e.g., 500) for quick orientation queries. - Set
depthconservatively. Default depth is 3; start at 1-2 for narrow questions, increase only if the result is insufficient. - Do NOT paste raw subgraph JSON downstream into task prompts or summaries. Extract only node IDs, labels, and
source_locationfields. - Summarize before handing off. Convert graph results to bullet lists of
label → source_locationpairs. Downstream agents (Senku, Lawliet) need names and file paths, not raw graph output. - Chain calls, don't parallelize blindly. Run
graph_statsfirst, then decide ifgod_nodesis needed. Avoid firing all 7 tools simultaneously.
Result Interpretation
How to read and trust what the personal KB returns:
Cite source_location fields with ABSOLUTE paths
Every node in the personal KB graph carries a source_location field (file path, sometimes line range). Because the personal KB lives outside the current project root, always report these as absolute paths:
Node: AuthDecision2025
source_location: /Users/you/personal/knowledge-base/decisions/auth-patterns.md:42Never truncate these to relative paths — downstream agents working in a different project directory cannot resolve relative paths pointing into the personal KB.
Surface confidence tags
The graph annotates edges with confidence labels:
| Tag | Meaning | Trust level |
| EXTRACTED | Directly observed in source text | High — treat as fact |
| INFERRED | Model-reasoned relationship | Medium — verify if load-bearing |
| AMBIGUOUS | Multiple interpretations possible | Low — always verify with Read |
When an edge is INFERRED or AMBIGUOUS, note this explicitly in your summary.
Personal KB vs. project docs
The personal KB reflects the user's personal notes and past decisions, not authoritative project documentation. When personal KB content conflicts with current project docs:
- Project docs take precedence for THIS project's requirements.
- Personal KB is a useful prior but not a mandate.
- Note conflicts explicitly so Senku or Lawliet can resolve them.
Trust-but-verify for recently updated notes
The personal KB graph is built once (at the user's last /graphify run on their KB) and is not updated during a session. If the user has recently added notes, those may not be indexed yet.
What NOT to Do
- Do not paste personal KB content into commit messages, PR descriptions, or other public artifacts — user notes may contain private context or personal opinions not intended for external audiences.
- Do not assume the personal KB is always authoritative over project docs — personal priors should inform, not override, current requirements.
- Do not skip the project graph query just because the personal KB has similar content — the project graph reflects THIS codebase's actual structure; personal KB reflects past experience that may not apply.
- Do not query the personal KB on freshly edited personal notes expecting current content — the graph is a snapshot.
- Do not set
depth> 4 without a specific reason — output will overflow context. - Do not pass raw graph JSON blobs in task descriptions or summaries to other agents.
- Do not report INFERRED edges as facts — always surface the confidence tag.
- Do not skip
source_locationcitations — every claimed relationship needs a file anchor (absolute path).
Cross-References
- docs/guides/using-personal-kb.md — setup instructions, env var contract, verification steps
- references/tool-reference.md — full MCP tool signatures, parameters, cost profiles
- references/query-patterns.md — decision table mapping question types to tool sequences
- examples/worked-queries.md — end-to-end query scenarios with expected result shapes
- skills/graphify-usage/SKILL.md — sibling skill for querying the current project's graph
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.

