LLM Wiki & Claude Setup — User Guide
Personal reference for Viet. Covers: active rules, the wiki, all installed skills, MCP tools, plugins, and scenario playbooks.1. Rules in Effect
These behaviors are always active. No need to invoke them — Claude follows them automatically.Communication
Skill discipline (superpowers)
- Before every substantive response, Claude checks: does a skill apply?
- If even 1% chance → invokes the skill. This is not optional.
- Order:
wiki-contextfirst → then process skills (debugging, brainstorming) → then implementation skills.
Auto-invocation (wiki-startup)
Preference feedback loop (judge auto-invocation)
After any response containing:- Code blocks with substantial implementation
- Numbered implementation plans or structured task breakdowns
- Architectural decisions or tradeoff analysis
/judge before ending the turn. Silent on first strike. On second consecutive low score for the same dimension, drafts a corrective rule for approval.
Domain-specific rules
Pre-ingest rule
Before adding any source to the wiki, Claude asks 3–5 comprehension questions. Say “skip review” to bypass.2. The Wiki
What it is
A personal knowledge base at~/repos/llm-wiki/wiki/. Claude owns and maintains it. You curate sources and ask questions.
Structure
Wiki operations
How to search
In Claude Code (preferred — uses MCP):wiki-chat: /mode local|global|hybrid|naive to switch, /reindex to rebuild after ingests, /status for index stats, q to quit.
First time: runRead a specific page:wiki-index --fullto build the graph. Takes ~30–60 min for ~150 pages with localqwen2.5:3b(free). WithANTHROPIC_API_KEYset, expect $10–30+ — LightRAG runs 3 extraction phases per page. Use local LLM for full builds; unsetANTHROPIC_API_KEYor pass--yesto confirm API cost.
3. Skills
Skills load on-demand via/skill-name or auto-trigger based on context. Superpowers is enabled — Claude checks before every response.
3.1 Wiki & knowledge
3.2 Feature development
New project setup order:
3.3 Quality & feedback
3.4 Debugging & diagnosis
/diagnose phases: build feedback loop → reproduce → hypothesize → instrument → fix → cleanup.
3.5 Session & memory
The mistakes pipeline:
capture-mistake → individual mistakes/YYYY-MM-DD-*.md → synthesize-mistakes → global-prevention-rules.md → loaded every session.
The slop pipeline: capture-slop → mistakes/slop-register.md (or .claude/slop-register.md per-project) → auto-loaded at session start when entries exist → applied as hard constraints on code generation.
3.6 Project setup & config
3.7 Background & automation
ralph-loop pattern: intercepts exit, reinjects original prompt with clean context + durable filesystem state. Enables extended AFK sessions.
3.8 AI & SDK development
claude-api also handles: migrating between model versions, caching tuning, tool use, batch API, files API.
3.9 Superpowers (auto-trigger)
These are invoked by Claude, not by you. They override nothing — they defer to your CLAUDE.md rules.3.10 Plugin: Caveman
3.11 Plugin: Sentry
3.12 Other
4. MCP Tools
MCP tools are available directly to Claude — no skill needed.Active servers
Firecrawl tool selection guide
5. Plugins
Enabled plugins that provide skills and hooks.Global hooks (~/.claude/hooks/)
Always-on hooks, wired in settings.json. No per-project setup needed.
6. Scenario Playbooks
”I’m starting in a new or unfamiliar codebase"
"I want to add linting to a project"
"I want to build a new feature"
"I have a bug I can’t figure out"
"I want Claude to grade its own output"
"I want to prevent AI slop in my codebase"
"I want to learn by doing (not just copy)"
"I need to research something from the web"
"I want to add a markdown source to the wiki"
"I want to add a PDF research paper to the wiki"
"I want to check if the wiki has anything on topic X"
"I want to query the wiki interactively (deep exploration)"
"I want to document a new feature or module"
"I want to improve the architecture of this codebase"
"I need to review a PR for security"
"I want to update the LightRAG graph after new ingests”
wiki-index (incremental) automatically after commits touching wiki/.
New pages that were ingested this session are queued automatically on next run.
”I want to run a long autonomous task"
"I want to set up a recurring background task"
"A mistake was made — prevent recurrence"
"I need a second opinion on an architecture or security decision"
"Context is getting long — ending the session”
7. Git Worktrees (Optional Dev Setup)
Worktrees let you work on multiple branches simultaneously withoutgit stash or branch switching. Each branch gets its own directory with a clean working tree.
Setup (one-time)
.worktrees/ is already in .gitignore — safe to create without polluting git status.
Useful commands
Notes
- Each worktree is fully independent: separate staged files, separate HEAD
- The main repo and any worktree can both be open simultaneously
- A branch can only be checked out in one worktree at a time
- Superpowers
using-git-worktreesskill auto-triggers when starting isolated feature work
8. LLM Council
The council system provides a cross-vendor second opinion using Codex (via Pi subprocess) alongside Claude. Pi is not in the agent fleet — it’s a stateless subprocess called when you need adversarial review from a model with different training biases.When to use
Invoke council before committing to:- Architectural decisions (new service, data model, inter-system protocol)
- Security-relevant changes (auth, permissions, secrets, trust boundaries)
- Irreversible operations (schema migrations, destructive git ops, data deletions)
Quick council (advisory — one Codex voice)
Full council (two voices + Opus synthesis)
- Voice A: Sonnet (
claude -p --model claude-sonnet-4-6) - Voice B: Codex (
pi -p --model openai-codex/gpt-5.3-codex --no-session) - Chairman: Opus synthesizes disagreements →
.council/synthesis.md - Output auto-committed to
.council/
What Pi is (and isn’t)
Pi is a separate terminal coding harness (@earendil-works/pi-coding-agent). In this setup:
- Default provider:
openai-codex(ChatGPT Team plan) - Used exclusively as subprocess for council Voice B — only Pi produces stdout-clean output
opencode run -m github-copilot/gpt-5.2-codex→ ✅ stdout-compatible with ANSI filter:sed 's/\x1b\[[0-9;]*m//g' | grep -v "^>" | grep -v "^[[:space:]]*$"— usable as council Voice C- Does not share Claude Code hooks,
.agents/coordination, or skill invocation contract
OpenCode integration status
OpenCode (opencode CLI v1.14.30) is installed, configured, and has its full rule stack loaded.
To unlock
opencode/ models (GPT-5.3-codex, Gemini-3.1-pro, etc.): add a payment method to the OpenCode workspace. Once done: migrate Pi to opencode provider and retire the ChatGPT Team subscription.
9. Tips
Force wiki search in any session:/setup-matt-pocock-skills once per project to configure issue tracker + domain glossary. After that, all engineering skills know the context.
Judge is always watching — after substantial code/plan/design outputs, Claude auto-invokes /judge. Use /judge-report to see the session’s quality history.
Skip comprehension on ingest — if you already know a source well, say “skip review” or “just ingest it” to bypass the 3–5 question check.
Shell commands in session — prefix with ! to run in the current Claude Code session: ! gcloud auth login.