复制安装命令
用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。
复制前请先查看来源、License 和安全提示。
Godmode turns any AI coding assistant into an autonomous engineering loop — 135 skills that meas...
用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。
复制前请先查看来源、License 和安全提示。
来源文件:README.md
Godmode 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.

TL;DR: Install with
claude plugin install godmode. Say/godmode optimize my APIand walk away. It measures, iterates, keeps improvements, reverts failures, and stops when done.
Real captures from live pi sessions (zai/glm-5.3, recorded with vhs) — tapes and targets in demo/.
godmode Tier-1 matching routes a checkout rate-limiting request to the ratelimit skill.

Real session excerpt — demo/tapes/skill-routing.tape (recorded 2026-08-27, pi 0.84.3, zai/glm-5.3)
$ timeout 240 pi -p -ne --model zai/glm-5.3 \
--skill ~/.pi/agent/skills/godmode/godmode/SKILL.md "Route only. The user request is: \
we keep getting rate limited by the payment provider during checkout. [...]"
Tier 1 match complete.
- **Stack detected:** Godmode skill-plugin repo (skills/ + agents/, no runtime app code in scope)
- **Tier 1 hits:** `ratelimit` ("rate limit", "throttle", 429 — direct match); `pay` (payments context, secondary)
- **Phase:** THINK — rate limiting against a third-party provider is a design problem (client-side throttle/queue/backoff) before any build
`DISPATCH: skill=ratelimit phase=THINK (secondary=pay) task=rate-limited-by-payment-provider-at-checkout`
ROUTED_OK
$ git status --short
(no output — the routing session modified nothing)
baseline 189ms, lru_cache KEEP at 0ms, fib(32) regression DISCARD at 517ms, reverted with git reset — real metric, real revert.

