From browzer
One-shot Browzer onboarding for an existing repo. Reads every markdown doc (README, CLAUDE.md / AGENTS.md / CONTRIBUTING.md, docs/**, runbooks, ADRs), reconciles each claim against real code via `browzer explore`, DELETES stale/duplicate/incorrect content outright, shows the diff for approval, then runs `browzer init` + `browzer sync` so the index reflects the cleaned docs. Idempotent. Triggers: bootstrap rag on this repo, browzer bootstrap, onboard this project into browzer, sync the docs against the code, clean up the docs and rag this repo, rag steroids, claude rag onboarding, full rag onboarding, one-shot rag setup.
How this skill is triggered — by the user, by Claude, or both
Slash command
/browzer:browzer-bootstraperThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill turns an arbitrary repo into a Browzer-powered RAG workspace **after** its existing documentation has been reconciled against the codebase. The order matters: the index is built last, so it captures the cleaned docs — not the stale ones.
This skill turns an arbitrary repo into a Browzer-powered RAG workspace after its existing documentation has been reconciled against the codebase. The order matters: the index is built last, so it captures the cleaned docs — not the stale ones.
The skill never creates new files. No blueprint generators, no drift reports, no scratch artefacts. It only edits or deletes existing markdown. If the repo has no docs to reconcile, the skill says so and proceeds to indexing.
The operator confirms the diff before any commit lands. The skill respects that gate absolutely.
Changes: existing markdown files in the repo where the doc's claim no longer matches the code (wrong path, wrong API shape, wrong env var, wrong port, wrong command, wrong version). Stale content gets DELETED — outright, no > ⚠️ STALE markers, no <!-- TODO: verify --> annotations, no "delete candidate" tags. Duplicated content (same claim in three places) collapses to the most authoritative location with the duplicates deleted; cross-links only when they're genuinely useful.
Leaves alone:
CHANGELOG.md, retro notes, ADRs already labelled as historical).retrospectives/, archive/, history/, old/, status: archived frontmatter).browzer status --json --save /tmp/browzer-bootstrap-status.json 2>&1
Decision tree from the status output:
exit 2 → not authenticated. STOP and hand off to use-rag-cli (browzer login). Do not proceed.exit 3 OR no active workspace in the JSON → no workspace yet. Do NOT run browzer init here. Phase 4's index step handles that, AFTER the docs are clean.If the repo has uncommitted changes, surface that fact in chat (one line, not a panel) and ask: proceed (the doc reconciliation will land mixed with existing changes — confirm), or stop so the operator can stage/stash first.
The audit runs over every existing markdown file in the repo's working tree, excluding archived subtrees. The plan order is:
Inventory. List every *.md / *.mdx under the repo. Filter out:
retrospectives/, archive/, history/, old/).status: archived in YAML frontmatter.CHANGELOG.md is reconciled but never deleted — it's append-only history. Reconcile means: leave existing entries alone; only correct factually-wrong forward-looking claims (e.g. "the next release will add X" when X already shipped or got removed).Per-doc claim extraction. For each non-archived doc, identify the factual claims that depend on the code: file paths, exported symbols, env vars, ports, commands, CLI flags, dependency versions, architectural assertions, "how it works" descriptions. These are the verifiable surface; prose framing around them is left as-is unless the framing implies a wrong fact.
Code lookup, every claim. For each claim, ground it in the codebase. Use browzer explore "<symbol or concept>" --json --save /tmp/explore.json first; fall back to Read on a concrete file only when explore points there. Don't grep-walk the tree — that's what the index is for, and the bootstraper is meant to use the existing index, not bypass it.
Verdict per claim — apply this matrix:
| Claim status | Action |
|---|---|
| Matches the code today | Keep verbatim. |
| Wrong but the right answer is obvious from the code | Rewrite the claim in place. |
| Wrong AND no claim is needed (the doc was describing something that no longer exists) | Delete the claim outright. No marker. No TODO. |
| Duplicated across 2+ docs | Pick the most authoritative location (typically the closest CLAUDE.md / package README), keep it there, delete the duplicates. |
| Confusing / contradictory across two docs | Resolve against code. Rewrite the surviving copy. Delete the contradicting fragments. |
| Cannot verify (no relevant code found) | Treat as wrong. Delete. The bar is "demonstrably true today", not "plausible". |
Documents that survive the audit empty. When every factual claim in a doc was deleted, the doc itself is deleted (rm <path>). A doc with only its title and zero useful content adds noise to retrieval; deletion is the right answer. The audit trail (Phase 4's diff) shows exactly what went.
The audit MUST NOT introduce ambiguity. "Stale" is not a status the skill emits; the skill either fixes the claim or removes it. Markers like > ⚠️ STALE, <!-- delete candidate -->, [needs verification] are explicitly banned outputs.
When two docs disagree, code wins. Always. If the code itself is unclear, deletion is preferred to leaving a guess in the doc — a missing claim is fixable on the next edit; a wrong claim is silently misleading.
After the audit completes, summarise the changes in chat (terse, one paragraph at most) and surface the unified diff for review:
git diff --stat
git status --short
Optionally, when the operator wants the full diff: git diff (the operator can scroll). Don't paste a multi-thousand-line diff into chat by default.
Then ask, once:
AskUserQuestion:
Doc reconciliation produced <N> edits + <D> deletions across <F> files.
How do you want to proceed?
(a) commit — invoke /commit with the diff as-is
(b) modify — tell me what to add, remove, or change before committing
(c) skip — leave changes staged but don't commit (you'll commit manually)
Wait for the operator's reply. Do NOT proceed past this gate without an explicit answer. If the operator picks modify, apply the requested adjustments, re-show git diff --stat, and ask again.
The order is: commit FIRST, index SECOND. The index built in this phase reflects the cleaned docs — that's the entire point of bootstrapping in this order.
commit)Invoke the commit skill using the Claude Code Skill tool (not a bash command):
Use the Skill tool: skill name =
commit.
The commit skill writes a Conventional Commits message (typically docs(bootstrap): reconcile existing docs against codebase or similar — let it choose based on the repo's recent log). When no feat dir exists for this skill's run, commit operates standalone — that's the expected path.
Skip the commit entirely when:
skip in Phase 3.git status --short is empty after Phase 2). Tell the operator "docs already match the code; no commit needed."Now that the docs are clean (or were already clean), build the structural + document index:
exit 3 or empty) → browzer init then browzer workspace index. The init step creates .browzer/config.json and may modify .gitignore and append a KB section to a top-level CLAUDE.md. Those changes are real edits to the repo and DO need a commit; if the operator already approved Phase 4.1, run browzer init BEFORE commit so init's writes ride along with the doc reconciliation. Otherwise, after init runs, surface the new files in chat and ask whether to commit them now.browzer sync. Re-indexes both code and the just-cleaned docs.Result on completion:
browzer status --json --save /tmp/browzer-bootstrap-status.json
The status JSON should show the workspace as current (commitsBehind: 0 or equivalent, depending on CLI version).
browzer-bootstraper: reconciled <E> edits, <D> deletions across <F> docs; <commit-action>; workspace <action> (<N> code files indexed)
Where <commit-action> is one of commit <sha> | commit skipped per operator | no commit (docs already clean), and <action> is created | synced | unchanged.
Failures use the standard two-line stop contract:
browzer-bootstraper: stopped at <phase> — <one-line cause>
hint: <single actionable next step>
init.browzer sync is a no-op when nothing changed.A second run on the same repo, with no source-code drift since the first, produces no commit and no index change.
generate-task → execute-task work, not bootstraper work.STALE, delete candidate, <!-- TODO: verify -->, etc.). Either fix the claim or delete it.browzer workspace delete from inside this skill. Workspace lifecycle is workspace-management's job..git — Browzer works on directories, but the commit step requires git. Offer to run Phase 2 (reconciliation in-place, leave changes staged) and skip Phase 4./. Refuse — the audit would walk into territory it shouldn't.The skill emits ONE confirmation line on success, or the two-line stop contract on failure. Banned from chat output: phase-by-phase summaries, multi-line ✅ banners, "Next steps" blocks, full diff dumps. The diff lives in git; the chat line is the cursor.
use-rag-cli — install + authenticate (anchor skill; this skill assumes auth).embed-workspace-graphs — browzer init + browzer workspace index (Phase 4.2 wraps these).commit — Conventional-Commits formatter for Phase 4.1.finalize-feature — workflow phase that patches host docs (Phase A) and renders the feat README (Phase B); complements bootstraper but operates on a single change rather than the whole repo.sync-workspace — lighter-touch re-index for incremental changes after the initial bootstrap.workspace-management — when the operator actually wants to delete / relink a workspace.npx claudepluginhub browzeremb/skills --plugin browzerGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.