adr-new
USE WHEN a load-bearing architectural decision is being made in conversation (database / framework / auth model / integration choice, or explicit rejection of…
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
$ npx -y skills add Filip-Podstavec/claude-leverage --skill init-repo --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/init-repoContext preview
The summary Claude sees to decide when to auto-load this skill.
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
name: init-repo description: > 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. allowed-tools: - Read - Write - Edit - Glob - Bash(test:*) - Bash(ls:*) - Bash(git rev-parse:*) argument-hint: "[target-dir] [--lang python|typescript|go|rust|none] [--noninteractive]"
Sets up a fresh (or existing) repository to use the claude-leverage stack's conventions:
1. **AGENTS.md** — drops a customized copy of [`templates/AGENTS.md.example`](../../templates/AGENTS.md.example), with placeholders filled in from the detected project name, stack, and conventions. 2. **CLAUDE.md** — creates a one-line `@AGENTS.md` import file so Claude Code sees the canonical guidance. 3. **.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-map` noise. 4. **Logging template** (optional, per detected language) — drops the matching `templates/logging/<lang>.md` body into a sensible path in the project (e.g., `src/<pkg>/logging_setup.py`). 5. **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.
1. **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?"
2. **Detect language** from file presence. Check in order:
3. **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.
4. **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.
5. **For each accepted change:**
manifest if possible
`<!-- claude-leverage:agents-md START -->` / `... END -->` so future re-runs can detect and offer update-in-place.
STOP and ask: "an unmanaged AGENTS.md exists; merge / overwrite / skip?"
existing CLAUDE.md?"
# <!-- 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 -->evolved across plugin versions).
"```<lang>" fence and matching close).
`<pkg_name>/logging_setup.py` if no `src/` layout)
6. **Summarize.** Report what was written, what was skipped, what needs human follow-up (e.g., placeholder `<one-line purpose>`).
is for scripted use only.
place rather than appending duplicates.
already exists at the target path, skip and report it.
"stack details" get a `TODO: fill in` placeholder if the user cannot answer.
directory bootstrap is a foot-gun. The interactive flow asks "proceed anyway?" when `.git/` is missing; `--noninteractive` mode refuses unless `--allow-non-git`
Make any repo AI-first - write sustainable code from the start, or refactor a legacy codebase to prepare it for agent-driven development.Building blocks for Claude Code: subagents, slash commands, hooks, and workflow patterns. Copy what you need. A working developer's stack for Claude Code.
Repo: Filip-Podstavec/claude-leverage
USE WHEN a load-bearing architectural decision is being made in conversation (database / framework / auth model / integration choice, or explicit rejection of…
USE 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?" /…
USE 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…
USE 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.…
USE WHEN the user explicitly asks to verify that this repo's DECLARED build/test/lint commands actually run ("does the quickstart work?", "validate the…
USE 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…