Agent skill

Gan Style Harness

by affaan-m in affaan-m/ECC

受GAN启发的生成器-评估器代理框架,用于自主构建高质量应用。基于Anthropic 2026年3月的框架设计论文. An agent skill from affaan-m/ECC.

MITAuto-check passed

Install Gan Style Harness

skills CLI
$ npx skills add affaan-m/ECC --skill gan-style-harness -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install affaan-m/ECC gan-style-harness --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/zh-CN/skills/gan-style-harness .claude/skills/gan-style-harness && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gan-style-harness
GitHub stars
276k
Token cost
~1.8k tokens
SKILL.md length
301 words
Files
1
Skills in repo
683
Repo updated
First seen
Licence
MIT

At a glance

受GAN启发的生成器-评估器代理框架,用于自主构建高质量应用。基于Anthropic 2026年3月的框架设计论文. An agent skill from affaan-m/ECC.

  • Works in 3 steps: 规划器智能体 → 生成器智能体 → 评估器智能体
  • SKILL.md covers 核心洞察, 适用场景, 不适用场景 and 架构, plus 8 more sections
  • Calls claude and npm

What it does

Gan Style Harness is an agent skill from affaan-m/ECC. 受GAN启发的生成器-评估器代理框架,用于自主构建高质量应用。基于Anthropic 2026年3月的框架设计论文。

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. The licence is MIT.

Example prompts

  • “/gan-style-harness”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. 规划器智能体
  2. 生成器智能体
  3. 评估器智能体

What it can do on your machine

Read from SKILL.md and the folder at commit 4eb71d9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • claude
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • anthropic.com
    • epsilla.com
    • martinfowler.com
    • openai.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gan Style Harness loads about 1.8k tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 301 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~19
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from affaan-m/ECC at commit 4eb71d9, republished under its MIT licence (© affaan-m). 301 words, ~1,807 tokens.

