{"id":"24879b83-01bb-47c6-b245-af830705a38e","slug":"arbazkhan971-godmode","kind":"skill","name":"godmode","summary":"Autonomous AI coding agent — 126 skills, 7 subagents, 5 platforms. Iterative optimization with automatic rollback, failure memory, and parallel multi-agent execution. Plugin for Claude Code, Cursor, C","owner":"arbazkhan971","repoUrl":"https://github.com/arbazkhan971/godmode","license":"MIT","licenseTier":"permissive","trust":"community","stars":26,"match":null,"fewStars":false,"format":"skill","createdAt":"2026-03-19T11:05:41.000Z","addedAt":"2026-10-14T06:31:11.449Z","logoUrl":"https://avatars.githubusercontent.com/u/31075248?u=aabf8ac68f6dedd12552277009ecd80aecfa4be3&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools","memory-knowledge"],"tags":["ai-agents","autonomous-coding","autoresearch","claude-code","code-review","cursor","development-tools","gemini-cli"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-17T07:18:18.928Z","sample":false,"url":"https://conduits.dev/tools/arbazkhan971-godmode","language":"Shell","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"<div align=\"center\">\n\n# Godmode — Autonomous AI Coding Agent for Claude Code, Cursor, Codex & Gemini\n\n### Your AI writes code. Godmode makes it write *great* code — then proves it.\n\nGodmode turns any AI coding assistant into an autonomous engineering loop — 135 skills that measure every change, keep what improves, and revert what doesn't — installable on Claude Code, Codex, Cursor, Gemini CLI, OpenCode, pi, omp, and Amp.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Skills](https://img.shields.io/badge/skills-135-ff6b6b.svg)](skills/)\n[![Agents](https://img.shields.io/badge/subagents-7-ff9f43.svg)](agents/)\n[![Claude Code](https://img.shields.io/badge/Claude_Code-supported-4A90D9.svg)](adapters/)\n[![Codex](https://img.shields.io/badge/Codex-supported-10A37F.svg)](adapters/codex/)\n[![Gemini CLI](https://img.shields.io/badge/Gemini_CLI-supported-4285F4.svg)](adapters/gemini/)\n[![Cursor](https://img.shields.io/badge/Cursor-supported-000000.svg)](adapters/cursor/)\n[![OpenCode](https://img.shields.io/badge/OpenCode-supported-7C3AED.svg)](adapters/opencode/)\n[![pi](https://img.shields.io/badge/pi-supported-20B2AA.svg)](adapters/pi/)\n[![Amp](https://img.shields.io/badge/Amp-supported-2257D7.svg)](adapters/amp/)\n[![Benchmark](https://img.shields.io/badge/benchmark-30_tasks-9B59B6.svg)](docs/blog/godmode-vs-plain-agent-benchmark.md)\n\n<p><img src=\"demo/optimize-loop.gif\" alt=\"Terminal capture: godmode optimize loop on a real script — baseline 189ms, lru_cache KEEP at 0ms, fib(32) regression DISCARD at 517ms, reverted with git reset --hard\" width=\"880\"></p>\n<sub>Real capture, live pi session — a win kept, a regression caught and reverted. <a href=\"#see-it-in-action\">More demos ↓</a></sub>\n\n</div>\n\n> **TL;DR:** Install with `claude plugin install godmode`. Say `/godmode optimize my API` and walk away. It measures, iterates, keeps improvements, reverts failures, and stops when done.\n\n---\n\n## See It In Action\n\nReal captures from live pi sessions (zai/glm-5.3, recorded with [vhs](https://github.com/charmbracelet/vhs)) — tapes and targets in [demo/](demo/).\n\n### 1. Skill routing — request to matched skill\n\n*godmode Tier-1 matching routes a checkout rate-limiting request to the ratelimit skill.*\n\n<p align=\"center\"><img src=\"demo/skill-routing.gif\" alt=\"Terminal capture: godmode routing — Tier-1 matching dispatches a checkout rate-limiting request to the ratelimit skill (secondary: pay) and exits ROUTED_OK\" width=\"880\"></p>\n\n<details><summary>Transcript (accessible text fallback)</summary>\n\n```text\nReal session excerpt — demo/tapes/skill-routing.tape (recorded 2026-08-27, pi 0.84.3, zai/glm-5.3)\n\n$ timeout 240 pi -p -ne --model zai/glm-5.3 \\\n    --skill ~/.pi/agent/skills/godmode/godmode/SKILL.md \"Route only. The user request is: \\\n    we keep getting rate limited by the payment provider during checkout. [...]\"\n\nTier 1 match complete.\n\n- **Stack detected:** Godmode skill-plugin repo (skills/ + agents/, no runtime app code in scope)\n- **Tier 1 hits:** `ratelimit` (\"rate limit\", \"throttle\", 429 — direct match); `pay` (payments context, secondary)\n- **Phase:** THINK — rate limiting against a third-party provider is a design problem (client-side throttle/queue/backoff) before any build\n\n`DISPATCH: skill=ratelimit phase=THINK (secondary=pay) task=rate-limited-by-payment-provider-at-checkout`\n\nROUTED_OK\n\n$ git status --short\n(no output — the routing session modified nothing)\n```\n\n</details>\n\n### 2. Optimize loop — real keep, real revert\n\n*baseline 189ms, lru_cache KEEP at 0ms, fib(32) regression DISCARD at 517ms, reverted with git reset — real metric, real revert.*\n\n<p align=\"center\"><img src=\"demo/optimize-loop.gif\" alt=\"Terminal capture: optimize loop — baseline 189ms, lru_cache KEEP at 0ms, fib(32) regression DISCARD at 517ms, reverted with git reset --hard HEAD~1\" width=\"880\"></p>\n\n<details><summary>Transcript (accessible text fallback)</summary>\n\n<!-- markdownlint-disable no-hard-tabs -->\n```text\nReal session excerpt — demo/tapes/optimize-loop.tape (recorded 2026-08-27, pi 0.84.3, zai/glm-5.3)\n\n$ python3 -m unittest -q test_slow_fib\nRan 1 test in 0.230s\nOK\n\n$ bash metric.sh && bash metric.sh && bash metric.sh      # timing runs — the session derives its own baseline below\n278\n217\n211\n\n$ timeout 300 pi -p -ne --model zai/glm-5.3 \\\n    --skill ~/.pi/agent/skills/godmode/optimize/SKILL.md \"Setup answers: Goal = reduce the \\\n    runtime of work() in slow_fib.py. [...] Test exactly these two hypotheses in order: \\\n    (1) add functools lru_cache memoization to fib; (2) remove the lru_cache decorator and \\\n    change work() to return fib(32), claiming batch amortization. [...] A DISCARD must be \\\n    reverted with git reset --hard HEAD~1. [...]\"\n\n**Session complete** — baseline 189 ms → best 0 ms (−100%).\n\n- **Baseline:** median 189 ms (3 runs, variance <5%)\n- **R1 · H1 KEEP:** @lru_cache(maxsize=None) on fib → 0 ms (0,0,0), guard OK (work()=832040)\n- **R2 · H2 DISCARD:** removed cache, work()=fib(32) → 517 ms AND guard failed (2178309 ≠ 832040); reverted via git reset --hard HEAD~1\n- Stop: budget exhausted (2 rounds); kept commit 0c162a0; lessons + failures logged in .godmode/*\n\n$ cat .godmode/optimize-results.tsv\nround\tagent\tchange\tmetric_before\tmetric_after\tdelta_pct\tstatus\tfailure_class\n0\tbaseline\tinitial measurement\t-\t189\t-\tbaseline\t-\n1\t1\tadd lru_cache(maxsize=None) to fib\t189\t0\t-100.0\tKEEP\t-\n2\t1\tremove lru_cache, work()=fib(32) batch amortization\t0\t517\t+51700.0\tDISCARD\tguard_fail+metric_regression\n\n$ git log --oneline\nd26b093 (HEAD -> master) round2 discard logged; session complete\n7b6bc53 round1 keep: 189ms -> 0ms\n0c162a0 round1: add functools.lru_cache memoization to fib\n230bf5e iteration 0: baseline metric 189ms\n2e2ab07 baseline\n\nOPT_DONE\n```\n<!-- markdownlint-enable no-hard-tabs -->\n\n</details>\n\n### 3. Goal-bridge — machine-checkable completion contract\n\n*a failing test goes red to green under a 4-field contract (metric / threshold / evidence / rollback) with exit-0 proof.*\n\n<p align=\"center\"><img src=\"demo/goal-bridge.gif\" alt=\"Terminal capture: goal-bridge — 4-field contract, evidence appended each round, ends with CONTRACT MET — exit 0\" width=\"880\"></p>\n\n<details><summary>Transcript (accessible text fallback)</summary>\n\n```text\nReal session excerpt — demo/tapes/goal-bridge.tape (recorded 2026-08-27, pi 0.84.3, zai/glm-5.3)\n\n$ python3 -m unittest -q test_counter                  # baseline: real failure (red)\nFAILED (failures=2) — AssertionError: 1 != 0 (total([])), AssertionError: 7 != 6 (total([1, 2, 3])) — off-by-one (result = 1)\n\n$ timeout 240 pi -p -ne --model zai/glm-5.3 \\\n    --skill ~/.pi/agent/skills/godmode/goal-bridge/SKILL.md \"Goal: make the test suite pass. \\\n    Derive the Goal-Bridge contract FIRST and print its exact 4-field block: metric, \\\n    threshold, evidence, rollback. [...] Then fix counter.py, run the metric each round \\\n    appending to the evidence file, and stop as soon as it exits 0. [...]\"\n\nMetric exited 0 → **DONE** (round 2/3, rollback never fired).\n\nGoal-Bridge Contract (mandatory final output):\n- metric: python3 -m unittest -q test_counter\n- threshold: exit 0\n- evidence: .godmode/goal-evidence.txt\n- rollback: metric fails 2 consecutive rounds\n\nSummary:\n- Round 1: metric exit=1 (2 failures) → appended to evidence; fixed `counter.py` off-by-one (`result = 1` → `result = 0`)\n- Round 2: metric exit=0 (`OK`, 2 tests) → appended to evidence; stopped\n- Rollback trigger: never fired (max 1 consecutive failure); no revert needed\n- Files written: `counter.py` (edit), `.godmode/goal-evidence.txt` (new)\n\n$ cat .godmode/goal-evidence.txt\n=== Round 1: 2026-08-27T21:40:11Z ===\nexit=1\n=== Round 2: 2026-08-27T21:40:15Z ===\nexit=0\n\n$ python3 -m unittest -q test_counter && echo \"CONTRACT MET — exit 0\"\nCONTRACT MET — exit 0\n```\n\n</details>\n\nThe three captures above are real sessions; the blocks below are illustrative output shapes of other skills — not captured transcripts.\n\n<details><summary>More output shapes (illustrative, not captured runs)</summary>\n\n### Performance Optimization — 847ms to 198ms, fully autonomous\n\n```text\n$ /godmode:optimize\nGoal: Reduce API response time\nIterations: 20\n\n  BASELINE    847ms\n  ROUND 1     554ms  KEPT  (-34.5%)  -- added index on category_id\n  ROUND 2     382ms  KEPT  (-31.0%)  -- enabled gzip compression\n  ROUND 3     276ms  KEPT  (-27.7%)  -- eager loading for posts\n  ROUND 4     290ms  REVERTED        -- batch loader (guard failed)\n  ROUND 5     226ms  KEPT  (-18.2%)  -- connection pool to 20\n  ROUND 6     198ms  KEPT  (-12.4%)  -- Redis response cache\n\n  === 847ms --> 198ms (76.6% improvement) ===\n  Keeps: 5 | Discards: 1\n```\n\n### Multi-Agent Build — 4 agents, isolated worktrees, clean merge\n\n```text\n$ /godmode:build\nGoal: Add user authentication system\n\n  PLAN        Decomposed into 4 parallel tasks\n  AGENT 1     [worktree] Auth middleware + JWT tokens        DONE\n  AGENT 2     [worktree] User model + password hashing       DONE\n  AGENT 3     [worktree] Login/register API endpoints         DONE\n  AGENT 4     [worktree] Integration tests for auth flow      DONE\n  MERGE       Sequential merge + test after each              ALL PASS\n  REVIEW      4-agent code review (security, perf, style)     APPROVED\n\n  === 4 tasks | 4 agents | 12 files | 47 tests passing ===\n```\n\n### Security Audit — STRIDE + OWASP + red team\n\n```text\n$ /godmode:secure\nTarget: src/api/\n\n  RECON       Mapped 23 endpoints, 4 auth flows, 2 data stores\n  STRIDE      6 threat categories analyzed\n  OWASP       Top 10 checklist applied\n  RED TEAM    4 personas: script kiddie, insider, APT, researcher\n\n  CRITICAL  1   SQL injection in /api/search (parameterize query)\n  HIGH      2   Missing rate limit on /api/login, weak CORS policy\n  MEDIUM    3   Verbose error messages, missing CSP header, session fixation\n  LOW       1   Server version disclosed in headers\n\n  7 findings with fix code + verification commands\n```\n\nEvery finding comes with code evidence, severity, a concrete fix, and a command to verify the fix works.\n\n</details>\n\n---\n\n## Quick Start\n\n```bash\n# Install (Claude Code)\nclaude plugin install godmode\n\n# Or install for other platforms\nbash adapters/codex/install.sh\nbash adapters/cursor/install.sh\nbash adapters/gemini/install.sh\nbash adapters/opencode/install.sh\nbash adapters/pi/install.sh\n```\n\n```bash\n# Use specific skills\n/godmode:optimize   # Autonomous performance iteration\n/godmode:build      # Build with parallel agents\n/godmode:secure     # Security audit\n/godmode:ship       # Pre-flight + deploy + verify\n\n# Or just describe what you want\n/godmode make this API faster       # --> routes to optimize\n/godmode fix the failing tests      # --> routes to fix\n/godmode build a rate limiter       # --> routes to think --> plan --> build\n```\n\nGodmode auto-detects what you need and routes to the right skill.\n\n---\n\n## What Is Godmode?\n\nGodmode is an open-source plugin that adds autonomous coding capabilities to AI assistants like Claude Code, Cursor, Codex, Gemini CLI, and OpenCode. Instead of generating code once and hoping it works, Godmode runs a disciplined engineering loop: **measure, modify, verify, keep or revert, repeat** — until the goal is met.\n\nIt ships with 135 expert skills across 13 domains (performance optimization, security auditing, TDD, deployment, database tuning, and more), 7 specialized subagents that work in parallel, a failure memory system that learns from every discarded change, and a built-in authoring-discipline prelude that prevents the most common LLM coding mistakes before they hit the repo.\n\n## How Godmode Compares to Plain AI Coding\n\n| Problem | Godmode's answer |\n|---|---|\n| AI generates code once and stops | Autonomous iteration loops that run until the goal is met |\n| No way to know if a change helped | Every change is benchmarked against a mechanical metric |\n| Bad changes stay in the codebase | Automatic git revert on any regression |\n| Complex tasks bottleneck on one agent | Up to 5 parallel agents in isolated git worktrees |\n| AI repeats the same mistakes | Failure memory classifies and logs every failed approach |\n| Crashes lose all progress | Session state persists and auto-resumes |\n| Improvements might be noise | Variance testing and generalization gates prevent overfitting |\n| AI silently picks one interpretation | Karpathy prelude: state assumptions, surface alternatives, emit `NEEDS_CONTEXT` on ambiguity |\n| AI adds \"while we're here\" refactors | Line-trace rule + pre-commit discard audit surgically drops drift hunks |\n| Long autonomous loops burn tokens | Terse mode, stdio patterns, Progressive Disclosure routing — ~90% routing context reduction, 40-60% emit reduction |\n| Agents silently guess missing dispatch fields | DispatchContext schema validation — missing field → `BLOCKED: invalid_dispatch` |\n\n---\n\n## Benchmark\n\nThe repo benchmarked itself against a plain agent on 30 small tasks — 2 runs each, same model (`zai/glm-5.3`) in both arms, identical prompt. Godmode passed 60/60 scored runs; the plain agent passed 58/60. The plain agent was faster on median wall-clock (37.0s vs 41.0s), and the verify gate passed 48/48 checks over 24 of the 60 godmode passes.\n\nThe honest breakdown — including where the plain agent won and why the pass difference is within noise — is in the [showdown post](docs/blog/godmode-vs-plain-agent-benchmark.md).\n\n---\n\n## How It Works\n\nEvery iterative skill follows the same disciplined loop:\n\n```text\n1. REVIEW   -- read state, logs, git history\n2. IDEATE   -- pick the next change (informed by past failures)\n3. MODIFY   -- make ONE atomic change, commit before verify\n4. VERIFY   -- run guard (tests + lint + build must all pass)\n5. DECIDE   -- improved --> KEEP. Worse --> DISCARD (git reset)\n6. LOG      -- append to .godmode/<skill>-results.tsv\n7. REPEAT   -- until goal met or iteration budget exhausted\n```\n\nNo human approval needed between iterations. Every experiment is committed to git. Every discard is classified and remembered.\n\n### The Full Pipeline\n\n```text\nTHINK --> PLAN --> BUILD --> TEST --> FIX --> OPTIMIZE --> SECURE --> SHIP\n```\n\nGodmode detects which phase you're in and routes to the right skill. Skills chain automatically — optimize finds an issue, triggers fix, re-optimizes, then ships.\n\n### Failure Intelligence\n\nEvery discard is classified into one of 8 failure types and logged to `.godmode/<skill>-failures.tsv`. On 3+ consecutive failures, the agent writes a reflective diagnosis analyzing the pattern before trying again. Lessons persist in `.godmode/lessons.md` across sessions.\n\n### Multi-Agent Execution\n\nComplex tasks are decomposed and run in parallel:\n\n```text\nRound 1:  Agent 1 [worktree] --\\\n          Agent 2 [worktree] ---+-- merge + test\n          Agent 3 [worktree] --/\nRound 2:  Agent 4 [worktree] --\\\n          Agent 5 [worktree] ---+-- merge + test\n```\n\nMax 5 agents per round. Each gets its own git worktree. Merge sequentially, test after each merge.\n\n---\n\n## What Fires by Default\n\nEvery `/godmode:*` invocation — and every natural-language request that routes to a pipeline skill — fires the full learning stack automatically. No flags, no opt-in. See [`SKILL.md §14 Default Activations`](SKILL.md) for the authoritative list.\n\n### Authoring discipline (Karpathy family)\n\n- **Principles prelude** — every agent reads [`skills/principles/SKILL.md`](skills/principles/) before the first Edit. Four rules: Think Before Coding (state assumptions, surface alternatives), Simplicity First (pre-MODIFY strike for single-use helpers and unrequested configurability), Surgical Changes (line-trace rule), Goal-Driven Execution (success criterion is a shell command exiting zero).\n- **Pre-commit discard audit** — builder, tester, and optimizer agents classify every hunk in `git diff --cached` before committing. `line_scope_drift` hunks (formatting churn, \"while we're here\" refactors, adjacent improvements) are surgically dropped via `git restore -p --staged`. Spec: [`docs/discard-audit.md`](docs/discard-audit.md).\n- **DispatchContext schema** — all 7 subagents validate their input at dispatch time. Missing required field → `BLOCKED: invalid_dispatch`. See [`AGENTS.md § DispatchContext Schema`](AGENTS.md).\n- **Discard cost hierarchy** — Cost-0 (pre-MODIFY strike) / Cost-1 (pre-commit audit) / Cost-2 (post-commit revert). Cost-2 discards that should have been caught earlier are logged as `escaped_discard` feedback to `.godmode/lessons.md`.\n\n### Token optimization (four-layer stack)\n\n- **Progressive Disclosure routing** — the orchestrator reads only Tier 1 of each skill file (~20 lines) to match triggers. ~2,700 lines to route vs ~27,000 for full reads. **~90% routing-time context reduction**.\n- **Stdio input-side compression** — [`skills/stdio/SKILL.md`](skills/stdio/) documents 13 canonical command patterns (`git log` → `git log --oneline -20`, `cat` → `wc -l`, `ls -la` → `ls -1`, etc.) every agent prefers. Pairs with [rtk](https://github.com/rtk-ai/rtk) for shell-hook level enforcement.\n- **Terse output-side compression** — [`skills/terse/SKILL.md`](skills/terse/) auto-activates from round 2 onward. Compresses round summaries, status lines, agent reports by 40-60%. TSVs, code, errors, commit messages, and final summary stay verbose. Opt out with `/godmode:terse off` or `GODMODE_TERSE=0`.\n- **Token observability** — [`skills/tokens/SKILL.md`](skills/tokens/) logs per-round input/output token counts to `.godmode/token-log.tsv` using a reproducible `chars/4` heuristic. Answers \"is my loop getting cheaper or more expensive?\" with one awk one-liner. Opt out with `GODMODE_TOKENS=0`.\n\n### Coordination and research\n\n- **Named coordination patterns** — every plan declares its outermost pattern from [`docs/coordination-patterns.md`](docs/coordination-patterns.md): Pipeline, Fan-out/Fan-in, Expert Pool, Producer-Reviewer, Supervisor, or Hierarchical Delegation. Plans without a declared pattern return `BLOCKED: invalid_plan`.\n- **Research auto-dispatch** — before routing to `think` on any non-trivial task (mentions external lib/framework, >5 file scope, no prior `.godmode/research.md`), the orchestrator auto-dispatches [`skills/research/SKILL.md`](skills/research/) to gather prior art. Skip for trivial fixes or with `--no-research`.\n\n### The 8 pipeline skills inherit by default\n\n```text\nTHINK → PLAN → BUILD → TEST → FIX → OPTIMIZE → SECURE → SHIP\n```\n\nEach of these skills has a `Rule 0` in its Hard Rules section explicitly inheriting all of the above. No per-skill opt-in. One command runs the whole stack.\n\n---\n\n## Subagents (7)\n\n| Agent | Role |\n|-------|------|\n| **planner** | Decomposes goals into parallel tasks |\n| **builder** | Implements tasks with TDD in isolated worktrees |\n| **reviewer** | Code review for correctness, security, performance, style |\n| **optimizer** | Autonomous measure --> modify --> verify loop |\n| **explorer** | Read-only codebase reconnaissance |\n| **security** | STRIDE + OWASP audit with 4 adversarial personas |\n| **tester** | TDD test generation, RED-GREEN-REFACTOR |\n\n---\n\n## Skills (135)\n\nGodmode includes 135 skills across 13 domains. Each skill encodes a real engineering workflow — not just instructions, but a complete protocol with verification steps.\n\n| Domain | Count | Highlights |\n|--------|-------|------------|\n| **Core Workflow** | 16 | `godmode` `think` `plan` `build` `test` `review` `optimize` `debug` `fix` `ship` `verify` `goal-bridge` **(new)** |\n| **Discipline & Context** | 8 | `principles` `terse` `stdio` `tokens` `research` `bench` `team` `tutorial` **(new)** |\n| **Architecture & Design** | 10 | `architect` `rfc` `ddd` `pattern` `schema` `distributed` `scale` `migration` |\n| **API & Backend** | 14 | `api` `graphql` `grpc` `orm` `cache` `queue` `event` `realtime` `webhook` |\n| **Frameworks** | 12 | `react` `nextjs` `vue` `svelte` `node` `fastapi` `django` `rails` `spring` |\n| **Security & Compliance** | 8 | `secure` `auth` `rbac` `pentest` `devsecops` `comply` |\n| **Testing** | 7 | `e2e` `integration` `loadtest` `perf` `webperf` |\n| **DevOps & Infra** | 16 | `k8s` `docker` `cicd` `ghactions` `infra` `observe` `resilience` |\n| **Frontend & UI** | 9 | `ui` `a11y` `seo` `mobile` `designsystem` `responsive` |\n| **Databases** | 3 | `postgres` `redis` `nosql` |\n| **AI & ML** | 5 | `ml` `mlops` `rag` `prompt` `eval` |\n| **Developer Experience** | 13 | `docs` `refactor` `git` `pr` `monorepo` `changelog` `slo` |\n| **Integrations** | 14 | `i18n` `pay` `cli` `agent` `feature` `chaos` `experiment` |\n\n### The 8 Discipline & Context skills (shipped across Phases 0–E)\n\n| Skill | What it does |\n|---|---|\n| [`principles`](skills/principles/) | Karpathy authoring-discipline prelude. Four rules every agent reads before the first Edit. Imported via `@./` so every adapter gets it automatically. |\n| [`terse`](skills/terse/) | Output compression for long autonomous loops. Auto-activates from round 2. 40-60% token reduction on emit side. TSVs, code, errors, commits, final summary stay verbose. |\n| [`stdio`](skills/stdio/) | 13 canonical command patterns for minimizing tool-output token waste. Godmode-native alternative/complement to [rtk](https://github.com/rtk-ai/rtk). |\n| [`tokens`](skills/tokens/) | Per-round token-budget observability. Logs input/output counts to `.godmode/token-log.tsv`. Answers \"is my loop getting cheaper over time?\" |\n| [`research`](skills/research/) | Prior-art gathering phase. Auto-dispatched before `think` on non-trivial tasks. Uses the `explorer` subagent. Writes `.godmode/research.md`. |\n| [`bench`](skills/bench/) | Formal benchmark harness. 3-arm eval (baseline + variants) with N-run variance recovery. Writes `.godmode/bench-results.tsv`. |\n| [`team`](skills/team/) | Team bundle primitive. Compose existing skills into named sequences via YAML bundles in `.godmode/teams/<name>.yaml`. Uses one of the 6 coordination patterns. |\n| [`tutorial`](skills/tutorial/) | Day-0 walkthrough. 7 steps, ≤5 minutes, first `/godmode:optimize` run. |\n\nFull skill reference: [skills/](skills/)\n\n---\n\n## Platforms\n\n| Harness | Install | Integration | Agents | Models |\n|---|---|---|---|---|\n| **Claude Code** | `claude plugin install godmode` | Plugin (`commands/`, `agents/`, `.claude-plugin/` marketplace) | Parallel (worktrees) | Full |\n| **pi** | `bash adapters/pi/install.sh` | Skills dir — `$HOME/.pi/agent/skills/godmode/` | Skills only | Full |\n| **omp** | `PREFIX=\"$HOME/.omp/agent/skills\" bash adapters/pi/install.sh` | Skills dir — `$HOME/.omp/agent/skills/godmode/` + one-line `customDirectories` registration (omp scans one level per skill; see `adapters/pi/README.md`) | Skills only | Skill-level (same corpus as pi) |\n| **Codex** | `bash adapters/codex/install.sh` | Copies `.codex/` agents into your repo; harness reads root `AGENTS.md` | Native (sequential) | Partial |\n| **OpenCode** | `bash adapters/opencode/install.sh` | Plugin (`plugin.json` + adapter entry) | Sequential | Partial |\n| **Gemini CLI** | `bash adapters/gemini/install.sh` | Generated files in your repo (`GEMINI.md` + config) | Sequential | Session-level |\n| **Cursor** | `bash adapters/cursor/install.sh` | Generated files in your repo (`.cursorrules`) | Background agents | Session-level |\n| **Amp** | `bash adapters/amp/install.sh` | Skills dir — `.agents/skills/` in your repo (Amp-native) + root `AGENTS.md` | Skills only | — |\n\n> **omp:** served by the same pi installer — `~/.omp/agent/skills` is omp's native user skills dir, confirmed from upstream source (can1357/oh-my-pi @ main, 2026-08-27) and verified against omp v18.0.8 (linux-x64). omp scans one level per skill, so the installed `godmode/` wrapper is not auto-discovered — register the collection once in `~/.omp/agent/config.yml`:\n>\n> ```yaml\n> skills:\n>   customDirectories:\n>     - ~/.omp/agent/skills/godmode\n> ```\n>\n> With an active omp profile, skills load from `~/.omp/profiles/<name>/agent/skills` instead. `PREFIX` is retained for pi-style forks — see [adapters/pi/README.md](adapters/pi/README.md) for the full omp walkthrough.\n> **Amp:** reads root `AGENTS.md` and the `.agents/skills/` project skills directory natively ([docs](https://ampcode.com/docs/customize/skills)); the adapter wires godmode's skills there. Subagents and model routing are Amp's own — the adapter wires neither.\n\nAll 135 skills work on every platform. Parallel agent skills automatically degrade to sequential on platforms without native agent dispatch. The authoring-discipline prelude, Progressive Disclosure routing, and pre-commit discard audit all reach every adapter — Claude Code via `SKILL.md`, Gemini and OpenCode via their respective entry files importing `@./skills/principles/SKILL.md`.\n\nVerify your installation: `bash adapters/<platform>/verify.sh` (pi family: point it at your skills dir, e.g. `PREFIX=<dir> bash adapters/pi/verify.sh` for an omp install)\n\n## Multi-model routing\n\nZero config is a valid, complete default: with no configuration at all,\nevery role inherits the session model, and godmode works fully with zero\nsetup. A missing `godmode.models.json` is a valid state, and model tiering is\nopt-in only. When a role *is* pinned, resolution is exactly one chain:\n\n`GODMODE_MODEL_<ROLE>` env -> `godmode.models.json` roles -> session model.\n\nThe repo-root `godmode.models.json` wins per key over\n`~/.config/godmode/models.json` when both exist: a role pinned in the repo\nfile wins, while roles set only in the user file still apply.\n\nA one-off override is an env var per role — role name uppercased, dashes to\nunderscores (`code-review` -> `GODMODE_MODEL_CODE_REVIEW`):\n\n```bash\nGODMODE_MODEL_EXECUTE=zai/glm-5.3-flash GODMODE_MODEL_PLAN=anthropic/claude-opus-4 godmode optimize\n```\n\nDurable config lives in `godmode.models.json` — at your project root (commit\nit to share team-wide routing) or in `~/.config/godmode/models.json` (personal,\nmachine-wide). Mix providers freely:\n\n```json\n{\n  \"roles\": {\n    \"plan\": \"anthropic/claude-opus-4\",\n    \"review\": \"anthropic/claude-opus-4\",\n    \"build\": \"openai/gpt-5.2\",\n    \"optimize\": \"zai/glm-5.3-flash\"\n  }\n}\n```\n\n> **Illustrative example:** a 20-round optimize loop can run fast/cheap\n> executors under strong reviewer models — spend shifts toward the rounds that\n> benefit instead of paying premium prices for every round. Actual savings\n> depend on your providers and pricing.\n\nCapability tiers — which harnesses accept per-child model params:\n\n| Harness | Model routing |\n|---|---|\n| **pi** | Full — per-child model params |\n| **Claude Code** | Full |\n| **OpenCode** | Partial |\n| **Codex** | Partial |\n| **Cursor** | Session-level |\n| **Gemini CLI** | Session-level |\n\nInspect what will run before you start: `godmode doctor` (`/godmode:doctor`)\nprints the resolved role -> model table with each value's source\n(env / file / session).\n\nRoles are open-ended — there is no fixed enum — and any unknown or unpinned\nrole simply falls back to the session model. Details and the full reference\nresolver: [`adapters/pi/README.md`](adapters/pi/README.md).\n\n---\n\n## Philosophy\n\n**Discipline before speed.** Every change is measured. Bad changes are reverted.\n\n**Evidence before claims.** \"Looks good\" is rejected. Numeric proof is required.\n\n**Git is memory.** Every experiment is committed. Every revert is in the log.\n\n**Keep or discard.** Binary decisions only. No maybes.\n\n**Learn from failure.** Every discard is classified and remembered.\n\n**Simplicity first.** Complex changes that marginally improve metrics are discarded. The pre-MODIFY checklist strikes speculative code before it's written.\n\n**Think before coding.** If two interpretations exist, present them — never silently pick. Emit `NEEDS_CONTEXT` on ambiguity.\n\n**Surgical changes only.** Every semantically changed line must trace directly to the user's request. Adjacent \"improvements\" are `line_scope_drift` — dropped at pre-commit audit.\n\n**Goal-driven execution.** Success is a shell command that exits zero. Subjective criteria (\"works well,\" \"looks good,\" \"is faster\") are vibes — reject them before coding.\n\n**Token budget is a first-class metric.** Input-side (stdio), routing (Progressive Disclosure), output-side (terse), and observability (tokens) stack multiplicatively. Every round logs its context cost.\n\n---\n\n## Contributing\n\nEvery skill is a Markdown file. If you can write clear instructions, you can add a skill.\n\nSee **[CONTRIBUTING.md](CONTRIBUTING.md)** for the complete guide:\n\n- [Adding a New Skill](CONTRIBUTING.md#complete-skill-creation-guide)\n- [Skill Quality Checklist](CONTRIBUTING.md#skill-quality-checklist)\n- [Adding a New Platform Adapter](CONTRIBUTING.md#adding-a-new-platform-adapter)\n- [Testing Your Changes](CONTRIBUTING.md#testing-your-skill)\n- [Style Guide](CONTRIBUTING.md#skill-writing-style-guide)\n\n---\n\n## Frequently Asked Questions\n\n<details>\n<summary><strong>How does Godmode differ from Copilot, Cursor, or other AI coding tools?</strong></summary>\n\nGodmode is not a replacement for these tools — it's a plugin that makes them better. Copilot and Cursor generate code in a single pass. Godmode adds autonomous iteration: it measures results, keeps improvements, reverts failures, and repeats until the goal is met. It works *inside* Cursor and Claude Code, not instead of them.\n</details>\n\n<details>\n<summary><strong>Does Godmode work with any programming language?</strong></summary>\n\nYes. Godmode skills are language-agnostic — they define engineering workflows (test, measure, verify), not language-specific syntax. If your AI assistant supports a language, Godmode's skills work with it. Framework-specific skills (React, Django, Rails, etc.) provide additional specialized guidance.\n</details>\n\n<details>\n<summary><strong>Can I use Godmode for free?</strong></summary>\n\nGodmode itself is free and open source (MIT license). You need a working installation of one of the supported AI coding tools (Claude Code, Cursor, Codex, Gemini CLI, or OpenCode), which may have their own pricing.\n</details>\n\n<details>\n<summary><strong>What does \"autonomous\" mean? Does it run without human input?</strong></summary>\n\nYes. Once you set a goal and a metric (e.g., \"reduce API latency, measured by `curl -w '%{time_total}'`\"), Godmode runs the optimization loop autonomously — modifying code, verifying results, keeping improvements, reverting failures — without asking for approval between iterations. You can set an iteration limit or let it run until interrupted.\n</details>\n\n<details>\n<summary><strong>Is it safe? Can it break my code?</strong></summary>\n\nEvery change is committed to git *before* verification. If a change makes things worse, it's automatically reverted with `git reset`. Your codebase never stays in a broken state. Guard commands (tests, linting, build) must pass for any change to be kept.\n</details>\n\n<details>\n<summary><strong>How do I add my own skills?</strong></summary>\n\nEvery skill is a Markdown file. Copy an existing skill, modify it, and drop it in the `skills/` directory. See [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide. New skills should follow the Progressive Disclosure convention: `## Activate When` immediately after the frontmatter (Tier 1), workflow + hard rules next (Tier 2), optional `<!-- tier-3 -->` marker before examples and error recovery.\n</details>\n\n<details>\n<summary><strong>What is the authoring-discipline prelude?</strong></summary>\n\nA set of four behavioral rules based on Andrej Karpathy's observations on common LLM coding mistakes, shipped as [`skills/principles/SKILL.md`](skills/principles/). Every agent reads it before the first Edit on every task: (1) Think Before Coding — state assumptions, never silently pick; (2) Simplicity First — run the pre-MODIFY checklist, strike speculative code; (3) Surgical Changes — line-trace rule, adjacent improvements are `scope_drift`; (4) Goal-Driven Execution — success is a shell command exiting zero. Enforced mechanically by the pre-commit discard audit in `agents/builder.md`, `agents/tester.md`, and `agents/optimizer.md`.\n</details>\n\n<details>\n<summary><strong>How does Godmode save tokens on long autonomous loops?</strong></summary>\n\nFour layers of compression that stack multiplicatively:\n\n1. **Progressive Disclosure** — the orchestrator reads only Tier 1 (~20 lines) of each skill when routing. ~2,700 lines to route vs ~27,000 for full reads. ~90% routing-time context reduction.\n2. **Stdio input-side compression** — 13 canonical command patterns (`git log --oneline -20` instead of `git log`, `wc -l` instead of `cat`, etc.). Godmode's native convention; pairs with [rtk](https://github.com/rtk-ai/rtk) for shell-hook enforcement.\n3. **Terse output-side compression** — auto-activates from round 2. Round summaries and agent reports compress 40-60%. TSVs, code, errors, commits, final summary stay verbose.\n4. **Token observability** — per-round input/output counts logged to `.godmode/token-log.tsv` so you can actually measure whether the other three are helping.\n\nOpt out selectively: `/godmode:terse off`, `GODMODE_TOKENS=0`. Principles prelude and Progressive Disclosure have no opt-out — they're mechanical gates.\n</details>\n\n<details>\n<summary><strong>What does \"Default Activations\" mean?</strong></summary>\n\nEvery improvement shipped in Phases 0–E fires automatically on every `/godmode:*` invocation. No flags. No opt-in. The 8 pipeline skills (`think`, `plan`, `build`, `test`, `fix`, `optimize`, `secure`, `ship`) each inherit the full stack via a `Rule 0` in their Hard Rules section that references [`SKILL.md §14 Default Activations`](SKILL.md). A first-time user running `/godmode make my API faster` on a fresh repo gets: research auto-dispatched (if non-trivial), principles prelude read by every agent, pre-commit audit dropping drift hunks before commit, terse mode activating at round 2, token logging at every round, Progressive Disclosure routing at ~90% context reduction, and a plan with a declared coordination pattern. Every one of those was opt-in before Phase E.\n</details>\n\n---\n\n## Community\n\nWins, questions, and failure stories are welcome in [Discussions](https://github.com/arbazkhan971/godmode/discussions). Share what godmode kept — or reverted — for you.\n\n<p align=\"center\"><a href=\"https://star-history.com/#arbazkhan971/godmode&Date\"><img alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=arbazkhan971/godmode&type=Date\"></a></p>\n\n---\n\n## License\n\nMIT -- see [LICENSE](LICENSE).\n\n---\n\n<div align=\"center\">\n\n**Discipline before speed. Evidence before claims. Git is memory.**\n\n**[Install](#quick-start)** | **[Docs](docs/)** | **[FAQ](docs/FAQ.md)** | **[Troubleshooting](docs/troubleshooting.md)** | **[Discuss](https://github.com/arbazkhan971/godmode/discussions)**\n\n</div>\n"}