wiki-research-loop skill
Auto-grow a pro-workflow wiki by running a budget-capped BFS research loop over pluggable source fetchers (web, arXiv, GitHub). Each iteration pops a seed from the queue, fetches sources, drafts a wiki page, dedupes claims against existing pages, enqueues follow-up seeds. Halts on budget cap, depth cap, or convergence. Use when the user says "research <topic>", "grow the <slug> wiki", "auto-research", or wants a knowledge base that builds itself overnight.
Is the wiki-research-loop skill safe?
Clean: nothing in its files matched our rules. We read 5 files in the folder on 2026-09-28.
No findings.
Install the wiki-research-loop skill
A skill is a folder. Copy it into your agent's skills folder and the agent loads it when the task matches its description.
git clone --depth 1 https://github.com/rohitg00/pro-workflow.git /tmp/pro-workflow mkdir -p ~/.claude/skills cp -r /tmp/pro-workflow/skills/wiki-research-loop ~/.claude/skills/wiki-research-loop
In the Claude apps, zip the folder and upload it from the Skills settings. The folder on GitHub
The instructions your agent would load
SKILL.md as published, without the frontmatter. Read it on GitHub
Wiki Research Loop
Driver that turns a wiki into an auto-grown knowledge base. Layers on top of wiki-builder and wiki-query.
Loop semantics
seed-queue (pending) → next-seed
→ fetch sources via plugins (web | arxiv | github)
→ extract claims
→ dedupe vs index (FTS5; later vector via 3.3.2)
→ compile new page or amend existing
→ upsert page (auto-FTS-index)
→ enqueue follow-up seeds (max-depth gate)
→ mark seed done
→ if budget OR convergence OR kill-switch → haltHalt conditions (any one trips)
- budget_usd exceeded (loop tracks per-fetcher cost estimate)
- maxpagesper_run written
- max_depth reached on every active branch
- 3 consecutive pages add < 5 % new claims (convergence)
- File ~/.pro-workflow/STOP exists (operator kill-switch)
- wiki.config.md auto_research.enabled: false
- Wiki private: true AND any non-local fetcher selected
Commands
node $SKILL_ROOT/scripts/research-loop.js run <slug> [--max-pages N] [--max-depth N] [--budget-usd 0.50] [--fetchers web,arxiv,github]
node $SKILL_ROOT/scripts/research-loop.js seed <slug> "<query>" [--depth 0] [--parent-id N]
node $SKILL_ROOT/scripts/research-loop.js seeds <slug> [--status pending|active|done|failed]
node $SKILL_ROOT/scripts/research-loop.js cancel <slug>
node $SKILL_ROOT/scripts/research-loop.js statusCLI flags override wiki.config.md for one run only.
Source fetchers
Pluggable. Each lives at scripts/source-fetchers/.js. Interface:
module.exports = {
name: 'web',
match: (q) => true, // is this fetcher useful?
estimateCost: (q) => ({ usd: 0, tokens: 0 }),
fetch: async (q, opts) => [ // returns RawDoc[]
{ url, title, content, fetched_at }
]
};Built-in:
- web.js — Fetches via the user's available WebFetch tool through a stdin/stdout shim. Treats result as plain text/markdown.
- arxiv.js — https://export.arxiv.org/api/query (free, public, no key). Returns abstract + metadata.
- github.js — https://api.github.com/search/repositories + README pull (uses GH_TOKEN if set, otherwise unauthenticated rate limit).
Drop a new file in ~/.pro-workflow/fetchers/.js to add a custom fetcher. Loaded at startup if present.
Budget enforcement
Pre-iteration: sum estimateCost across selected fetchers. If projected cumulative cost would exceed budget_usd, halt.
Post-iteration: track tokens used by the LLM compile step (Anthropic/OpenAI passthrough). Hard-kill on overrun.
Per-fetcher overrides via env: WIKILOOPBUDGETUSD, WIKILOOPMAXPAGES, WIKILOOPMAX_DEPTH.
Seed queue
SQLite-backed via wiki_seeds table:
Loop pops by (depth ASC, created_at ASC) so it explores breadth-first.
Convergence detection
After each compiled page, compute Jaccard overlap of claim-text tokens vs the prior 3 pages. If < 5 % novel content for 3 consecutive pages, halt and report converged.
Kill switch
touch ~/.pro-workflow/STOPLoop checks per-iteration and halts gracefully. Remove file to resume next run.
Privacy guard
If wiki.config.md has private: true, the loop refuses any non-local fetcher and emits a warning. Only raw/ ingestion via manual seeds is allowed.
Reactive trigger (Phase 3.3.4)
scripts/file-watcher.js watches wiki//wiki//.md. On user-edited claim, enqueues a verification seed (verify: ) at depth 0. Wired through pro-workflow's file-watcher.js hook.
Cron tick (Phase 3.3.4)
scripts/research-tick.js is launchable from any cron-style runner. Picks the oldest opted-in wiki with pending seeds and runs a single iteration. Hook event: pro-workflow:research-tick.
Output
Each run writes:
<wiki-root>/logs/research-<UTC-timestamp>.md # human-readable run log
<wiki-root>/derived/run-<UTC-timestamp>.json # structured statsRun log lines:
[2026-05-08T10:42Z] seed-3 (depth=1) "memory consolidation in agents"
fetcher=arxiv hits=3
fetcher=web hits=2
compiled wiki/concepts/memory-consolidation.md (claims=7, novel=4)
enqueued 2 follow-up seeds
cost so far: $0.04 / $0.50Integration with wiki-query
Every compiled page goes through wiki-cli.js page so FTS5 stays consistent. The dedupe step calls searchWiki with the candidate claim text to find near-duplicates.
Status (Phase 3.3.1)
Ships: loop driver, seed queue, web/arxiv/github fetchers, budget caps, convergence detector, kill-switch, manual run command.
Defers:
- Vector dedupe (Phase 3.3.2 via sqlite-vec)
- LLM-judged claim novelty (current = Jaccard token overlap)
- Cron + reactive (Phase 3.3.4)
More skills from rohitg00/pro-workflow
- Aagent-teamsCoordinate 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.
- Aauto-setupAuto-configure quality gates, hooks, and settings for a new project. Detects project type and sets up appropriate tooling. Use when onboarding a new codebase.
- Abatch-orchestrationDecompose 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.
- Cbug-captureCapture 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".
- Acompact-guardSmart 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.
- Acontext-engineeringMaster 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.
- Acontext-optimizerOptimize token usage and context management. Use when sessions feel slow, context is degraded, or you're running out of budget.
- Acost-trackerTrack session costs, set budget alerts, and optimize token spend. Use to check costs mid-session or set spending limits.
- Adesign-engineeringApply interface craft when building or reviewing UI - motion, easing, timing, springs, component feel, and visual foundations. Use when building a component, animation, transition, hover or press state, modal, drawer, toast, or when polishing an interface so it feels right. Says "make this feel better", "add an animation", "polish the UI", "review this component".
- AdeslopRemove AI-generated code slop, unnecessary comments, and over-engineering from the current branch diff. Cleans up boilerplate, simplifies abstractions, strips defensive code, and in skill-file mode lints SKILL.md files for quality. Use when cleaning up code, simplifying, removing boilerplate, before committing, or when reviewing a skill before promoting it.
- Adomain-modelingBuild the project's shared language and bounded contexts before writing code, so names stay consistent and the agent stops paraphrasing domain concepts. Produces a CONTEXT.md glossary and decision records. Use at the start of a project or feature, or when the codebase and the people describing it speak different languages.
- Afile-watcherConfigure file watching hooks to auto-react to config changes, env file updates, and dependency modifications. Use to set up reactive workflows.