plugins/knowledge-forge/skills/kb-research-policy/SKILL.md
Routing and retrieval policy for your personal knowledge base at ~/code/knowledge (or the knowledge-base: path in the active project CLAUDE.md). Use when the user asks about past research, prior notes, captured sources, topics they have studied, or anything that might live in a personal wiki of synthesized notes. Triggers on phrases like "what do we know about", "check my notes", "any research on", "from the KB", "have I looked into", "do I have notes on". Tells you to read the cheap index/ files first, then query via the qmd MCP server (lex for known terms, vec for fuzzy), then open full notes only once the shortlist is small. Also the entry point for answering "is my KB healthy?" — points at just check.
npx skillsauth add kelp/kelp-claude-plugins kb-research-policyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Travis maintains a three-layer personal knowledge base. This skill tells you how to find things in it efficiently from any session, regardless of your current working directory.
The three layers:
raw/ — immutable source archive (web crawls, PDFs,
snapshots). Never edit.wiki/ — synthesized notes in buckets: sources/,
concepts/, reports/, questions/, projects/,
playbooks/, dependencies/.index/ — cheap one-line-per-entry routing files.
Read these first.For edge cases not covered here, read <kb>/CLAUDE.md
and <kb>/AGENTS.md directly.
Run this shell block. Every subsequent command uses
"$kb_path" (double-quoted).
kb_path=""
if [ -f CLAUDE.md ]; then
raw=$(grep -E "^knowledge-base:" CLAUDE.md | head -1 \
| sed 's/^knowledge-base://; s/^[[:space:]]*//; s/[[:space:]]*$//')
if [ -n "$raw" ]; then
# Expand ~ or $HOME prefix only -- never eval
# untrusted CLAUDE.md content
case "$raw" in
'~'|'~/'*) kb_path="$HOME${raw#\~}" ;;
'$HOME'*) kb_path="$HOME${raw#\$HOME}" ;;
*) kb_path="$raw" ;;
esac
fi
fi
if [ -z "$kb_path" ]; then
kb_path="$HOME/code/knowledge"
fi
kb_path=$(realpath "$kb_path" 2>/dev/null) || {
echo "knowledge-forge: cannot resolve KB path" >&2
exit 1
}
case "$kb_path" in
*$'\n'*|*$'\r'*|*$'\0'*|*\\*)
echo "knowledge-forge: invalid characters in KB path" >&2
exit 1 ;;
esac
if [ ! -f "$kb_path/justfile" ] || [ ! -d "$kb_path/index" ]; then
echo "knowledge-forge: $kb_path is not a knowledge base" >&2
exit 1
fi
Index files are small (one line per entry) and are the cheapest first hop. Read only the ones relevant to the question. Do not open full wiki notes yet.
Current index files under <kb>/index/:
sources.md — web pages and docs Travis has readconcepts.md — synthesized topic pagesopen-questions.md — unresolved inquiriesplaybooks.md — reusable how-to notesprojects.md — project overviewsdependencies.md — external tools and librariesdoc-packs.md — downloaded external doc packs (AUTO-GENERATED)freshness.md — last updated_at per external source (AUTO-GENERATED)authoritative-files.md — canonical file referencesAfter reading the relevant index files, you should have a shortlist of candidate note IDs.
Use the qmd MCP server to search across notes. Always
pass intent so snippets are tuned to the question.
For exact terms and known IDs — use lex (BM25):
mcp__plugin_qmd_qmd__query(
searches=[{type:'lex', query:'<exact term>'}],
intent='<what you are looking for>',
collection='knowledge-wiki'
)
For fuzzy or semantic questions — add vec:
mcp__plugin_qmd_qmd__query(
searches=[
{type:'lex', query:'<term>'},
{type:'vec', query:'<question phrased as prose>'}
],
intent='<what you are looking for>',
collection='knowledge-wiki'
)
Collection scoping:
knowledge-wiki (curated notes) — for "what does
the user think / know / have synthesized about X"knowledge-external (downloaded doc packs) — for
"what does the upstream documentation say about X"Filter low-confidence results with minScore: 0.5
when results are noisy.
Once the index and search results give you a small candidate list, retrieve full notes:
mcp__plugin_qmd_qmd__get(path='wiki/sources/...')
mcp__plugin_qmd_qmd__multi_get(paths=['a.md', 'b.md'])
Do not open full notes before you have a shortlist. Opening notes blindly wastes context and gives worse answers.
If the user asks whether the KB is healthy:
cd "$kb_path" && just check
This runs scripts/lint-frontmatter (frontmatter
validity, wikilink resolution, raw_path existence) and
scripts/validate-qmd (retrieval harness).
If content has changed and needs reindexing:
cd "$kb_path" && just refresh
This runs gen-indexes → shape → qmd update →
qmd embed → validate-qmd in sequence.
qmd CLI commands if the MCP server
is available — prefer mcp__plugin_qmd_qmd__*.index/doc-packs.md or
index/freshness.md — they are auto-generated by
scripts/gen-indexes.raw/ — that layer is the ingest
archive, maintained by scripts/ingest-web.tools
Correct Zig 0.15.x patterns for I/O, ArrayList, format strings, and build.zig. Use when writing or reviewing any Zig code -- Claude's training data is outdated for these APIs.
tools
Add Zig 0.15.x training corrections to this project's CLAUDE.md. Run this in any Zig project to fix Claude's outdated patterns for I/O, ArrayList, format strings, build.zig, BoundedArray, and usingnamespace.
tools
Audit Zig source files for Zig 0.15.x mistakes -- checks for removed APIs (getStdOut, usingnamespace, BoundedArray, async), missing flush, wrong ArrayList usage, ambiguous format strings, signed division, and renamed stdlib functions.
tools
Tiger Style rules for Zig: assertions (2+ per fn, paired positive/negative space), bounded loops (no recursion), static memory after init, snake_case naming with unit suffixes, 70-line function limit, 100-column line limit, zig fmt. Use when writing or reviewing Zig in a project that follows Tiger Style.