- Home
- Skills
- Agents & Orchestration
- Battle: AI Agents Compete, Best Code Wins
More screenshots
Works with the AI Agents you already use
Battle: AI Agents Compete, Best Code Wins
Several Claude agents build your task in parallel, a judge picks the best and fixes it, and only the winner touches your code
Free
Battle: AI Agents Compete, Best Code Wins
Example session with this skill installed
/battle This project is Battle, a tool that runs a tournament of AI agents. Find the most serious real problems in its code, in correctness, reliability, security and design, and fix them. One known problem to fix: stopping Battle with Ctrl-C or kill leaves its running agents alive, and they keep using the plan's allowance. Find the others yourself. Fix real problems you can point to in the code. Do not add new features, commands or flags. Keep it Python standard library only, and keep every existing command and flag working. Keep all existing tests valid, and add a test for each problem you fix. Match the existing style, which uses almost no comments.
- Read your context and instructions
- Compiled the battle
Summary
A real battle where Battle fixed its own code. 8 fighters worked in 2 groups with different directions, attacked each other's work over 3 rounds, and the group winners met in a 2-round final. 5 specialist judges scored the final. The champion, A4, won 40 to 35, and its work was applied: 18 files changed, 0 deleted.
This run used the full tournament. The default /battle is quicker: 3 fighters, 1 judge, then the winner makes the judge's fixes.
Champion: A4
A4 has the highest total (40 to 35) and no flaw that makes it unsafe to ship. Its per-agent tether kills agents on Ctrl-C, kill and kill -9, with tests for the hard-kill case. The attacks on kill -9, undo and fsync are stale against its final code, and the two that still hold are minor. B2 is strong but larger, and its guard fails open when state.json is missing.
Final scores
| Category | A4 | B2 |
|---|---|---|
| Code quality | 8 | 7 |
| Security | 8 | 7 |
| Vulnerabilities | 8 | 7 |
| Design | 8 | 7 |
| Architecture | 8 | 7 |
| Total | 40 | 35 |
Group stage
| Group | Direction | Scores | Winner |
|---|---|---|---|
| A | In-process cooperative shutdown | A1 36 · A2 38 · A3 36 · A4 41 | A4 |
| B | Crash-only recovery with a durable process ledger | B1 35 · B2 38 · B3 34 · B4 34 | B2 |
Applied to the project
README.md, battle/agents.py, battle/cli.py, battle/fight.py, battle/guard.py,
battle/host.py, battle/report.py, battle/store.py, battle/tether.py,
battle/workspace.py, skill/SKILL.md, tests/test_agents.py, tests/test_cli.py,
tests/test_fight.py, tests/test_guard.py, tests/test_host.py,
tests/test_store.py, tests/test_workspace.py
Next steps
- Review the champion's diff before you ship it
- Run your tests: judges read the code but don't run it
- Not happy?
battle undorestores the project from a backup taken just before the apply
Connects securely to your tools. The creator never sees your data.
About this skill
Battle gives one coding task to several AI agents at once and keeps only the best result.
How it works
- 3 fighters build the task at the same time, each from a different angle: simplest, hardest to break, or cleanest to maintain.
- A judge reads every diff, scores each entry on code quality, security, vulnerabilities, design and architecture, picks a winner and lists what still needs fixing.
- The winner makes those fixes.
- Only the winning work is applied to your project. Everything else is thrown away, and
battle undoputs your project back.
About 5 agent runs per battle. Need more? --size tournament runs 2 groups that attack each other's work over several rounds, then a final judged by 5 specialist judges.
Why use it
- You get the best of three attempts, not the first one.
- A judge checks the work and fixes are made before anything reaches your code.
- It's safe by default: fighters work on copies, secrets like
.envand*.keyare never copied, a guard keeps each agent inside its own folder, and judges can't change files. - You can stop it at any time. If you hit your plan's usage limit, finished work is saved and
battle resumecontinues later.
Usage
/battle add rate limiting to the login route
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.
- Needs Claude Code: it runs Claude subagents and hooks, so other agents can't drive it.
- The winning entry is applied to your project automatically. Use --no-apply to review it first, then battle apply.
- Judges read the code but don't run it, so run your own tests on the result.
- Every agent run uses your Claude plan. --size tournament uses about 6 times more than the default and takes much longer.
- Web access is on by default. Use --no-web for code that must stay private.
- --allow-bash lets fighters run shell commands, and those commands are not sandboxed. It's off by default.
- The Claude Code chat must stay open until the battle ends.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 13 days ago
- Free with an Agensi account
- Software
- Claude Code
Python 3.10+
Permissions
File Scopes
Shell runs the bundled battle engine. Fighters edit copies of the project, and only the winning entry is written back, with a backup for undo. Network access lets agents search the web and read docs; turn it off with --no-web. Install links the skill and 3 agent files into ~/.claude. Every agent run uses the buyer's Claude plan.