Skip to main content
ClaudeWave
EN, English
Skill2.9k repo starsupdated 1mo ago

wiki-query

Wiki-query uses SQLite FTS5 BM25 retrieval to search indexed wiki pages and return ranked passages with citations. Use it when a user asks domain questions that existing wikis likely cover, requests "ask wiki" or "search wikis," before writing new wiki pages to avoid duplication, or to verify claims before quoting them.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/rohitg00/pro-workflow /tmp/wiki-query && cp -r /tmp/wiki-query/skills/wiki-query ~/.claude/skills/wiki-query
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# 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
- `SessionStart` auto-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`.
agent-teamsSkill

Coordinate multiple Claude Code sessions as a team — lead + teammates with shared task lists, mailbox messaging, and file-lock claiming. Patterns for team sizing, task decomposition, and when to use teams vs sub-agents vs worktrees.

auto-setupSkill

Auto-configure quality gates, hooks, and settings for a new project. Detects project type and sets up appropriate tooling. Use when onboarding a new codebase.

batch-orchestrationSkill

Decompose large-scale changes into independent units and spawn parallel agents in isolated worktrees. Use for migrations, refactors, codemods, and any change touching 10+ files with the same pattern.

bug-captureSkill

Capture a user-reported defect as a durable GitHub issue written in the project's own domain language. Explores the codebase in parallel for context but never leaks file paths or line numbers into the issue. Use when the user reports a bug conversationally, runs a QA pass, or says "file an issue", "log this as a bug", "capture this".

compact-guardSkill

Smart context compaction with state preservation. Saves critical files, task progress, and working state before compaction, restores after. Use before manual compact or when auto-compact triggers.

context-engineerSubagent

Analyzes and optimizes context window usage across sessions. Use when context feels bloated, sessions run slow, or approaching compaction limits.

context-engineeringSkill

Master the four operations of context engineering — Write, Select, Compress, Isolate. Manage token budgets, compaction strategies, and context partitioning to keep AI sessions sharp and efficient.

context-optimizerSkill

Optimize token usage and context management. Use when sessions feel slow, context is degraded, or you're running out of budget.