Download SKILL.mdSave it as .claude/skills/gan-style-harness/SKILL.md (or your agent's skills folder).
name
gan-style-harness
description
受GAN启发的生成器-评估器代理框架,用于自主构建高质量应用。基于Anthropic 2026年3月的框架设计论文。
origin
ECC-community
tools
Read, Write, Edit, Bash, Grep, Glob, Task

GAN 风格编排技能

灵感来源于 Anthropic 的长时间运行应用开发编排设计(2026年3月24日)

一种多智能体编排,将生成与评估分离,形成对抗性反馈循环,推动质量远超单个智能体所能达到的水平。

核心洞察

当要求评估自身工作时,智能体是病态的乐观主义者——它们会赞美平庸的输出,并说服自己忽略真正的问题。但设计一个独立的评估器并使其极度严格,远比教会生成器自我批评要容易得多。

这与 GAN(生成对抗网络)的机制相同:生成器负责产出,评估器负责批评,这种反馈驱动下一轮迭代。

适用场景

  • 根据一行提示构建完整应用
  • 需要高视觉质量的前端设计任务
  • 需要工作功能而不仅仅是代码的全栈项目
  • 任何"AI 垃圾"美学不可接受的任务
  • 愿意投入 50-200 美元以获得生产级质量输出的项目

不适用场景

  • 快速单文件修复(使用标准 claude -p)
  • 预算紧张的任务(<10 美元)
  • 简单重构(改用去垃圾化模式)
  • 已有完善测试规范的任务(使用 TDD 工作流)

架构

                    ┌─────────────┐
                    │   规划器    │
                    │  (Sonnet)   │
                    └──────┬──────┘
                           │ 产品规格
                           │ (功能、冲刺、设计方向)
                           ▼
              ┌────────────────────────┐
              │                        │
              │   生成器-评估器        │
              │     反馈循环           │
              │                        │
              │  ┌──────────┐          │
              │  │ 生成器   │--构建-->│──┐
              │  │ (Sonnet) │          │  │
              │  └────▲─────┘          │  │
              │       │                │  │ 实时应用
              │    反馈               │  │
              │       │                │  │
              │  ┌────┴─────┐          │  │
              │  │ 评估器   │<-测试---│──┘
              │  │ (Sonnet) │          │
              │  │+Playwright│         │
              │  └──────────┘          │
              │                        │
              │   5-15 次迭代         │
              └────────────────────────┘

三个智能体

1. 规划器智能体

角色: 产品经理——将简短的提示扩展为完整的产品规格。

关键行为:

  • 接收一行提示,生成包含 16 个功能、多个冲刺的规格
  • 定义用户故事、技术需求和视觉设计方向
  • 故意雄心勃勃——保守规划会导致结果平庸
  • 生成评估器后续使用的评估标准

模型: 默认 Sonnet;可通过 GAN_PLANNER_MODEL=opus 提升以获得更深入的规格扩展

2. 生成器智能体

角色: 开发者——根据规格实现功能。

关键行为:

  • 按结构化冲刺工作(或使用较新模型的连续模式)
  • 在编写代码前与评估器协商"冲刺合约"
  • 使用全栈工具:React、FastAPI/Express、数据库、CSS
  • 管理 git 进行迭代间的版本控制
  • 读取评估器反馈并在下一轮迭代中采纳

模型: 默认 Sonnet;可通过 GAN_GENERATOR_MODEL=opus 提升以获得最强编码能力

3. 评估器智能体

角色: QA 工程师——测试实时运行的应用,而不仅仅是代码。

关键行为:

  • 使用 Playwright MCP 与实时应用交互
  • 点击功能、填写表单、测试 API 端点
  • 根据四个标准评分(可配置):
    1. 设计质量——是否感觉像一个连贯的整体?
    2. 原创性——自定义决策 vs. 模板/AI 模式?
    3. 工艺——排版、间距、动画、微交互?
    4. 功能性——所有功能是否真正工作?
  • 返回结构化反馈,包含分数和具体问题
  • 设计为极度严格——从不赞美平庸的工作

模型: 默认 Sonnet;可通过 GAN_EVALUATOR_MODEL=opus 提升以获得更强的判断力 + 工具使用能力

评估标准

默认四个标准,每个评分 1-10:

markdown
## 评估标准

### 设计质量(权重:0.3)
- 1-3分:模板化、千篇一律的"AI生成"美学
- 4-6分:合格但平庸,遵循常规设计
- 7-8分:独特且连贯的视觉识别
- 9-10分:可媲美专业设计师作品

### 原创性(权重:0.2)
- 1-3分:默认配色、模板布局,缺乏个性
- 4-6分:部分自定义选择,整体仍属常规模式
- 7-8分:清晰的创意构思,独特的设计手法
- 9-10分:令人惊喜、愉悦,真正新颖

### 工艺水平(权重:0.3)
- 1-3分:布局错乱,状态缺失,无动画效果
- 4-6分:功能可用但粗糙,间距不统一
- 7-8分:精致流畅,过渡平滑,响应式设计
- 9-10分:像素级完美,令人愉悦的微交互

### 功能性(权重:0.2)
- 1-3分:核心功能损坏或缺失
- 4-6分:主流程可用,边缘情况处理失败
- 7-8分:所有功能正常,错误处理良好
- 9-10分:无懈可击,覆盖所有边缘情况
评分
  • 加权分数 = 总和(标准_分数 * 权重)
  • 通过阈值 = 7.0(可配置)
  • 最大迭代次数 = 15(可配置,通常 5-15 次足够)

使用方法

通过命令行
bash
# Full three-agent harness
/project:gan-build "Build a project management app with Kanban boards, team collaboration, and dark mode"

# With custom config
/project:gan-build "Build a recipe sharing platform" --max-iterations 10 --pass-threshold 7.5

# Frontend design mode (generator + evaluator only, no planner)
/project:gan-design "Create a landing page for a crypto portfolio tracker"
通过 Shell 脚本
bash
# Basic usage
./scripts/gan-harness.sh "Build a music streaming dashboard"

# With options
GAN_MAX_ITERATIONS=10 \
GAN_PASS_THRESHOLD=7.5 \
GAN_EVAL_CRITERIA="functionality,performance,security" \
./scripts/gan-harness.sh "Build a REST API for task management"
通过 Claude Code(手动)
bash
# Step 1: Plan
claude -p --model sonnet "You are a Product Planner. Read PLANNER_PROMPT.md. Expand this brief into a full product spec: 'Build a Kanban board app'. Write spec to spec.md"

# Step 2: Generate (iteration 1)
claude -p --model sonnet "You are a Generator. Read spec.md. Implement Sprint 1. Start the dev server on port 3000."

# Step 3: Evaluate (iteration 1)
claude -p --model sonnet --allowedTools "Read,Bash,mcp__playwright__*" "You are an Evaluator. Read EVALUATOR_PROMPT.md. Test the live app at http://localhost:3000. Score against the rubric. Write feedback to feedback-001.md"

# Step 4: Generate (iteration 2 — reads feedback)
claude -p --model sonnet "You are a Generator. Read spec.md and feedback-001.md. Address all issues. Improve the scores."

# Repeat steps 3-4 until pass threshold met

随模型能力的演进

编排应随模型改进而简化。遵循 Anthropic 的演进路径:

阶段 1 — 较弱模型(Sonnet 级别)
  • 需要完整的冲刺分解
  • 冲刺间重置上下文(避免上下文焦虑)
  • 最少 2 个智能体:初始化器 + 编码智能体
  • 大量脚手架弥补模型限制
阶段 2 — 能力型模型(Opus 4.5 级别)
  • 完整的 3 智能体编排:规划器 + 生成器 + 评估器
  • 每个实现阶段前有冲刺合约
  • 复杂应用分解为 10 个冲刺
  • 上下文重置仍有帮助但不再关键
阶段 3 — 前沿模型(Opus 4.6 级别)
  • 简化编排:单次规划,连续生成
  • 评估简化为单次最终评估(模型更智能)
  • 无需冲刺结构
  • 自动压缩处理上下文增长

关键原则: 编排的每个组件都编码了一个关于模型无法独立完成什么的假设。当模型改进时,重新测试这些假设。剥离不再需要的部分。

配置

环境变量
变量默认值描述
GAN_MAX_ITERATIONS15最大生成器-评估器循环次数
GAN_PASS_THRESHOLD7.0通过所需的加权分数(1-10)
GAN_PLANNER_MODELsonnet规划智能体的模型
GAN_GENERATOR_MODELsonnet生成器智能体的模型
GAN_EVALUATOR_MODELsonnet评估器智能体的模型
GAN_EVAL_CRITERIAdesign,originality,craft,functionality逗号分隔的标准
GAN_DEV_SERVER_PORT3000实时应用的端口
GAN_DEV_SERVER_CMDnpm run dev启动开发服务器的命令
GAN_PROJECT_DIR.项目工作目录
GAN_SKIP_PLANNERfalse跳过规划器,直接使用规格
GAN_EVAL_MODEplaywrightplaywright、screenshot 或 code-only
评估模式
模式工具最适合
playwright浏览器 MCP + 实时交互带 UI 的全栈应用
screenshot截图 + 视觉分析静态网站、纯设计
code-only测试 + 代码检查 + 构建API、库、CLI 工具

反模式

  1. 评估器过于宽松——如果评估器在第一次迭代就通过所有内容,你的评分标准过于慷慨。收紧评分标准,并为常见的 AI 模式添加明确惩罚。

  2. 生成器忽略反馈——确保反馈以文件形式传递,而非内联。生成器应在每次迭代开始时读取 feedback-NNN.md。

  3. 无限循环——始终设置 GAN_MAX_ITERATIONS。如果生成器在 3 次迭代后无法突破分数平台,停止并标记为人工审查。

  4. 评估器测试流于表面——评估器必须使用 Playwright 交互实时应用,而不仅仅是截图。点击按钮、填写表单、测试错误状态。

  5. 评估器赞美自己的修复——绝不允许评估器建议修复后再评估这些修复。评估器只负责批评;生成器负责修复。

  6. 上下文耗尽——对于长时间会话,使用 Claude Agent SDK 的自动压缩或在主要阶段之间重置上下文。

结果:预期效果

基于 Anthropic 已发布的结果:

指标单智能体GAN 编排改进
时间20 分钟4-6 小时12-18 倍更长
成本9 美元125-200 美元14-22 倍更多
质量勉强可用生产就绪质变
核心功能有缺陷全部工作不适用
设计通用 AI 垃圾独特、精致不适用

权衡很明确: 约 20 倍的时间和成本,换来输出质量的质的飞跃。这适用于质量至关重要的项目。

参考

© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in docs/zh-CN/skills/gan-style-harness of affaan-m/ECC.

Open the folder on GitHubat commit 4eb71d9

Compare with similar skills

Gan Style Harness next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gan Style Harness compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gan Style Harness this skillaffaan-m/ECC276k—~1.8kAutomated safety check: PassMIT
Gan AI AutomationComposioHQ/awesome-claude-skills77k3 repos~727Automated safety check: PassNone
01 Lich Noi Dungminhnv0807/ai-business-skills609—~4.2kAutomated safety check: PassMIT
27 Personal Brand Monetizeminhnv0807/ai-business-skills609—~3.9kAutomated safety check: PassMIT
GenerativeVectorSpaceLab/AREX-Skill331—~2.9kAutomated safety check: PassApache-2.0
AI Pm Advisory BoardSpaceZephyr/career.skill160—~1.1kAutomated safety check: PassNone

Similar skills

  • Gan AI Automation

    ComposioHQ/awesome-claude-skills

    Automate Gan AI tasks via Rube MCP (Composio). An agent skill from ComposioHQ/awesome-claude-skills.

    77k GitHub starsUsed in 3 repos~727 tokens
    Productivity & AutomationAuto-check passed
  • 01 Lich Noi Dung

    minhnv0807/ai-business-skills

    Dung khi can lich dang bai cho ca thang — chot content pillar va ti le, xep bai theo ngay va khung gio, ma tran tai su dung noi dung, va gan muc tieu cho tung tru cot.

    609 GitHub stars~4.2k tokensUpdated 29 days ago
    Writing & ContentAuto-check passed
  • 27 Personal Brand Monetize

    minhnv0807/ai-business-skills

    Dung khi mot CA NHAN da co nguoi theo doi va muon RA TIEN — 3 phien ban funnel cho founder, coach, creator; offer ladder tu mien phi den high-ticket; tam ly gia cho dich vu gan voi con nguoi…

    609 GitHub stars~3.9k tokensUpdated 29 days ago
    Marketing & SEOAuto-check passed
  • Generative

    VectorSpaceLab/AREX-Skill

    A skill your agent uses for PaddleViT GAN workflows with TransGAN or Styleformer: choose the generator/discriminator family, validate CIFAR10/STL10/CelebA/LSUN-LMDB inputs, generate or evaluate…

    331 GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed
  • AI Pm Advisory Board

    SpaceZephyr/career.skill

    AI 产品经理顾问团总控。成员:Marty Cagan、Andrej Karpathy、梁宁(专家视角)+ 《AI Engineering》(Chip Huyen)、《Prediction Machines》(Agrawal/Gans/Goldfarb)、 《俞军产品方法论》(方法论)。

    160 GitHub stars~1.1k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • Auto Improve

    crimeacs/auto-improve

    GAN-style iterative improvement loop for any text artifact. An agent skill from crimeacs/auto-improve.

    135 GitHub stars~651 tokensUpdated 2 mo ago
    EducationAuto-check passed

More from affaan-m/ECC

All 682 skills in this repo
  • Skill Stocktake

    affaan-m/ECC

    Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.

    277k GitHub starsUsed in 5 repos~3.1k tokens
    Auto-check passed
  • Ingests, indexes, searches, edits and monitors video, audio and live streams through the VideoDB Python SDK, returning stream links, clips and timestamps.

    277k GitHub starsUsed in 3 repos~3.5k tokens
    Auto-check: notes
  • Docs Governance

    affaan-m/ECC

    Route broad documentation-governance requests to existing ECC skills and run an opt-in, read-only audit of mapped documentation roles, links, ADR indexes, and evidence references.

    277k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Rules Distillation

    affaan-m/ECC

    Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.

    277k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check passed
  • Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.

    277k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Set an ECC-specific frontend design direction for production UI work.

    277k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Questions about Gan Style Harness

What does Gan Style Harness do?

受GAN启发的生成器-评估器代理框架,用于自主构建高质量应用。基于Anthropic 2026年3月的框架设计论文. An agent skill from affaan-m/ECC. Gan Style Harness is an agent skill from affaan-m/ECC.

How do I install Gan Style Harness in Claude Code?

Run `npx skills add affaan-m/ECC --skill gan-style-harness -a claude-code`. Or copy the skill folder (docs/zh-CN/skills/gan-style-harness in affaan-m/ECC) into .claude/skills/gan-style-harness in your project. Claude Code loads it when a task matches its description.

How do I install Gan Style Harness in Codex?

Run `npx skills add affaan-m/ECC --skill gan-style-harness -a codex`. Or copy the skill folder (docs/zh-CN/skills/gan-style-harness in affaan-m/ECC) into .agents/skills/gan-style-harness in your project. Codex loads it when a task matches its description.

Can I use Gan Style Harness in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill gan-style-harness -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gan-style-harness, .gemini/skills/gan-style-harness, .github/skills/gan-style-harness and .opencode/skills/gan-style-harness in your project.

What does Gan Style Harness need to run?

Going by SKILL.md and its folder, Gan Style Harness needs the command-line tools its instructions call (claude and npm).

Does Gan Style Harness access the network?

SKILL.md names 4 domains. As links in the text: anthropic.com, epsilla.com, martinfowler.com and openai.com. This is read from the text; nothing was executed.

Is Gan Style Harness safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gan Style Harness use?

Gan Style Harness is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gan Style Harness use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gan Style Harness?

Skills that share tags, products or a category with Gan Style Harness: Gan AI Automation (ComposioHQ/awesome-claude-skills, 77k stars), 01 Lich Noi Dung (minhnv0807/ai-business-skills, 609 stars), 27 Personal Brand Monetize (minhnv0807/ai-business-skills, 609 stars) and Generative (VectorSpaceLab/AREX-Skill, 331 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gan Style Harness?

affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 276,111 GitHub stars. The repository holds 683 skills in this directory. The repository was last updated on October 10, 2026.

Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.