init-repo
Skill68 starsChanged 4 months agoMITView on GitHub
USE WHEN starting work in a project that lacks a claude-leverage AGENTS.md (no `claude-leverage:` marker blocks at git root), or when user asks to set up the stack here. Drops AGENTS.md + `.gitignore` patterns + optional language-specific logging template + optional CLAUDE.md routing snippets. Interactive, idempotent via markers.
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- neurawork-git/n8n-autopilottheir own version, first seen Oct 1, 2026
- OVYVO/yan-skillstheir own version, first seen Apr 16, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- neurawork-git/n8n-autopilot★ 18same name
- OVYVO/yan-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adr-newSkill
- arch-mapSkill
- codex-sandboxSkill
- conventions-initSkill
- dynamic-checkSkill
- explain-diffSkill
- glossary-initSkill
- log-structuredSkill
- process-diagramSkill
- refresh-context-mapSkill
- repo-doctorSkill
- repo-mapSkill
- security-reviewSkill
- session-logSkill
- stack-checkSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 48
Resolve target dir: Default cwd. If $ARGUMENTS has a path, use that.
- Very specific: line 95
Write to <target>/AGENTS.md.
- Distinctive: line 96
STOP and ask: "an unmanaged AGENTS.md exists.
- Very specific: line 100
If exists with @AGENTS.md already: skip (idempotent).
- Very specific: line 101
If exists without @AGENTS.md: ask "prepend @AGENTS.md to your existing CLAUDE.md?"
- Very specific: line 103
If absent: write @AGENTS.md\n.
- Distinctive: line 115
If markers exist already: replace block in place (rules may have evolved across plugin versions).
- Very specific: line 117
If no .gitignore: create one with just this block.
- Distinctive: line 129
Ask user to confirm or override the path.
- Distinctive: line 130
Write only if file doesn't exist (don't overwrite working code).
- Very specific: line 137
Confirm before write: Default is interactive. --noninteractive is for scripted use only.
- Very specific: line 141
Never overwrite working logging code: If logging_setup.<ext> already exists at the target path, skip and report it.
- Distinctive: line 170
After a major plugin version bump that ships new convention sections (skill detects drift via markers and offers update).
- Very specific: line 183
Install language toolchains: If you're on a Python project without pyproject.toml, this skill won't pip install anything — it just suggests …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/init-repo
What it does
Sets up a fresh (or existing) repository to use the claude-leverage stack's conventions:
- AGENTS.md — drops a customized copy of
templates/AGENTS.md.example, with placeholders filled in from the detected project name, stack, and conventions. - CLAUDE.md — creates a one-line
@AGENTS.mdimport file so Claude Code sees the canonical guidance. - .gitignore — appends a block (between markers) ignoring the
stack's local state dirs (
.last-stack-check, session-nudge files) and per-language artifacts that would otherwise show up in/repo-mapnoise. - Logging template (optional, per detected language) — drops the
matching
templates/logging/<lang>.mdbody into a sensible path in the project (e.g.,src/<pkg>/logging_setup.py). - AIDEV-NOTE convention reminder — a single line at the top of the new AGENTS.md pointing at the spec.
Each step is confirmed before write. Re-running detects already- installed sections via marker comments and offers update-in-place.
Workflow
- Resolve target dir. Default cwd. If
$ARGUMENTShas a path, use that. Verify it's a git repo (git rev-parse --show-toplevelfrom the target). If not, ask the user: "this isn't a git repo —git initfirst, 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→ Rust- Mixed / none → ask the user, default
none. - Override with
--langflag.
- Read project name from manifest (
package.json#name,pyproject.toml [project] name,go.modfirst line,Cargo.toml [package] name). Fall back to directory name. - Plan the changes as a numbered list. Show the user:
UnlessI'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)--noninteractive, wait for confirmation. With--noninteractive, write all 4. For each accepted change:
5a. AGENTS.md
- Read
templates/AGENTS.md.example. - Substitute placeholders:
<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 possible
- Per-language extras section:
- For Python: add
pytesttest command, ruff/black lint guidance - For TS: add
npm test, eslint guidance - For Go: add
go test ./...,golangci-lintguidance - For Rust: add
cargo test,cargo clippyguidance
- For Python: add
- Wrap the file body in marker comments:
<!-- claude-leverage:agents-md START -->/... END -->so future re-runs can detect and offer update-in-place. - Write to
<target>/AGENTS.md. If a non-managed AGENTS.md exists, STOP and ask: "an unmanaged AGENTS.md exists; merge / overwrite / skip?"
5b. CLAUDE.md
- If exists with
@AGENTS.mdalready: skip (idempotent). - If exists without
@AGENTS.md: ask "prepend@AGENTS.mdto your existing CLAUDE.md?" - If absent: write
@AGENTS.md\n.
5c. .gitignore
- Wrap appended block in markers:
# <!-- 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 --> - If markers exist already: replace block in place (rules may have evolved across plugin versions).
- If no
.gitignore: create one with just this block.
5d. Logging template
- Read
templates/logging/<lang>.md. - Extract the language-specific code block (between the first
"```
<lang>" fence and matching close). - Suggest target path:
- Python:
src/<pkg_name>/logging_setup.py(or<pkg_name>/logging_setup.pyif nosrc/layout) - TypeScript:
src/lib/logging.ts - Go:
internal/logging/logging.go - Rust:
src/logging.rs
- Python:
- Ask user to confirm or override the path.
- Write only if file doesn't exist (don't overwrite working code).
- Read
- Summarize. Report what was written, what was skipped, what
needs human follow-up (e.g., placeholder
<one-line purpose>).
Hard rules
- Confirm before write. Default is interactive.
--noninteractiveis for scripted use only. - Idempotent. Re-running finds marker blocks and offers update-in- place rather than appending duplicates.
- Never overwrite working logging code. If
logging_setup.<ext>already exists at the target path, skip and report it. - Never invent project metadata. Fields like "purpose" or
"stack details" get a
TODO: fill inplaceholder if the user cannot answer. - Refuse on non-git dirs unless explicitly allowed. Random
directory bootstrap is a foot-gun. The interactive flow asks
"proceed anyway?" when
.git/is missing;--noninteractivemode refuses unless--allow-non-gitis also passed.
Tunables
--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-gitif you really mean it).--allow-non-git— explicitly proceed in non-git directories. The interactive flow asks this question automatically; in--noninteractivemode the flag is the only way to opt in.--dry-run— print what would be written, write nothing.
When to run
- First time setting up a new repo where you want this stack's conventions to apply.
- Onboarding an existing repo to the conventions (skill detects existing AGENTS.md and offers merge).
- After a major plugin version bump that ships new convention sections (skill detects drift via markers and offers update).
Pairs with /log-structured (audit existing logs against the spec)
and /security-review (audit changes once the conventions are in
place).
What this skill does NOT do
- Configure CI. Adding GitHub Actions / Codex hooks / etc. is too project-specific; this skill just sets up the AGENTS.md guidance.
- Run
git init. That's a user-level decision; we offer to proceed-anyway if missing. - Install language toolchains. If you're on a Python project
without
pyproject.toml, this skill won'tpip installanything — it just suggests what to add.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

