Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
PluginAn toànReview & chất lượng codeDễ cho người mới

slot-machine

pejmanjohn · pejmanjohn/slot-machine

Kỹ năng này thực thi song song các triển khai tính năng, đánh giá độc lập và chọn hoặc tổng hợp kết quả tốt nhất để kiểm soát chất lượng.

An open-source skill for running parallel implementations, reviewing them independently, and selecting or synthesizing the best result.

31 sao4Giấy phép: MITCập nhật 7 tháng trước0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Nhận ba triển khai mã khác nhau cho một tính năng mới và chọn cái tốt nhất.
  • Sử dụng các tác nhân độc lập để xem xét và gỡ lỗi các phiên bản song song của một module.
  • Tổng hợp các phần tốt nhất từ nhiều giải pháp mã do AI tạo ra thành một phiên bản cuối cùng vượt trội.

Kiểm tra an toàn

An toàn

Không thấy dấu hiệu rủi ro trong các file đã quét.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

🎰 Slot Machine

An open-source best-of-N agent skill for Claude Code and Codex.

AI agents are probabilistic. The same spec produces different code every time — different designs, different bugs, different quality. A single attempt is a coin flip. Slot Machine gives you N coins and keeps the best one — or combines the best parts of each.

Run N independent implementations of the same feature in parallel. Each gets reviewed by an independent agent that hunts for real bugs. A meta-judge compares all of them and makes one of three calls: pick the clear winner, synthesize the best elements from multiple implementations into something better than any individual, or reject all if none meet the bar.

SKILL.md stays the main orchestration contract. Bulky executable examples and reference material now live under repo-root references/, and the generated Codex runtime bundle exposes that same references/ tree alongside SKILL.md.

What You Can Do

Run 3 competing implementations and pick the best one:

/slot-machine with 3 slots — Implement the payment webhook handler from PLAN.md

Three agents implement the same spec independently, each steered toward a different emphasis such as simplicity, robustness, or functional style. Independent reviewers hunt for bugs in each. A judge picks the winner — or synthesizes the best parts of several.

Run the same workflow from Codex with the native skill invocation:

$slot-machine with 3 slots — Implement the payment webhook handler from PLAN.md

Same orchestration, same artifacts, same review pipeline. The active host just changes how the skill is invoked and how native slots are dispatched.

Assign a different skill to each slot:

/slot-machine with /superpowers:test-driven-development and /ce:work — Build the rate limiter

Slot 1 follows TDD (tests first). Slot 2 follows CE patterns (codebase-aware). Same spec, different methodologies, best result wins.

Use Claude-style /skill or Codex-style $skill, and target external harnesses when you want:

/slot-machine with /superpowers:test-driven-development, $ce:work + codex, and codex — Implement the API

Three slots: Claude with TDD, Codex with CE patterns, and bare Codex. Slot definitions accept both /skill and $skill; slot-machine normalizes them and dispatches the right host-native form to each harness.

It works for writing too:

/slot-machine with profile: writing — Write the launch announcement

Each slot drafts with a different voice and structure. The judge picks the strongest draft or synthesizes the best elements from several.

Set it once in your project and forget:

## Slot Machine Settings (add to `AGENTS.md` or `CLAUDE.md`)
slot-machine-slots:
  - /superpowers:test-driven-development
  - /ce:work
  - codex
  - default

Every slot-machine invocation in this project uses these slots automatically.

How It Works

Slot-machine dispatches a pipeline of specialized agents. Each role is isolated — implementers never see each other's work, reviewers never see each other's reviews.

StepAgentWhat it does
ImplementN implementers (parallel)Each builds the full spec independently in the active profile's isolated slot workspace: a git worktree for worktree profiles, or a per-slot file/directory target for file-isolated profiles. Different slots can use different skills or even different agent harnesses (Codex).
ReviewN reviewers (parallel)Each reviews one implementation blind — spec compliance, adversarial bug hunting with file:line evidence, test gap analysis.
Judge1 judgeReads all reviewer scorecards, does targeted code inspection where reviewers disagree, and issues a verdict: PICK the winner, SYNTHESIZE the best elements, or NONE_ADEQUATE.
Synthesize1 synthesizer (if needed)Takes one slot as base, ports specific elements from donors per the judge's plan, verifies coherence, runs the full test suite.
ResolveOrchestratorFinalizes the winner or synthesis result, cleans up worktrees when the profile uses them, and writes result artifacts with full model attribution.

The key insight: the agent that implements never evaluates. The agent that reviews never sees alternatives. The judge only sees structured scorecards, not raw code (unless it needs to inspect a specific disagreement). This separation reduces the self-evaluation bias that shows up when one agent does everything.[^anthropic-harness]

Claude Code: Install

For local development and testing, the recommended Claude install path is a symlinked skill managed from a source checkout:

git clone https://github.com/pejmanjohn/slot-machine.git ~/src/slot-machine
~/src/slot-machine/scripts/install-claude-skill.sh

And update slot-machine with:

~/src/slot-machine/scripts/update-claude-skill.sh --pull

If you already installed slot-machine by cloning directly into ~/.claude/skills/slot-machine, that legacy layout still works. scripts/update-claude-skill.sh supports both the symlinked install above and a direct git checkout in Claude's skill directory.

Codex: Local Skill Install

For Codex, the recommended local install path is a generated standalone skill bundle, not a plugin-root symlink. This keeps the skill identifier clean as slot-machine, preserves the repo's plugin metadata for publishing and development, and exposes the bundled references/ tree next to SKILL.md:

git clone https://github.com/pejmanjohn/slot-machine.git ~/src/slot-machine
~/src/slot-machine/scripts/install-codex-skill.sh

Whenever you want to update to the latest slot-machine, run:

~/src/slot-machine/scripts/update-codex-skill.sh --pull

See It Work

You give it a spec:

/slot-machine with 3 slots — Implement the TaskScheduler from the spec

The skill takes over:

Slot Machine — coding p
Xem mã nguồn trên GitHub