
Wiki Query
- 52 installs
- 2.8k repo stars
- Updated August 3, 2026
- rohitg00/pro-workflow
Helps with ai & agent building tasks during AI-assisted development.
About
wiki-query is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- wiki-query
- AI & Agent Building
- AI-coding skill
Wiki Query by the numbers
- 52 all-time installs (skills.sh)
- +13 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #7,142 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/rohitg00/pro-workflow --skill wiki-queryAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 52 |
|---|---|
| repo stars | ★ 2.8k |
| Last updated | August 3, 2026 |
| Repository | rohitg00/pro-workflow ↗ |
What it does
Helps with ai & agent building tasks during AI-assisted development.
Files
Wiki Query
FTS5 BM25 retrieval over wiki pages indexed by wiki-builder.
When to use
- Before writing any new wiki page → check coverage first
- User asks a domain question that may already live in a wiki
- "Ask the <slug> wiki: <question>"
- Verifying citations before quoting a claim
SessionStartauto-load when prompt matches a known wiki topic
Commands
node $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.
Output
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.
Citing back
Every wiki hit must be cited as:
[wiki:<slug>] <title> — `<rel_path>`Do not paraphrase a hit without showing the source.
SessionStart integration
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.
Limits (Phase 3.3.0)
- BM25 only. Vector search arrives 3.3.2 with sqlite-vec.
- No re-ranking. MMR diversity arrives with the research loop in 3.3.1.
- Snippet window is 16 tokens around match — tune via
--snippet-len.
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const PRO_WORKFLOW_ROOT = path.resolve(__dirname, '..', '..', '..');
function getStore() {
const distPath = path.join(PRO_WORKFLOW_ROOT, 'dist', 'db', 'store.js');
if (!fs.existsSync(distPath)) {
console.error(`[wiki-query] built store missing at ${distPath}. Run: cd ${PRO_WORKFLOW_ROOT} && npm install && npm run build`);
process.exit(1);
}
return require(distPath).createStore();
}
function parseArgs(argv) {
const out = { _: [] };
for (let i = 0; i < argv.length; i++) {
const a = argv[i];
if (a.startsWith('--')) {
const key = a.slice(2);
const next = argv[i + 1];
if (next && !next.startsWith('--')) { out[key] = next; i++; }
else out[key] = true;
} else {
out._.push(a);
}
}
return out;
}
function cmdSearch(args) {
const query = args._[0];
if (!query) { console.error('search: query required'); process.exit(1); }
const limit = parseInt(args.limit, 10) || 10;
const store = getStore();
try {
const hits = store.searchWiki(query, { wikiSlug: args.wiki, limit });
if (args.json) {
console.log(JSON.stringify(hits, null, 2));
} else if (!hits.length) {
console.log('(no matches)');
} else {
for (const h of hits) {
console.log(`${h.wiki_slug} · ${h.rel_path} [${h.rank.toFixed(2)}]`);
console.log(` ${h.title}`);
if (h.snippet) console.log(` ${h.snippet.replace(/\n/g, ' ')}`);
}
}
} finally {
store.close();
}
}
function cmdRelated(args) {
const slug = args._[0];
const relPath = args._[1];
if (!slug || !relPath) { console.error('related: slug and rel-path required'); process.exit(1); }
const limit = parseInt(args.limit, 10) || 5;
const store = getStore();
try {
const page = store.getWikiPage(slug, relPath);
if (!page) { console.error(`page not found: ${slug}/${relPath}`); process.exit(1); }
const seed = [page.title, page.summary].filter(Boolean).join(' ');
const hits = store.searchWiki(seed, { wikiSlug: slug, limit: limit + 1 })
.filter(h => h.rel_path !== relPath)
.slice(0, limit);
if (args.json) console.log(JSON.stringify(hits, null, 2));
else if (!hits.length) console.log('(no related pages)');
else hits.forEach(h => console.log(`${h.rel_path} ${h.title} [${h.rank.toFixed(2)}]`));
} finally {
store.close();
}
}
function cmdShow(args) {
const slug = args._[0];
const relPath = args._[1];
if (!slug || !relPath) { console.error('show: slug and rel-path required'); process.exit(1); }
const store = getStore();
try {
const page = store.getWikiPage(slug, relPath);
if (!page) { console.error('page not found'); process.exit(1); }
if (args.json) console.log(JSON.stringify({ ...page, content: undefined, content_preview: page.content?.slice(0, 1000) }, null, 2));
else console.log(page.content || '');
} finally {
store.close();
}
}
function usage() {
console.error(`Usage:
query.js search "<query>" [--wiki <slug>] [--limit 10] [--json]
query.js related <slug> <rel-path> [--limit 5] [--json]
query.js show <slug> <rel-path> [--json]`);
process.exit(1);
}
function main() {
const [, , cmd, ...rest] = process.argv;
const args = parseArgs(rest);
switch (cmd) {
case 'search': return cmdSearch(args);
case 'related': return cmdRelated(args);
case 'show': return cmdShow(args);
default: usage();
}
}
main();