Real session excerpt — demo/tapes/optimize-loop.tape (recorded 2026-08-27, pi 0.84.3, zai/glm-5.3)
$ python3 -m unittest -q test_slow_fib
Ran 1 test in 0.230s
OK
$ bash metric.sh && bash metric.sh && bash metric.sh # timing runs — the session derives its own baseline below
278
217
211
$ timeout 300 pi -p -ne --model zai/glm-5.3 \
--skill ~/.pi/agent/skills/godmode/optimize/SKILL.md "Setup answers: Goal = reduce the \
runtime of work() in slow_fib.py. [...] Test exactly these two hypotheses in order: \
(1) add functools lru_cache memoization to fib; (2) remove the lru_cache decorator and \
change work() to return fib(32), claiming batch amortization. [...] A DISCARD must be \
reverted with git reset --hard HEAD~1. [...]"
**Session complete** — baseline 189 ms → best 0 ms (−100%).
- **Baseline:** median 189 ms (3 runs, variance <5%)
- **R1 · H1 KEEP:** @lru_cache(maxsize=None) on fib → 0 ms (0,0,0), guard OK (work()=832040)
- **R2 · H2 DISCARD:** removed cache, work()=fib(32) → 517 ms AND guard failed (2178309 ≠ 832040); reverted via git reset --hard HEAD~1
- Stop: budget exhausted (2 rounds); kept commit 0c162a0; lessons + failures logged in .godmode/*
$ cat .godmode/optimize-results.tsv
round agent change metric_before metric_after delta_pct status failure_class
0 baseline initial measurement - 189 - baseline -
1 1 add lru_cache(maxsize=None) to fib 189 0 -100.0 KEEP -
2 1 remove lru_cache, work()=fib(32) batch amortization 0 517 +51700.0 DISCARD guard_fail+metric_regression
$ git log --oneline
d26b093 (HEAD -> master) round2 discard logged; session complete
7b6bc53 round1 keep: 189ms -> 0ms
0c162a0 round1: add functools.lru_cache memoization to fib
230bf5e iteration 0: baseline metric 189ms
2e2ab07 baseline
OPT_DONE
a failing test goes red to green under a 4-field contract (metric / threshold / evidence / rollback) with exit-0 proof.

Real session excerpt — demo/tapes/goal-bridge.tape (recorded 2026-08-27, pi 0.84.3, zai/glm-5.3)
$ python3 -m unittest -q test_counter # baseline: real failure (red)
FAILED (failures=2) — AssertionError: 1 != 0 (total([])), AssertionError: 7 != 6 (total([1, 2, 3])) — off-by-one (result = 1)
$ timeout 240 pi -p -ne --model zai/glm-5.3 \
--skill ~/.pi/agent/skills/godmode/goal-bridge/SKILL.md "Goal: make the test suite pass. \
Derive the Goal-Bridge contract FIRST and print its exact 4-field block: metric, \
threshold, evidence, rollback. [...] Then fix counter.py, run the metric each round \
appending to the evidence file, and stop as soon as it exits 0. [...]"
Metric exited 0 → **DONE** (round 2/3, rollback never fired).
Goal-Bridge Contract (mandatory final output):
- metric: python3 -m unittest -q test_counter
- threshold: exit 0
- evidence: .godmode/goal-evidence.txt
- rollback: metric fails 2 consecutive rounds
Summary:
- Round 1: metric exit=1 (2 failures) → appended to evidence; fixed `counter.py` off-by-one (`result = 1` → `result = 0`)
- Round 2: metric exit=0 (`OK`, 2 tests) → appended to evidence; stopped
- Rollback trigger: never fired (max 1 consecutive failure); no revert needed
- Files written: `counter.py` (edit), `.godmode/goal-evidence.txt` (new)
$ cat .godmode/goal-evidence.txt
=== Round 1: 2026-08-27T21:40:11Z ===
exit=1
=== Round 2: 2026-08-27T21:40:15Z ===
exit=0
$ python3 -m unittest -q test_counter && echo "CONTRACT MET — exit 0"
CONTRACT MET — exit 0
The three captures above are real sessions; the blocks below are illustrative output shapes of other skills — not captured transcripts.
$ /godmode:optimize
Goal: Reduce API response time
Iterations: 20
BASELINE 847ms
ROUND 1 554ms KEPT (-34.5%) -- added index on category_id
ROUND 2 382ms KEPT (-31.0%) -- enabled gzip compression
ROUND 3 276ms KEPT (-27.7%) -- eager loading for posts
ROUND 4 290ms REVERTED -- batch loader (guard failed)
ROUND 5 226ms KEPT (-18.2%) -- connection pool to 20
ROUND 6 198ms KEPT (-12.4%) -- Redis response cache
=== 847ms --> 198ms (76.6% improvement) ===
Keeps: 5 | Discards: 1
$ /godmode:build
Goal: Add user authentication system
PLAN Decomposed into 4 parallel tasks
AGENT 1 [worktree] Auth middleware + JWT tokens DONE
AGENT 2 [worktree] User model + password hashing DONE
AGENT 3 [worktree] Login/register API endpoints DONE
AGENT 4 [worktree] Integration tests for auth flow DONE
MERGE Sequential merge + test after each ALL PASS
REVIEW 4-agent code review (security, perf, style) APPROVED
=== 4 tasks | 4 agents | 12 files | 47 tests passing ===
$ /godmode:secure
Target: src/api/
RECON Mapped 23 endpoints, 4 auth flows, 2 data stores
STRIDE 6 threat categories analyzed
OWASP Top 10 checklist applied
RED TEAM 4 personas: script kiddie, insider, APT, researcher
CRITICAL 1 SQL injection in /api/search (parameterize query)
HIGH 2 Missing rate limit on /api/login, weak CORS policy
MEDIUM 3 Verbose error messages, missing CSP header, session fixation
LOW 1 Server version disclosed in headers
7 findings with fix code + verification commands
Every finding comes with code evidence, severity, a concrete fix, and a command to verify the fix works.
# Install (Claude Code)
claude plugin install godmode
# Or install for other platforms
bash adapters/codex/install.sh
bash adapters/cursor/install.sh
bash adapters/gemini/install.sh
bash adapters/opencode/install.sh
bash adapters/pi/install.sh
# Use specific skills
/godmode:optimize # Autonomous performance iteration
/godmode:build # Build with parallel agents
/godmode:secure # Security audit
/godmode:ship # Pre-flight + deploy + verify
# Or just describe what you want
/godmode make this API faster # --> routes to optimize
/godmode fix the failing tests # --> routes to fix
/godmode build a rate limiter # --> routes to think --> plan --> build
Godmode auto-detects what you need and routes to the right skill.
Godmode 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.
It 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.
| Problem | Godmode's answer |
|---|---|
| AI generates code once and stops | Autonomous iteration loops that run until the goal is met |
| No way to know if a change helped | Every change is benchmarked against a mechanical metric |
| Bad changes stay in the codebase | Automatic git revert on any regression |
| Complex tasks bottleneck on one agent | Up to 5 parallel agents in isolated git worktrees |
| AI repeats the same mistakes | Failure memory classifies and logs every failed approach |
| Crashes lose all progress | Session state persists and auto-resumes |
| Improvements might be noise | Variance testing and generalization gates prevent overfitting |
| AI silently picks one interpretation | Karpathy prelude: state assumptions, surface alternatives, emit NEEDS_CONTEXT on ambiguity |
| AI adds "while we're here" refactors | Line-trace rule + pre-commit discard audit surgically drops drift hunks |
| Long autonomous loops burn tokens | Terse mode, stdio patterns, Progressive Disclosure routing — ~90% routing context reduction, 40-60% emit reduction |
| Agents silently guess missing dispatch fields | DispatchContext schema validation — missing field → BLOCKED: invalid_dispatch |
The 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.
The honest breakdown — including where the plain agent won and why the pass difference is within noise — is in the showdown post.
Every iterative skill follows the same disciplined loop:
1. REVIEW -- read state, logs, git history
2. IDEATE -- pick the next change (informed by past failures)
3. MODIFY -- make ONE atomic change, commit before verify
4. VERIFY -- run guard (tests + lint + build must all pass)
5. DECIDE -- improved --> KEEP. Worse --> DISCARD (git reset)
6. LOG -- append to .godmode/<skill>-results.tsv
7. REPEAT -- until goal met or iteration budget exhausted
No human approval needed between iterations. Every experiment is committed to git. Every discard is classified and remembered.
THINK --> PLAN --> BUILD --> TEST --> FIX --> OPTIMIZE --> SECURE --> SHIP
Godmode 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.
Every 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.
Complex tasks are decomposed and run in parallel:
Round 1: Agent 1 [worktree] --\
Agent 2 [worktree] ---+-- merge + test
Agent 3 [worktree] --/
Round 2: Agent 4 [worktree] --\
Agent 5 [worktree] ---+-- merge + test
Max 5 agents per round. Each gets its own git worktree. Merge sequentially, test after each merge.
Every /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 for the authoritative list.
skills/principles/SKILL.md 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).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.BLOCKED: invalid_dispatch. See AGENTS.md § DispatchContext Schema.escaped_discard feedback to .godmode/lessons.md.skills/stdio/SKILL.md 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 for shell-hook level enforcement.skills/terse/SKILL.md 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.skills/tokens/SKILL.md 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.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.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 to gather prior art. Skip for trivial fixes or with --no-research.THINK → PLAN → BUILD → TEST → FIX → OPTIMIZE → SECURE → SHIP
Each 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.
| Agent | Role |
|---|---|
| planner | Decomposes goals into parallel tasks |
| builder | Implements tasks with TDD in isolated worktrees |
| reviewer | Code review for correctness, security, performance, style |
| optimizer | Autonomous measure --> modify --> verify loop |
| explorer | Read-only codebase reconnaissance |
| security | STRIDE + OWASP audit with 4 adversarial personas |
| tester | TDD test generation, RED-GREEN-REFACTOR |
Godmode includes 135 skills across 13 domains. Each skill encodes a real engineering workflow — not just instructions, but a complete protocol with verification steps.
| Domain | Count | Highlights |
|---|---|---|
| Core Workflow | 16 | godmode think plan build test review optimize debug fix ship verify goal-bridge (new) |
| Discipline & Context | 8 | principles terse stdio tokens research bench team tutorial (new) |
| Architecture & Design | 10 | architect rfc ddd pattern schema distributed scale migration |
| API & Backend | 14 | api graphql grpc orm cache queue event realtime webhook |
| Frameworks | 12 | react nextjs vue svelte node fastapi django rails spring |
| Security & Compliance | 8 | secure auth rbac pentest devsecops comply |
| Testing | 7 | e2e integration loadtest perf webperf |
| DevOps & Infra | 16 | k8s docker cicd ghactions infra observe resilience |
| Frontend & UI | 9 | ui a11y seo mobile designsystem responsive |
| Databases | 3 | postgres redis nosql |
| AI & ML | 5 | ml mlops rag prompt eval |
| Developer Experience | 13 | docs refactor git pr monorepo changelog slo |
| Integrations | 14 | i18n pay cli agent feature chaos experiment |
| Skill | What it does |
|---|---|
principles | Karpathy authoring-discipline prelude. Four rules every agent reads before the first Edit. Imported via @./ so every adapter gets it automatically. |
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. |
stdio | 13 canonical command patterns for minimizing tool-output token waste. Godmode-native alternative/complement to rtk. |
tokens | Per-round token-budget observability. Logs input/output counts to .godmode/token-log.tsv. Answers "is my loop getting cheaper over time?" |
research | Prior-art gathering phase. Auto-dispatched before think on non-trivial tasks. Uses the explorer subagent. Writes .godmode/research.md. |
bench | Formal benchmark harness. 3-arm eval (baseline + variants) with N-run variance recovery. Writes .godmode/bench-results.tsv. |
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. |
tutorial | Day-0 walkthrough. 7 steps, ≤5 minutes, first /godmode:optimize run. |
Full skill reference: skills/
| Harness | Install | Integration | Agents | Models |
|---|---|---|---|---|
| Claude Code | claude plugin install godmode | Plugin (commands/, agents/, .claude-plugin/ marketplace) | Parallel (worktrees) | Full |
| pi | bash adapters/pi/install.sh | Skills dir — $HOME/.pi/agent/skills/godmode/ | Skills only | Full |
| 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) |
| Codex | bash adapters/codex/install.sh | Copies .codex/ agents into your repo; harness reads root AGENTS.md | Native (sequential) | Partial |
| OpenCode | bash adapters/opencode/install.sh | Plugin (plugin.json + adapter entry) | Sequential | Partial |
| Gemini CLI | bash adapters/gemini/install.sh | Generated files in your repo (GEMINI.md + config) | Sequential | Session-level |
| Cursor | bash adapters/cursor/install.sh | Generated files in your repo (.cursorrules) | Background agents | Session-level |
| Amp | bash adapters/amp/install.sh | Skills dir — .agents/skills/ in your repo (Amp-native) + root AGENTS.md | Skills only | — |
omp: served by the same pi installer —
~/.omp/agent/skillsis 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 installedgodmode/wrapper is not auto-discovered — register the collection once in~/.omp/agent/config.yml:skills: customDirectories: - ~/.omp/agent/skills/godmodeWith an active omp profile, skills load from
~/.omp/profiles/<name>/agent/skillsinstead.PREFIXis retained for pi-style forks — see adapters/pi/README.md for the full omp walkthrough. Amp: reads rootAGENTS.mdand the.agents/skills/project skills directory natively (docs); the adapter wires godmode's skills there. Subagents and model routing are Amp's own — the adapter wires neither.
All 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.
Verify 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)
Zero config is a valid, complete default: with no configuration at all,
every role inherits the session model, and godmode works fully with zero
setup. A missing godmode.models.json is a valid state, and model tiering is
opt-in only. When a role is pinned, resolution is exactly one chain:
GODMODE_MODEL_<ROLE> env -> godmode.models.json roles -> session model.
The repo-root godmode.models.json wins per key over
~/.config/godmode/models.json when both exist: a role pinned in the repo
file wins, while roles set only in the user file still apply.
A one-off override is an env var per role — role name uppercased, dashes to
underscores (code-review -> GODMODE_MODEL_CODE_REVIEW):
GODMODE_MODEL_EXECUTE=zai/glm-5.3-flash GODMODE_MODEL_PLAN=anthropic/claude-opus-4 godmode optimize
Durable config lives in godmode.models.json — at your project root (commit
it to share team-wide routing) or in ~/.config/godmode/models.json (personal,
machine-wide). Mix providers freely:
{
"roles": {
"plan": "anthropic/claude-opus-4",
"review": "anthropic/claude-opus-4",
"build": "openai/gpt-5.2",
"optimize": "zai/glm-5.3-flash"
}
}
Illustrative example: a 20-round optimize loop can run fast/cheap executors under strong reviewer models — spend shifts toward the rounds that benefit instead of paying premium prices for every round. Actual savings depend on your providers and pricing.
Capability tiers — which harnesses accept per-child model params:
| Harness | Model routing |
|---|---|
| pi | Full — per-child model params |
| Claude Code | Full |
| OpenCode | Partial |
| Codex | Partial |
| Cursor | Session-level |
| Gemini CLI | Session-level |
Inspect what will run before you start: godmode doctor (/godmode:doctor)
prints the resolved role -> model table with each value's source
(env / file / session).
Roles are open-ended — there is no fixed enum — and any unknown or unpinned
role simply falls back to the session model. Details and the full reference
resolver: adapters/pi/README.md.
Discipline before speed. Every change is measured. Bad changes are reverted.
Evidence before claims. "Looks good" is rejected. Numeric proof is required.
Git is memory. Every experiment is committed. Every revert is in the log.
Keep or discard. Binary decisions only. No maybes.
Learn from failure. Every discard is classified and remembered.
Simplicity first. Complex changes that marginally improve metrics are discarded. The pre-MODIFY checklist strikes speculative code before it's written.
Think before coding. If two interpretations exist, present them — never silently pick. Emit NEEDS_CONTEXT on ambiguity.
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.
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.
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.
Every skill is a Markdown file. If you can write clear instructions, you can add a skill.
See CONTRIBUTING.md for the complete guide:
Godmode 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.
Yes. 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.
Godmode 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.
Yes. 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.
Every 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.
Every skill is a Markdown file. Copy an existing skill, modify it, and drop it in the skills/ directory. See 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.
A set of four behavioral rules based on Andrej Karpathy's observations on common LLM coding mistakes, shipped as skills/principles/SKILL.md. 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.
Four layers of compression that stack multiplicatively:
git log --oneline -20 instead of git log, wc -l instead of cat, etc.). Godmode's native convention; pairs with rtk for shell-hook enforcement..godmode/token-log.tsv so you can actually measure whether the other three are helping.Opt out selectively: /godmode:terse off, GODMODE_TOKENS=0. Principles prelude and Progressive Disclosure have no opt-out — they're mechanical gates.
Every 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. 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.
Wins, questions, and failure stories are welcome in Discussions. Share what godmode kept — or reverted — for you.
MIT -- see LICENSE.
Discipline before speed. Evidence before claims. Git is memory.
Install | Docs | FAQ | Troubleshooting | Discuss
name: team
description: Team bundles. Invoke named skill bundles, YAML coordination pattern, dispatch pipeline/parallel/swarm, /godmode:team./godmode:team <name> — load .godmode/teams/<name>.yaml and dispatch/godmode:team without a name — list bundles found in .godmode/teams/A team bundle is the INVOCATION layer. docs/coordination-patterns.md is the
VOCABULARY layer. Individual skills under skills/ are the WORK layer. This
skill is only glue — it never defines new skill logic inline.
Each team lives at .godmode/teams/<name>.yaml. Fields:
name: api-backend # team name, matches filename
description: | # one paragraph, rendered on list
Stand up a production API: routes,
auth, rate limiting, and a security pass.
pattern: Pipeline # one of the 6 known patterns
skills: # ordered, max 10
- api
- auth
- ratelimit
- secure
constraints: # optional, applied to every skill
- budget.rounds=5
- max_agents=3
success_criterion: | # shell, exits 0 when team succeeds
npm test && npm run lint && curl -fsS localhost:3000/health
The example above is the reference format — do NOT ship it as a real bundle.
Users author their own. The .godmode/teams/ directory is created by the
user (or by whatever tool they write to author bundles), not by this skill.
From docs/coordination-patterns.md:
Pipeline, Fan-out/Fan-in, Expert Pool, Producer-Reviewer,
Supervisor, Hierarchical Delegation. Anything else →
BLOCKED: invalid_pattern. Never invent a new pattern; if a bundle needs
something not on the list, the bundle is wrong, not the list.
test -f .godmode/teams/<name>.yaml || exit 1 # BLOCKED: no_such_team
python3 -c "import yaml; yaml.safe_load(open('.godmode/teams/<name>.yaml'))"
Read name, description, pattern, skills, optional constraints,
success_criterion. Fail fast on missing required fields.
pattern ∈ the 6 known patterns — else BLOCKED: invalid_patternlen(skills) <= 10 — else BLOCKED: team_too_largeskills resolves to an existing skills/<skill>/SKILL.md —
first miss → BLOCKED: unknown_skill:<name>success_criterion is a non-empty string (shell command, never prose)constraints entries parse as key=valueCASE pattern OF
Pipeline → run skills sequentially, pipe each
skill's output into the next as context
Fan-out/Fan-in → dispatch all skills in parallel worktrees,
merge in declared order (per build.md rules)
Expert Pool → evaluate triggers from skills/godmode/SKILL.md
Step 2, run exactly ONE skill from the list
Producer-Reviewer → skills[0] generates, skills[1] reviews,
remaining skills run only if reviewer accepts
Supervisor → skills[0] acts as supervisor and decides
which of the remaining skills to run next;
loop until supervisor reports DONE
Hierarchical Delegation→ skills[0] decomposes, each output skill is
dispatched with depth+1, max depth = 2
Apply constraints to every dispatched skill before it runs.
Team execution is a single outer loop where each skill is one round:
round = 0
FOR skill IN ordered_dispatch_plan:
round += 1
result = run_skill(skill, prev_output, constraints)
LOG .godmode/team-log.tsv
IF result.status != "DONE": # Universal Protocol failure
EMIT "team <name> stopped at skill <skill> round <round>"
EXIT 1 # cascade — do not continue
prev_output = result
EVAL success_criterion # whole-team gate
Run success_criterion as a shell command. Exit 0 → team DONE. Non-zero →
the team failed even though every skill reported DONE; log
criterion_failed and exit 1. No retry at the team layer — the user
decides whether to rerun.
name: api-backend
description: |
Build a production-ready HTTP API: scaffold routes, wire auth,
rate-limit the public endpoints, and run a security audit.
pattern: Pipeline
skills:
- api
- auth
- ratelimit
- secure
constraints:
- budget.rounds=5
- max_agents=3
success_criterion: |
npm test && npm run lint && \
curl -fsS localhost:3000/health > /dev/null
Invocation: /godmode:team api-backend. The orchestrator runs api, feeds
its output to auth, that to ratelimit, that to secure, then gates on
the shell success_criterion. Any skill that emits a Universal Protocol
failure (STUCK, BLOCKED, etc.) halts the whole team.
Append one row per dispatched skill to .godmode/team-log.tsv:
timestamp team pattern round skill status elapsed_ms notes
At team completion append a summary row with skill=__team__ and
status ∈ {DONE, FAILED, criterion_failed} and total elapsed time.
skills: → BLOCKED: unknown_skill:<name>. The
bundle is invalid — do not partially run it.BLOCKED: invalid_pattern. Must be one of
the 6 from docs/coordination-patterns.md..godmode/teams/ is user-owned. This skill reads from it, never writes
to it.KEEP a team run if: every dispatched skill reported DONE
AND success_criterion exited 0.
DISCARD otherwise: log which skill or criterion failed.
The team layer does not git-reset — individual skills already
follow the Universal Protocol and own their own reverts.
STOP when FIRST of:
- target_reached: every skill DONE and success_criterion passed
- bundle_invalid: validation failed before dispatch
- skill_failed: one skill cascaded a Universal Protocol failure
- criterion_failed: every skill DONE but success_criterion non-zero
| Failure | Action |
|---|---|
BLOCKED: no_such_team | List .godmode/teams/*.yaml, suggest closest name. |
BLOCKED: invalid_pattern | Print the 6 valid patterns. Bundle author fixes. |
BLOCKED: unknown_skill:<n> | List skills/*/SKILL.md, suggest closest match. |
BLOCKED: team_too_large | Split the bundle; compose two teams via Pipeline. |
skill_failed at round N | Log skill+round. User decides rerun or edit bundle. |
criterion_failed | Team did not achieve goal. No auto-retry at team layer. |
skills/godmode/SKILL.md — the orchestrator. Routes /godmode:team here.docs/coordination-patterns.md — the vocabulary. Every pattern value
must come from this file.skills/plan/SKILL.md — declares a pattern in its plan header; a team
bundle is the same idea at invocation time instead of plan time.skills/build/SKILL.md — Fan-out dispatch rules used when a team picks
the Fan-out/Fan-in pattern.api, auth, secure, ...) — the atoms a team
bundle composes. This skill never replaces them.
评论 (0)
暂无评论,成为第一个评论者吧!