setup-wiki

A command that prepares a repository for atomic-claude wiki conventions by checking its Git setup, ignore rules, documentation folders, and CLAUDE.md file.

In plain words
What is it for?
Use it to bootstrap or assess a repository's wiki arrangement, determine whether it belongs to a project or a wider realm, and propose only the required setup.
Why use it?
It shows what setup is missing without overwriting existing files or committing changes automatically.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/damusix/atomic-claude/setup-wiki
Clone the repo
git clone --depth 1 https://github.com/damusix/atomic-claude
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,439 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00043 $0.04439
Opus 5 $0.00022 $0.02219
Sonnet 5 $0.00009 $0.00888
Haiku 4.5 $0.00004 $0.00444

Measured 3d ago against content hash 00437a19bcfe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade D, and why

setup-wiki scanned grade D with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

| `atomic` binary missing | Print: `curl -fsSL https://raw.githubusercontent.com/damusix/atomic-claude/main/install.sh \| bash`. Setup does not run the install — user runs the curl. |

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

| `.gitignore` has `.claude/.scratchpad/` | grep `^\.claude/\.scratchpad/?$` | yes / no |

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| `atomic` binary missing | Print: `curl -fsSL https://raw.githubusercontent.com/damusix/atomic-claude/main/install.sh \| bash`. Setup does not run the install — user runs the curl. |
context/commands/setup-wiki.md · 360 lines

How it starts

The opening of the file, as written. The whole thing — 360 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You set up the repo for atomic-claude conventions. Detect first, propose second, apply only what the user confirms.

Pre-flight

  1. Run these two checks in parallel:

    • git rev-parse --is-inside-work-tree 2>/dev/null
    • test -d wiki && echo wiki-present || echo wiki-absent
  2. If NOT in a git repo:

    • wiki/ directory present → realm root confirmed. Set WIKI_SCOPE=realm; skip the init prompt and proceed to Scope detection.
    • No wiki/ directory → prompt via AskUserQuestion:
      Not a git repo. Initialize one?
      - Yes, run git init
      - No, stop
      
      On Yes: git init. On No: refuse and stop.

Scope detection

Determine WIKI_SCOPE (skip if pre-flight already set it to realm):

git repo? wiki/ present? WIKI_SCOPE
No Yes realm (set in pre-flight)
Yes No repo
Yes Yes Ask user (see below)

Ambiguous case — git repo with a wiki/ directory present. Prompt via AskUserQuestion:

A wiki/ directory exists inside this git repo. Which scope applies?
- realm — this directory is a realm root (wiki/ is the attached wiki repo)
- repo  — this is a single git repo with its own wiki/ storage
- unsure / cancel — treat as repo

Accept realm or repo as typed input or a button choice. If the user cancels, answers ambiguously, or chooses "unsure / cancel", default to repo and note "wiki-type defaulted to repo (wiki/ present inside git repo — user did not confirm realm)" in the Step 5 output.

WIKI_SCOPE is now set to either repo or realm. It is surfaced in the Step 5 report only — the wiki pipeline (/refresh-wiki) writes the <wiki-type> marker itself, into the wiki index it generates.

Step 1 — Audit

Inspect the repo. Build this status table:

Convention Present? Status
.gitignore exists check test -f .gitignore exists / missing
.gitignore has tmp/ grep ^tmp/?$ yes / no
.gitignore has .claude/.scratchpad/ grep ^\.claude/\.scratchpad/?$ yes / no
.claude/worktrees/ ignored git check-ignore -q .claude/worktrees/probe (rule may live in nested .claude/.gitignore) yes / no
CLAUDE.md at repo root test -f CLAUDE.md exists / missing
docs/ directory test -d docs exists / missing
docs/spec/ directory test -d docs/spec exists / missing
docs/design/ directory test -d docs/design exists / missing
README.md at repo root test -f README.md exists / missing
atomic binary on PATH command -v atomic found / missing
SessionStart hook registered in .claude/settings.json parse .claude/settings.json (JWCC tolerated) and look for a SessionStart entry whose hooks[].command value is atomic hooks session-start (the inline command written by atomic hooks install) registered / missing
docs/wiki/index.md test -f docs/wiki/index.md exists / missing
Signals @-ref wired present in ANY of claude.local.md, CLAUDE.local.md, CLAUDE.md — check each with grep -qF '@docs/wiki/index.md' <file> (mirrors the atomic-wiki-inferrer search order); n/a only when none of the three files exist. Only docs/wiki/index.md (the compact router) is @-ref'd — docs/wiki/scan.md is too large for context on big repos and is read by the inferrer on demand. yes / no / n/a
Legacy .signalsignore at repo root test -f .signalsignore present (needs migrating) / absent
docs/wiki/CLAUDE.md test -f docs/wiki/CLAUDE.md exists / missing

Read the full file on GitHub · 360 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 360 lines · 43 tokens per session scan D 00437a19bcfe

Subscribe to this mod's changes

setup-wiki is a command published in the GitHub repository damusix/atomic-claude (83 stars, last pushed 8d ago), licensed MIT. It adds 43 tokens to every session and 4,439 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it D with 3 findings (downloads and executes remote code, reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.