gan
Skill3 starsChanged 31 days agoMITView on GitHub
Generator-evaluator loop that iterates a feature build until it clears a scored rubric threshold.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- iabhisekbosepm/claude-god-setuptheir own version, first seen Apr 7, 2026
- GAN-Thinking/gan-skilltheir own version, first seen Mar 29, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- GAN-Thinking/gan-skill★ 15same name
- iabhisekbosepm/claude-god-setup★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- asideSkill
- assessmentSkill
- auditSkill
- benchmarkSkill
- brainSkill
- checkpointSkill
- cleanupSkill
- concise-modeSkill
- cross-modelSkill
- deploySkill
- designSkill
- explainSkill
- fix-issueSkill
- guardSkill
- hotfixSkill
- incidentSkill
- infraSkill
- interview-meSkill
- investigateSkill
- migrateSkill
- module-auditSkill
- morningSkill
- onboardSkill
- planSkill
- profileSkill
- pr-summarySkill
- readmeSkill
- refactorSkill
- researchSkill
- resolveSkill
- respondSkill
- retroSkill
- reviewSkill
- session-logSkill
- setupSkill
- shipSkill
- skill-newSkill
- spikeSkill
- tddSkill
- testSkill
- zoom-outSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 51
Verify playwright is installed when GAN_EVAL_MODE=playwright.
- Very specific: line 52
Verify the dev server is reachable on GAN_DEV_SERVER_PORT, start it if not.
- Very specific: line 78
Close: Write gan-harness/result.md with: final score, iteration count, verdict, list of changed files, and a one-paragraph next-step …
- Very specific: line 88
Always check GAN_PASS_THRESHOLD against the rubric's weighted total, not against any single row.
- Very specific: line 101
Stop and discard the response when gan-generator or gan-evaluator called Edit, Write, or MultiEdit.
- Very specific: line 102
Stop and report when the dev server is unreachable on GAN_DEV_SERVER_PORT after running GAN_DEV_SERVER_CMD.
- Distinctive: line 103
Stop and ask for a corrected rubric when the planner's 5 weights do not sum to 10.
- Distinctive: line 104
Stop the loop when the weighted total has not improved across the last 2 iterations.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
Run a planner → generator → evaluator loop with a score-gated stop condition. The planner expands the brief into acceptance criteria and a rubric. The generator implements against the criteria. The evaluator scores the result, returns feedback. The loop iterates until the score crosses the threshold or the iteration cap is hit.
When to use
- The output has a measurable quality signal, Playwright test outcome, lint pass, custom rubric.
- The first attempt is unlikely to be the last attempt.
- The cost of running a feedback loop is justified by the quality lift.
When NOT to use
- One-shot implementations where the spec is unambiguous.
- Recurring schedules. Use the
/loopbuilt-in. - Visual design exploration. Use
/design variants. - Trivial fixes. Direct edit is faster.
Arguments
/gan "<brief>" is the canonical form. The brief is one or two sentences describing what to build.
Environment variables:
GAN_MAX_ITERATIONS(default 8). Hard cap on planner-generator-evaluator cycles.GAN_PASS_THRESHOLD(default 8.0). Weighted score 0-10 to consider passing.GAN_EVAL_MODE(defaultplaywright). One ofplaywright,screenshot,code-only. Determines which evaluator surface runs.GAN_DEV_SERVER_PORT(default 3000). Port the running app is reachable on.GAN_DEV_SERVER_CMD(defaultpnpm dev). Command to start the dev server when not already running.
Subagents
The skill orchestrates three Claude Code agents shipped alongside it:
agents/gan-planner.md: expands the brief into acceptance criteria, file list, and a 5-row scoring rubric.agents/gan-generator.md: implements the plan; returns proposed diffs or full file contents, NOT direct writes.agents/gan-evaluator.md: scores the implementation against the rubric, returns per-row scores and a verdict.
The orchestrator, this skill, is the sole filesystem writer. Same single-writer invariant as /plan multi-execute.
Process
- Pre-flight.
- Verify
playwrightis installed whenGAN_EVAL_MODE=playwright. - Verify the dev server is reachable on
GAN_DEV_SERVER_PORT, start it if not. - Initialize
gan-harness/workspace in the spec folder:feedback/,screenshots/,iterations/.
- Verify
- Plan once. Spawn
gan-plannerwith the brief. Receive:- Acceptance criteria as a checklist.
- File list, paths the implementation will touch.
- Rubric: 5 rows, each weighted 1-10, total weights sum to 10. Each row names a measurable quality.
Iterate, cap
GAN_MAX_ITERATIONS:a. Generate. Spawn
gan-generatorwith the plan, current state, and last iteration's feedback, if any. Generator returns proposed changes as unified diffs.b. Apply. Orchestrator parses the diffs and writes via Edit / Write / MultiEdit. On apply failure, treat as a generator failure: feed the error back to the generator, retry once, then move on.
c. Evaluate. Spawn
gan-evaluatoragainst the running app. Evaluator returns: - Per-row score 0-10. - Weighted total 0-10. - Verdict:ship,iterate, orabandon. - Concrete feedback per low-scoring row.d. Check stop. Stop when: - Weighted total >=
GAN_PASS_THRESHOLD. Status: passed. - Verdict isabandon. Status: aborted by evaluator. - Iterations >=GAN_MAX_ITERATIONS. Status: budget exhausted. - Score has not improved across the last 2 iterations. Status: plateau.- Close. Write
gan-harness/result.mdwith: final score, iteration count, verdict, list of changed files, and a one-paragraph next-step suggestion.
Single-Writer Invariant (NON-NEGOTIABLE)
gan-generator and gan-evaluator are briefed: "Return your output as text. Do NOT call Edit, Write, or MultiEdit. Do NOT modify any files." The orchestrator applies. If a subagent ignores the briefing, discard its response and respawn.
Rules
- Planner runs once. Re-planning mid-loop indicates the rubric was wrong; abort and start a fresh
/ganinstead. - Apply costs are real. Cap
GAN_MAX_ITERATIONSat 8 by default; loops past that have diminishing returns. - Always check
GAN_PASS_THRESHOLDagainst the rubric's weighted total, not against any single row. - The evaluator must run the same evidence path each iteration. Switching from screenshot to Playwright mid-loop invalidates the score history.
Common Rationalizations
- "Letting the generator write directly saves a step": two writers corrupt the iteration history. Discard any response that edited files and respawn.
- "The rubric is off, so re-plan mid-loop": a new rubric makes earlier scores incomparable. Abort and start a fresh
/gan. - "Playwright is slow, switch to screenshots for this round": changing the evidence path invalidates the score history. Keep
GAN_EVAL_MODEfixed for the run. - "One row scored 9, so it passes": the threshold applies to the weighted total.
- "One more iteration will clear the plateau": two iterations without improvement is the stop condition. Close with status plateau.
Red Flags
- Stop and discard the response when
gan-generatororgan-evaluatorcalled Edit, Write, or MultiEdit. - Stop and report when the dev server is unreachable on
GAN_DEV_SERVER_PORTafter runningGAN_DEV_SERVER_CMD. - Stop and ask for a corrected rubric when the planner's 5 weights do not sum to 10.
- Stop the loop when the weighted total has not improved across the last 2 iterations.
Verification
gan-harness/result.mdexists with the final score, iteration count, verdict, changed files, and a next-step paragraph.- The stop status is one of passed, aborted by evaluator, budget exhausted, or plateau, and matches the last evaluator output.
- The iteration count is at most
GAN_MAX_ITERATIONS. gan-harness/iterations/holds one record per iteration, all scored with the sameGAN_EVAL_MODE.git statuslists only files from the planner's file list plusgan-harness/.
Related skills
/plan. Use first to scope the brief. The plan can be the input to/gan./plan multi-execute. Different parallelism shape: multi-execute splits one task across model tiers;/ganiterates one task through a feedback loop./test. The evaluator may call/testunder the hood whenGAN_EVAL_MODE=code-only./loop. The Claude Code built-in for recurring or self-paced execution./ganis a single-task iteration;/loopis a cadence.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

