SkillAtlasSkill 详情

team

Godmode turns any AI coding assistant into an autonomous engineering loop — 135 skills that meas...

审核状态:已审核Quality 80Security 80

复制安装命令

用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。

复制前请先查看来源、License 和安全提示。

项目 README

来源文件:README.md

抓取于 2026年8月28日

Godmode — Autonomous AI Coding Agent for Claude Code, Cursor, Codex & Gemini

Your AI writes code. Godmode makes it write great code — then proves it.

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.

License: MIT Skills Agents Claude Code Codex Gemini CLI Cursor OpenCode pi Amp Benchmark

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

Real capture, live pi session — a win kept, a regression caught and reverted. More demos ↓

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.


See It In Action

Real captures from live pi sessions (zai/glm-5.3, recorded with vhs) — tapes and targets in demo/.

1. Skill routing — request to matched skill

godmode Tier-1 matching routes a checkout rate-limiting request to the ratelimit skill.

Terminal capture: godmode routing — Tier-1 matching dispatches a checkout rate-limiting request to the ratelimit skill (secondary: pay) and exits ROUTED_OK

Transcript (accessible text fallback)
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)

2. Optimize loop — real keep, real revert

baseline 189ms, lru_cache KEEP at 0ms, fib(32) regression DISCARD at 517ms, reverted with git reset — real metric, real revert.

Terminal capture: optimize loop — baseline 189ms, lru_cache KEEP at 0ms, fib(32) regression DISCARD at 517ms, reverted with git reset --hard HEAD~1

Transcript (accessible text fallback)
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

3. Goal-bridge — machine-checkable completion contract

a failing test goes red to green under a 4-field contract (metric / threshold / evidence / rollback) with exit-0 proof.

Terminal capture: goal-bridge — 4-field contract, evidence appended each round, ends with CONTRACT MET — exit 0

Transcript (accessible text fallback)
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.

More output shapes (illustrative, not captured runs)

Performance Optimization — 847ms to 198ms, fully autonomous

$ /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

Multi-Agent Build — 4 agents, isolated worktrees, clean merge

$ /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 ===

Security Audit — STRIDE + OWASP + red team

$ /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.


Quick Start

# 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.


What Is Godmode?

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.

How Godmode Compares to Plain AI Coding

ProblemGodmode's answer
AI generates code once and stopsAutonomous iteration loops that run until the goal is met
No way to know if a change helpedEvery change is benchmarked against a mechanical metric
Bad changes stay in the codebaseAutomatic git revert on any regression
Complex tasks bottleneck on one agentUp to 5 parallel agents in isolated git worktrees
AI repeats the same mistakesFailure memory classifies and logs every failed approach
Crashes lose all progressSession state persists and auto-resumes
Improvements might be noiseVariance testing and generalization gates prevent overfitting
AI silently picks one interpretationKarpathy prelude: state assumptions, surface alternatives, emit NEEDS_CONTEXT on ambiguity
AI adds "while we're here" refactorsLine-trace rule + pre-commit discard audit surgically drops drift hunks
Long autonomous loops burn tokensTerse mode, stdio patterns, Progressive Disclosure routing — ~90% routing context reduction, 40-60% emit reduction
Agents silently guess missing dispatch fieldsDispatchContext schema validation — missing field → BLOCKED: invalid_dispatch

Benchmark

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.


How It Works

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.

The Full Pipeline

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.

Failure Intelligence

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.

Multi-Agent Execution

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.


What Fires by Default

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.

Authoring discipline (Karpathy family)

  • Principles prelude — every agent reads 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).
  • 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.
  • DispatchContext schema — all 7 subagents validate their input at dispatch time. Missing required field → BLOCKED: invalid_dispatch. See AGENTS.md § DispatchContext Schema.
  • 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.

Token optimization (four-layer stack)

  • 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.
  • Stdio input-side compression — 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.
  • Terse output-side compression — 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.
  • Token observability — 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.

Coordination and research

  • Named coordination patterns — every plan declares its outermost pattern from 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.
  • 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 to gather prior art. Skip for trivial fixes or with --no-research.

The 8 pipeline skills inherit by default

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.


Subagents (7)

AgentRole
plannerDecomposes goals into parallel tasks
builderImplements tasks with TDD in isolated worktrees
reviewerCode review for correctness, security, performance, style
optimizerAutonomous measure --> modify --> verify loop
explorerRead-only codebase reconnaissance
securitySTRIDE + OWASP audit with 4 adversarial personas
testerTDD test generation, RED-GREEN-REFACTOR

