/claude-leverage:init-repo [target-dir] [--lang python|typescript|go|rust|none] [--noninteractive]from claude-leverage
Sets up a new or existing repository with Claude Code conventions: creates AGENTS.md, CLAUDE.md, .gitignore patterns, and optional language-specific logging templates. Interactive and idempotent.
Ships in claude-leverage. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Sets up a fresh (or existing) repository to use the claude-leverage stack's conventions:
templates/AGENTS.md.example,
with placeholders filled in from the detected project name, stack,
and conventions.@AGENTS.md import file so Claude
Code sees the canonical guidance..last-stack-check, session-nudge files)
and per-language artifacts that would otherwise show up in /repo-map
noise.templates/logging/<lang>.md body into a sensible path in
the project (e.g., src/<pkg>/logging_setup.py).Each step is confirmed before write. Re-running detects already- installed sections via marker comments and offers update-in-place.
Resolve target dir. Default cwd. If $ARGUMENTS has a path, use
that. Verify it's a git repo (git rev-parse --show-toplevel from
the target). If not, ask the user: "this isn't a git repo — git init first, or proceed anyway?"
Detect language from file presence. Check in order:
package.json → TypeScript / Node.jspyproject.toml / setup.py / requirements.txt → Pythongo.mod → GoCargo.toml → Rustnone.--lang flag.Read project name from manifest (package.json#name,
pyproject.toml [project] name, go.mod first line, Cargo.toml [package] name). Fall back to directory name.
Plan the changes as a numbered list. Show the user:
I'll add the following to <target-dir>:
1. AGENTS.md — customized for <lang>, project name <name>
2. CLAUDE.md — single @AGENTS.md import line
3. .gitignore — append claude-leverage state patterns (~5 lines)
4. <pkg>/logging_setup.<ext> — structured-logging starter
Proceed? (y / n / select-subset)
Unless --noninteractive, wait for confirmation. With
--noninteractive, write all 4.
For each accepted change:
templates/AGENTS.md.example.<project-name> → resolved name<one-line purpose> → ask user (or "TODO: fill in")<languages, primary frameworks> → detected<install-cmd>, <test-cmd>, etc. → ask user, infer from
manifest if possiblepytest test command, ruff/black lint guidancenpm test, eslint guidancego test ./..., golangci-lint guidancecargo test, cargo clippy guidance<!-- claude-leverage:agents-md START --> / ... END --> so
future re-runs can detect and offer update-in-place.<target>/AGENTS.md. If a non-managed AGENTS.md exists,
STOP and ask: "an unmanaged AGENTS.md exists; merge / overwrite /
skip?"@AGENTS.md already: skip (idempotent).@AGENTS.md: ask "prepend @AGENTS.md to your
existing CLAUDE.md?"@AGENTS.md\n.# <!-- claude-leverage:gitignore START -->
# claude-leverage local state (per-machine, do not commit)
.last-stack-check
session-nudges-*.txt
security-nudges-*.txt
# <!-- claude-leverage:gitignore END -->
.gitignore: create one with just this block.templates/logging/<lang>.md.src/<pkg_name>/logging_setup.py (or
<pkg_name>/logging_setup.py if no src/ layout)src/lib/logging.tsinternal/logging/logging.gosrc/logging.rsSummarize. Report what was written, what was skipped, what
needs human follow-up (e.g., placeholder <one-line purpose>).
--noninteractive
is for scripted use only.logging_setup.<ext>
already exists at the target path, skip and report it.TODO: fill in placeholder if the user
cannot answer..git/ is missing; --noninteractive mode
refuses unless --allow-non-git is also passed.--lang <name> — skip detection, use this language.--lang none — no logging template, just AGENTS.md / CLAUDE.md /
.gitignore.--noninteractive — confirm nothing, write all 4. Refuses to run on
non-git dirs (no interactive prompt to fall back on; combine with
--allow-non-git if you really mean it).--allow-non-git — explicitly proceed in non-git directories. The
interactive flow asks this question automatically; in
--noninteractive mode the flag is the only way to opt in.--dry-run — print what would be written, write nothing.Pairs with /log-structured (audit existing logs against the spec)
and /security-review (audit changes once the conventions are in
place).
git init. That's a user-level decision; we offer to
proceed-anyway if missing.pyproject.toml, this skill won't pip install anything —
it just suggests what to add.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
TypeScript, Python, Go, Rust
npx claudepluginhub filip-podstavec/claude-leverage --plugin claude-leverage16 skills in this plugin
/adr-newUSE WHEN a load-bearing architectural decision is being made in conversation (database / framework / auth model / integration choice, or explicit rejection of an alternative) — one likely to be re-litigated in 6 months without the rationale. Bootstraps a numbered MADR ADR in `docs/adr/`, asks for context + decision + alternatives, updates the index. Immutable status once accepted. See `docs/adr/README.md` for the convention; full Do/Don't list in this SKILL body.
/arch-mapUSE WHEN setting up a repo for AI-first work, after a major directory restructure, or when an agent needs structured answers like "which modules are stable?" / "what's the public surface of X?" that the prose AGENTS.md doesn't give cheaply. Bootstraps or refreshes `architecture.yml` at repo root — machine-readable module metadata (path / role / stability / public_surface / depends_on / paired_with / owners). Hand-curated; the skill drafts, the user confirms. See ADR 0005 for why this file lives at root and why YAML over JSON.
/codex-sandboxUSE WHEN setting up Codex CLI in a project, tightening sandbox for prod/CI, or when user asks about Codex permissions. Interactive helper for per-project `.codex/config.toml`: `dev` / `prod` / `custom` profiles, idempotent via markers, preserves unmanaged config below the block. Codex-only artifact.
/conventions-initUSE WHEN setting up a repo for AI-first work (after /init-repo), or when the context-surface hook should start feeding repo conventions to agents before edits. Drafts `conventions.yml` at repo root: per-kind casing (inferred from the code), a vague-name denylist seed, directory roles, and a hand-filled house-rules block. Idempotent — never overwrites a populated file; re-running prints suggested additions for manual merge. Read-only on code; never invents house rules. After writing, run /refresh-context-map so the hook picks it up.
/dynamic-checkUSE WHEN the user explicitly asks to verify that this repo's DECLARED build/test/lint commands actually run ("does the quickstart work?", "validate the commands in AGENTS.md"), typically after /repo-doctor or /repo-doctor --semantic raised suspicion. Executes only commands the repo itself declares (AGENTS.md build/test blocks, README quickstart), with preview + explicit confirmation, denylist tripwire, and timeouts. Advisory — results never enter /repo-doctor's deterministic score (ADR 0012/0013). Opt-in by invocation; never fired by hooks or other skills.
/explain-diffUSE WHEN about to open a PR, when teammate asks "what's in this diff?", or when returning to a branch and needing self-orientation. Three modes: `--for pr|review|self`. Reads `git diff HEAD` (or passed range), returns 3–5 bullet plain-English narration. Read-only — defers security/test concerns to other skills.
Other plugins' skills for the same job