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, when an agent hallucinates domain term meaning, or when user asks to bootstrap / extend the repo's domain glossary. Surfaces candidate terms by identifier frequency, asks the user for 1-sentence definitions, writes `GLOSSARY.md` at
$ npx -y skills add Filip-Podstavec/claude-leverage --skill glossary-init --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/glossary-initContext preview
The summary Claude sees to decide when to auto-load this skill.
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 glossary. Surfaces candidate terms by identifier frequency, asks the user for 1-sentence definitions, writes `GLOSSARY.md` at
name: glossary-init description: > 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 glossary. Surfaces candidate terms by identifier frequency, asks the user for 1-sentence definitions, writes `GLOSSARY.md` at repo root. Idempotent — re-running adds new terms without overwriting existing ones. Read-only on code; never invents domain meaning. Full Do/Don't list in this SKILL body. See ADR 0005 for why this file lives at root. allowed-tools: - Read - Write - Edit - Glob - Grep - Bash(git rev-parse:*) - Bash(git ls-files:*) - Bash(test:*) - Bash(ls:*) - Bash(wc:*) argument-hint: "[--top N] [--lang python|typescript|go|rust|auto] [--add term] [--noninteractive]"
Bootstraps (or extends) `GLOSSARY.md` at the repo root — a human-curated dictionary of domain terms specific to *this* repo. One entry per term: 1–2 sentence definition, optional aliases, optional code-path pointers.
The point: the next agent opening this repo greps `GLOSSARY.md` once and stops hallucinating that "Lead" means a sales prospect when *here* it means a journalist's article lead. Reading source to recover domain meaning per session is O(N) tokens per term; a one-line glossary entry is O(1).
This skill **surfaces candidate terms** (by frequency of identifier appearance in tracked code). It **never invents definitions** — the user types them, the skill structures the file. See ADR 0005 for the rationale.
domain term ("I think `Lead` is a sales prospect" — no, it's a journalist's article).
terms (existing entries are preserved).
Do NOT invoke for:
not in this repo's glossary).
1. **Resolve repo root.** `git rev-parse --show-toplevel`. If not in a git repo, STOP and report: "glossary needs a tracked repo; `git init` first or run `/init-repo`".
2. **Detect mode.**
**single-add mode** (skip candidate ranking, jump to step 6 for that one term).
candidates that aren't already in the existing file, propose additions.
3. **Detect primary language** by file extension counts in tracked files (`git ls-files | head -2000`):
4. **Walk identifiers.** From `git ls-files` (skip generated paths, tests, vendor, node_modules, `__pycache__`, `dist`, `build`, `.git`, `bench/`), extract identifiers via language-aware patterns:
`def\s+([a-z_][a-z0-9_]+)` (functions — medium signal). Domain terms are usually classes / type aliases / dataclasses, not ordinary functions.
Count occurrences across the repo (not just declarations — also usage). The more a term is referenced, the more load-bearing.
5. **Filter and rank.** Drop:
base classes (`BaseModel`, `Exception`, `HTTPException`, `Error`, `Request`, `Response`, `Client`, `Config`, `Settings`).
`Update`, `Delete` alone).
starts with `Http`, `Json`, `Sql`, `Db`, `Aws`, `Gcp`, `Azure`).
Rank remaining by `occurrences * log(distinct_files)` — terms that appear in many places AND many files are more central than a term used 50 times in one file.
Cap candidates at `--top N` (default 30).
6. **Surface candidates** (skip in `--add` mode):
I found these load-bearing domain terms in <repo>: 1. Tenant (47 refs across 12 files) — e.g. src/auth/tenant.py:14 2. Invoice (38 refs across 8 files) — e.g. src/billing/invoice.py:8 3. Lead (29 refs across 6 files) — e.g. src/content/lead.py:22 ... Pick which to include (numbers separated by spaces, "all", or "skip").
In `--noninteractive` mode, include the top 15 with `<TODO: definition>` placeholders so the user fills them later. Mark such entries with an HTML comment `<!-- claude-leverage:glossary-todo -->` so future runs can spot them.
7. **For each picked term, prompt:**
goes by in code, docs, conversations with this user.
In `--noninteractive`, fill definition with `<TODO>` placeholder.
8. **Write `GLOSSARY.md`.**
<!-- claude-leverage:glossary v1 --> # Glossary Domain terms specific to this repo. Hand-curated. Update via `/glossary-init --add <term>` or by editing this file directly. Read this **before** assuming a term means what it does elsewhere — domain vocabulary diverges between projects. ## Tenant A customer organization. One Tenant → many Users. Distinct from "Account" which is the
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…