Skills (135)

Godmode includes 135 skills across 13 domains. Each skill encodes a real engineering workflow — not just instructions, but a complete protocol with verification steps.

DomainCountHighlights
Core Workflow16godmode think plan build test review optimize debug fix ship verify goal-bridge (new)
Discipline & Context8principles terse stdio tokens research bench team tutorial (new)
Architecture & Design10architect rfc ddd pattern schema distributed scale migration
API & Backend14api graphql grpc orm cache queue event realtime webhook
Frameworks12react nextjs vue svelte node fastapi django rails spring
Security & Compliance8secure auth rbac pentest devsecops comply
Testing7e2e integration loadtest perf webperf
DevOps & Infra16k8s docker cicd ghactions infra observe resilience
Frontend & UI9ui a11y seo mobile designsystem responsive
Databases3postgres redis nosql
AI & ML5ml mlops rag prompt eval
Developer Experience13docs refactor git pr monorepo changelog slo
Integrations14i18n pay cli agent feature chaos experiment

The 8 Discipline & Context skills (shipped across Phases 0–E)

SkillWhat it does
principlesKarpathy authoring-discipline prelude. Four rules every agent reads before the first Edit. Imported via @./ so every adapter gets it automatically.
terseOutput 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.
stdio13 canonical command patterns for minimizing tool-output token waste. Godmode-native alternative/complement to rtk.
tokensPer-round token-budget observability. Logs input/output counts to .godmode/token-log.tsv. Answers "is my loop getting cheaper over time?"
researchPrior-art gathering phase. Auto-dispatched before think on non-trivial tasks. Uses the explorer subagent. Writes .godmode/research.md.
benchFormal benchmark harness. 3-arm eval (baseline + variants) with N-run variance recovery. Writes .godmode/bench-results.tsv.
teamTeam bundle primitive. Compose existing skills into named sequences via YAML bundles in .godmode/teams/<name>.yaml. Uses one of the 6 coordination patterns.
tutorialDay-0 walkthrough. 7 steps, ≤5 minutes, first /godmode:optimize run.

Full skill reference: skills/


Platforms

HarnessInstallIntegrationAgentsModels
Claude Codeclaude plugin install godmodePlugin (commands/, agents/, .claude-plugin/ marketplace)Parallel (worktrees)Full
pibash adapters/pi/install.shSkills dir — $HOME/.pi/agent/skills/godmode/Skills onlyFull
ompPREFIX="$HOME/.omp/agent/skills" bash adapters/pi/install.shSkills dir — $HOME/.omp/agent/skills/godmode/ + one-line customDirectories registration (omp scans one level per skill; see adapters/pi/README.md)Skills onlySkill-level (same corpus as pi)
Codexbash adapters/codex/install.shCopies .codex/ agents into your repo; harness reads root AGENTS.mdNative (sequential)Partial
OpenCodebash adapters/opencode/install.shPlugin (plugin.json + adapter entry)SequentialPartial
Gemini CLIbash adapters/gemini/install.shGenerated files in your repo (GEMINI.md + config)SequentialSession-level
Cursorbash adapters/cursor/install.shGenerated files in your repo (.cursorrules)Background agentsSession-level
Ampbash adapters/amp/install.shSkills dir — .agents/skills/ in your repo (Amp-native) + root AGENTS.mdSkills only—

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:

skills:
  customDirectories:
    - ~/.omp/agent/skills/godmode

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 for the full omp walkthrough. Amp: reads root AGENTS.md and 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)

Multi-model routing

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:

HarnessModel routing
piFull — per-child model params
Claude CodeFull
OpenCodePartial
CodexPartial
CursorSession-level
Gemini CLISession-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.


Philosophy

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.


Contributing

Every skill is a Markdown file. If you can write clear instructions, you can add a skill.

See CONTRIBUTING.md for the complete guide:


Frequently Asked Questions

How does Godmode differ from Copilot, Cursor, or other AI coding tools?

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.

Does Godmode work with any programming language?

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.

Can I use Godmode for free?

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.

What does "autonomous" mean? Does it run without human input?

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.

Is it safe? Can it break my code?

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.

How do I add my own skills?

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.

What is the authoring-discipline prelude?

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.

How does Godmode save tokens on long autonomous loops?

Four layers of compression that stack multiplicatively:

  1. 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.
  2. 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 for shell-hook enforcement.
  3. 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.
  4. Token observability — per-round input/output counts logged to .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.

What does "Default Activations" mean?

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.


Community

