From claude-leverage
Bootstraps a repository with claude-leverage stack conventions: AGENTS.md, CLAUDE.md, .gitignore patterns, and optional language-specific logging templates. Interactive and idempotent.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-leverage:init-repo [target-dir] [--lang python|typescript|go|rust|none] [--noninteractive][target-dir] [--lang python|typescript|go|rust|none] [--noninteractive]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Sets up a fresh (or existing) repository to use the claude-leverage
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.npx claudepluginhub filip-podstavec/claude-leverage --plugin claude-leverageGenerates and updates AGENTS.md (CLAUDE.md) using a dynamic template that auto-detects project type and injects tooling-specific Environment & Tooling sections.
Interactive wizard configures repositories for Claude Code best practices by creating CLAUDE.md, slash commands, agents, hooks, and permissions. Activates on 'setup claude', 'init claude', or repo setup requests.
Automatically configure Claude Code best practices for new projects: directory skeleton, AGENTS.md, hooks, and interactive placeholders fill. Invoke via `/init-project`.