Terminal
Terminal/Skill
Searches your markdown research wikis and returns the best matching passages with citations, so your agent can answer from notes you already have.
By Rohit Ghumare
Works with
npx skills add rohitg00/pro-workflow --skill wiki-queryFTS5 BM25 retrieval over wiki pages indexed by wiki-builder.
SessionStart auto-load when prompt matches a known wiki topicnode $SKILL_ROOT/scripts/query.js search "<query>" [--wiki <slug>] [--limit 10] [--json]
node $SKILL_ROOT/scripts/query.js related <slug> <rel-path> [--limit 5]
node $SKILL_ROOT/scripts/query.js show <slug> <rel-path>
search with no --wiki ranks across all wikis. related finds adjacent pages by reusing the page's title + summary as the query.
JSON-friendly. Each hit:
{
"page_id": 12,
"wiki_slug": "agent-memory",
"rel_path": "wiki/concepts/episodic-memory.md",
"title": "Episodic Memory",
"snippet": "... [time-stamped] traces, distinct from semantic ...",
"rank": -3.21
}
Lower (more negative) rank = better BM25 match.
Every wiki hit must be cited as:
[wiki:<slug>] <title> — `<rel_path>`
Do not paraphrase a hit without showing the source.
When pro-workflow's SessionStart hook detects wiki-relevant terms in the user prompt, it runs query.js search "<prompt>" --limit 3 and injects top hits into the session as a hint:
[wiki-query] 3 relevant pages:
- agent-memory · wiki/concepts/episodic-memory.md
- agent-memory · wiki/papers/park-2023-generative-agents.md
- ...
Helps Claude recall existing knowledge instead of redoing research.
--snippet-len.