Wins, questions, and failure stories are welcome in Discussions. Share what godmode kept — or reverted — for you.

Star History Chart


License

MIT -- see LICENSE.


Discipline before speed. Evidence before claims. Git is memory.

Install | Docs | FAQ | Troubleshooting | Discuss

Agent / MCP / Skill 创作

中风险

  • 来源需自行核对维护者身份。
  • 包含脚本或命令调用,安装前请复核。
  • 未检测到明显外部权限要求。
  • 未检测到高风险命令。
  • 扫描发现:2 条。

Codex — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/arbazkhan971/godmode.git
  3. 将 "skills/team" 文件夹复制到 Codex 的 skills 目录中。
  4. 重启 Codex 让新的 skill 生效。

Codex — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Codex 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Codex 让新的 skill 生效。

Claude Code — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/arbazkhan971/godmode.git
  3. 将 "skills/team" 文件夹复制到 Claude Code 的 skills 目录中。
  4. 重启 Claude Code 让新的 skill 生效。

Claude Code — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Claude Code 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Claude Code 让新的 skill 生效。

Cursor — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/arbazkhan971/godmode.git
  3. 将 "skills/team" 文件夹复制到 Cursor 的 skills 目录中。
  4. 重启 Cursor 让新的 skill 生效。

Cursor — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Cursor 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Cursor 让新的 skill 生效。

GitHub Copilot — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/arbazkhan971/godmode.git
  3. 将 "skills/team" 文件夹复制到 GitHub Copilot 的 skills 目录中。
  4. 重启 GitHub Copilot 让新的 skill 生效。

GitHub Copilot — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 GitHub Copilot 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 GitHub Copilot 让新的 skill 生效。

Windsurf — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/arbazkhan971/godmode.git
  3. 将 "skills/team" 文件夹复制到 Windsurf 的 skills 目录中。
  4. 重启 Windsurf 让新的 skill 生效。

Windsurf — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Windsurf 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Windsurf 让新的 skill 生效。
查看 SKILL.md 原文
name: team
description: Team bundles. Invoke named skill bundles, YAML coordination pattern, dispatch pipeline/parallel/swarm, /godmode:team.

Activate When

  • /godmode:team <name> — load .godmode/teams/<name>.yaml and dispatch
  • /godmode:team without a name — list bundles found in .godmode/teams/
  • Natural language "run the team" or "use the bundle"

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.

Bundle Format

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.

Pattern Must Be One Of

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.

Workflow

1. Resolve Bundle

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.

2. Validate

  • pattern ∈ the 6 known patterns — else BLOCKED: invalid_pattern
  • len(skills) <= 10 — else BLOCKED: team_too_large
  • Every entry in skills 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=value

3. Dispatch by Pattern

CASE 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.

4. One Big Autoresearch Loop

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

5. Success 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.

Example Bundle: api-backend

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.

TSV Logging

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.

Hard Rules

  1. Teams COMPOSE existing skills. Never define new skill logic inside a bundle. A bundle is pure wiring.
  2. Missing skill in skills: → BLOCKED: unknown_skill:<name>. The bundle is invalid — do not partially run it.
  3. Unknown or missing pattern → BLOCKED: invalid_pattern. Must be one of the 6 from docs/coordination-patterns.md.
  4. Max 10 skills per team. Longer chains are runaway. Split into multiple teams and compose them via Pipeline.
  5. Cascade on failure: if skill N fails the Universal Protocol, stop and log which skill failed. Never skip a failed skill.
  6. No new coordination patterns. No registry. No marketplace. No catalog of pre-made teams shipped with godmode.
  7. .godmode/teams/ is user-owned. This skill reads from it, never writes to it.

Keep/Discard Discipline

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 Conditions

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

Error Recovery

FailureAction
BLOCKED: no_such_teamList .godmode/teams/*.yaml, suggest closest name.
BLOCKED: invalid_patternPrint the 6 valid patterns. Bundle author fixes.
BLOCKED: unknown_skill:<n>List skills/*/SKILL.md, suggest closest match.
BLOCKED: team_too_largeSplit the bundle; compose two teams via Pipeline.
skill_failed at round NLog skill+round. User decides rerun or edit bundle.
criterion_failedTeam did not achieve goal. No auto-retry at team layer.

Relationship to Other Skills

  • 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.
  • Individual work skills (api, auth, secure, ...) — the atoms a team bundle composes. This skill never replaces them.

发现问题?提交给管理员复核

评分:

评论 (0)

暂无评论,成为第一个评论者吧!