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 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
$ npx -y skills add Filip-Podstavec/claude-leverage --skill arch-map --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/arch-mapContext preview
The summary Claude sees to decide when to auto-load this skill.
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?" / "what's the public surface of X?" that the prose AGENTS.md doesn't give cheaply. Bootstraps or refreshes
name: arch-map description: > 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?" / "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. allowed-tools: - Read - Write - Edit - Glob - Grep - Bash(git rev-parse:*) - Bash(git ls-files:*) - Bash(test:*) - Bash(ls:*) - Bash(find:*) - Bash(python:*) - Bash(python3:*) argument-hint: "[--depth N] [--validate] [--target path] [--noninteractive]"
Maintains `architecture.yml` at the repo root — a hand-curated, machine-readable map of top-level modules. Complements [`/repo-map`](../repo-map/SKILL.md), which generates a *human-readable* mermaid diagram; this skill produces the *structured-metadata* layer an agent can load and query in one parse.
The point: agents proposing refactors regularly ask "is this module stable or experimental?" / "what's the public surface I shouldn't silently rename?" / "what module does this pair with?". Re-deriving the answer from prose AGENTS.md + directory tree walks is wasted tokens every session. `architecture.yml` answers in one YAML load.
This skill **drafts the file** (from directory walk + AGENTS.md hints). The user **confirms `role` and `stability`** per module. Auto-generated guesses get a `<TODO>` placeholder until the user fills them.
See ADR 0005 for the rationale (why YAML over JSON, why root over `docs/`, why not per-folder).
after `/repo-map`).
removed).
read `architecture.yml` first than guess at module roles.
Do NOT invoke for:
in the code).
`madge`/`pydeps` block).
*architectural*, not point-in-time).
# claude-leverage:architecture-map v1
# Hand-curated structured architecture metadata. Update via /arch-map
# or by hand-editing this file. Schema: claude-leverage v1.
# See: https://github.com/Filip-Podstavec/claude-leverage/blob/main/skills/arch-map/SKILL.md
repo:
name: "<repo-name>"
primary_lang: "<lang or lang+lang+lang>"
one_line: "<one-sentence concrete description: what + for whom>"
modules:
- path: "<dir-or-file>/"
role: "<one-line purpose>"
stability: stable | evolving | experimental | deprecated
public_surface:
- "<name agents must not silently rename>"
- "<another>"
depends_on:
- "<other module path>"
paired_with: "<module that mirrors this one>"
owners:
- "<name or @handle>"rename (the rename will break callers outside the module). Strings.
module depends on at the architectural level (not import-level).
e.g. `agents/` paired with `.codex/agents/`.
| Value | Meaning | |-------|---------| | `stable` | Public surface is load-bearing; renames need an ADR + caller migration. | | `evolving` | Public surface may change; callers should pin imports. | | `experimental` | May be deleted entirely. Don't depend on this module from outside. | | `deprecated` | Scheduled for removal. New code should not reference it. |
1. **Resolve repo root.** `git rev-parse --show-toplevel`. If not in a git repo, STOP and report.
2. **Detect mode.**
fields, check `path` values exist, report findings, write nothing.
re-walk directories, suggest entries for new modules; preserve existing module entries unchanged.
3. **Walk top-level directories** (depth 1 by default; pass `--depth N` for 1–3). Skip:
`.next`, `.pytest_cache`, `target`, `vendor`, `bench/archive-*`.
4. **For each non-trivial directory, infer:**
slash.
extract the first H1 heading + first paragraph. If no AGENTS.md, emit `"<TODO: one-line purpose>"`.
The skill won't guess this; the user knows.
without leading `_`, plus any obvious exports (Python `__all__`, TS named exports, Go exported identifiers). Cap at 10 entries. If unclear, omit the field.
meaningful.
mirror of `<name>/`, propose that pairing.
5. **Read existing `architecture.yml`** i
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 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…
USE WHEN setting up a repo for AI-first work, when an agent hallucinates domain term meaning, or when user asks to bootstrap / extend the repo's domain…