$git clone https://github.com/Filip-Podstavec/claude-leverageMake 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.
| 1 | <div align="center"> |
| 2 | |
| 3 | <img src="assets/banner.svg" alt="claude-leverage" width="640"> |
| 4 | |
| 5 | **Make any repo AI-first - write sustainable code from the start, or refactor a legacy codebase to prepare it for agent-driven development.** |
| 6 | |
| 7 | [](https://docs.anthropic.com/en/docs/claude-code) |
| 8 | [](https://developers.openai.com/codex) |
| 9 | |
| 10 | <sub>Convention layer (<code>AGENTS.md</code>) is also read by any AGENTS.md-aware tool - Cursor, Windsurf, Copilot…</sub> |
| 11 | |
| 12 | <br> |
| 13 | |
| 14 | [](https://github.com/Filip-Podstavec/claude-leverage/actions/workflows/ci.yml) |
| 15 | [](LICENSE) |
| 16 |  |
| 17 |  |
| 18 |  |
| 19 |  |
| 20 | |
| 21 | </div> |
| 22 | |
| 23 | > A small, opinionated **AI-coding-agent suite** for Claude Code and Codex CLI: |
| 24 | > deterministic security hooks, cross-tool skills, and self-maintaining |
| 25 | > conventions that keep a repo safe for the *next* agent to modify. |
| 26 | > |
| 27 | > **Complements** skills-based plugins like the official `superpowers` plugin; |
| 28 | > it does not try to replace them. |
| 29 | |
| 30 | ## Contents |
| 31 | |
| 32 | - [The problem it solves](#the-problem-it-solves) |
| 33 | - [Who it's for](#who-its-for) |
| 34 | - [Quick start](#quick-start) |
| 35 | - [Install](#install) |
| 36 | - [What you get](#what-you-get) |
| 37 | - [How it works](#how-it-works) |
| 38 | - [Benchmarks](#benchmarks) |
| 39 | - [How it compares](#how-it-compares) |
| 40 | - [What's inside](#whats-inside) |
| 41 | - [Why one repo for two tools](#why-one-repo-for-two-tools) |
| 42 | - [Honest history](#honest-history) |
| 43 | - [Verify, update, uninstall](#verify-update-uninstall) |
| 44 | - [License](#license) |
| 45 | |
| 46 | ## The problem it solves |
| 47 | |
| 48 | Shipping at velocity with AI agents is easy. Shipping in a way that the *next* |
| 49 | agent (human or AI) opening the repo in six months can still safely modify is |
| 50 | the hard part. That second part is what the hooks, conventions, and skills here |
| 51 | automate - not just at session start, but continuously as the repo grows. |
| 52 | |
| 53 | <table> |
| 54 | <tr><th align="left">Without a stack</th><th align="left">With claude-leverage</th></tr> |
| 55 | <tr> |
| 56 | <td>Context dies between sessions - every agent re-learns the repo from scratch.</td> |
| 57 | <td>AIDEV anchors + the <code>context-surface</code> hook surface the right facts at the moment of edit.</td> |
| 58 | </tr> |
| 59 | <tr> |
| 60 | <td>Docs drift out of sync with the code until nobody trusts them.</td> |
| 61 | <td>Self-maintenance nudges flag missing <code>AGENTS.md</code>, stale anchors, and code↔docs drift while it's still cheap to fix.</td> |
| 62 | </tr> |
| 63 | <tr> |
| 64 | <td>Big tasks lose the plot; the <em>why</em> behind decisions evaporates.</td> |
| 65 | <td>Durable memory: ADRs and distilled session logs carry intent across sessions.</td> |
| 66 | </tr> |
| 67 | <tr> |
| 68 | <td>Nothing stands between a careless agent and a leaked secret or a force-push.</td> |
| 69 | <td>Deterministic shell hooks block secrets, force-push, and <code>--no-verify</code> before any model decision.</td> |
| 70 | </tr> |
| 71 | </table> |
| 72 | |
| 73 | Three properties guide every decision in this repo: |
| 74 | |
| 75 | 1. **Security by default** - deterministic hooks, no model needed. |
| 76 | 2. **Self-maintaining as the repo grows** - non-blocking nudges surface |
| 77 | maintenance debt early. |
| 78 | 3. **Cross-tool by design** - same `AGENTS.md`, same `SKILL.md`, same hook |
| 79 | scripts in Claude Code and Codex. Author once. |
| 80 | |
| 81 | ## Who it's for |
| 82 | |
| 83 | - **Freelancer on client repos** - you ship features across many client |
| 84 | codebases through agents, and each one has to stay safe to hand back. The |
| 85 | security hooks and `AGENTS.md` conventions travel with you. |
| 86 | - **Team inheriting a legacy repo** - you've opened a six-month-old codebase |
| 87 | with no docs. `/repo-doctor` scores its AI-readiness and names the |
| 88 | highest-leverage gaps; the bootstrap skills make it navigable fast. |
| 89 | - **Solo builder shipping at velocity** - you want speed without the repo |
| 90 | rotting into unmaintainable AI-slop. Self-maintenance nudges plus ADR/session |
| 91 | memory keep intent intact. |
| 92 | |
| 93 | ## Quick start |
| 94 | |
| 95 | **Inheriting or already have a repo? Start here.** Install the plugin: |
| 96 | |
| 97 | ``` |
| 98 | /plugin marketplace add Filip-Podstavec/claude-leverage |
| 99 | /plugin install claude-leverage@filip-podstavec |
| 100 | ``` |
| 101 | |
| 102 | Then make the repo AI-ready, top-down: |
| 103 | |
| 104 | 1. **`/repo-doctor`** - read-only AI-readiness audit. Scores ~20 dimensions |
| 105 | (Foundation / Why / What / In-code / Hygiene / Sync) and names the gaps that |
| 106 | matter most. |
| 107 | 2. **Fix the top gaps it reports** - usually `/init-repo` (drop in a root |
| 108 | `AGENTS.md`), then `/arch-map` and `/glossary-init` for machine-readable |
| 109 | module metadata and domain terms. |
| 110 | 3. **`/refresh-context-map`** - build the manifest that powers just-in-time |
| 111 | context surfacing, so the right anchors appear at edit time. |
| 112 | |
| 113 | **Starting a fresh repo?** Install, th |