battle — Claude Code command: what it does, how to install
battle puts two sites head to head and produces one shareable HTML card with scores across eight dimensions, bar-by-bar, plus a verdict line.
MIT ★ 5,183 updated 2026-10-23
/plugin marketplace add Manavarya09/design-extract
/plugin install designlang@designlangWhat battle does
Under the hood it calls npx designlang battle <urlA> <urlB>. Both sites are pulled at once, roughly 30 seconds, and three files land in ./design-extract-output/: the shareable *.battle.html card, a *.battle.md summary, and *.battle.json holding the scores.
The agent then opens the markdown, prints the verdict (“X wins” or “tie”) with the per-dimension table, flags the dimensions where the two sites diverge most, and offers to open the HTML card. Fewer than two links and nothing runs: it asks you for both sites first.
The result is a card built for posting rather than a plain table. Run /grade <url> --badge next to it so each site keeps a badge linking back.
What it helps with
- compare two sites across eight dimensions
- produce a shareable HTML battle card
- get a verdict line of “X wins” or a tie
- spot the dimensions with the widest gap
- export the scores as JSON
Example prompts for the agent
- Run
/battle <urlA> <urlB>and tell me where the gap is widest. - Build a battle card for these two sites and offer to open the HTML.
- Run
/battle <urlA> <urlB>and print the dimension table.
How to install battle
1Plugin marketplace
/plugin marketplace add Manavarya09/design-extract/plugin install designlang@designlang2Manually: put the files in place
.claude/commands/battle.mdCall it with /battle. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/battle.mdCall it with /prompts:battle. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/battle.prompt.mdManually: put the files in place
.gemini/commands/battle.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about battle
How do I install battle in Claude Code?
Add the marketplace first: /plugin marketplace add Manavarya09/design-extract. Then install the plugin: /plugin install designlang@designlang. Its file sits at .claude/commands/battle.md.
What does battle do?
It runs npx designlang battle <urlA> <urlB>, extracts both sites in parallel, and writes a card, a markdown summary and JSON scores across eight dimensions into ./design-extract-output/.
What does the command need to run?
Two site addresses. With no arguments or fewer than two links it asks you for both sites.
Source text
battle.md · MIT
---
description: Head-to-head graded battle card between two sites — eight dimensions, bar-by-bar, verdict line.
argument-hint: <urlA> <urlB>
---
Pit two sites against each other and emit a single shareable HTML battle card.
```bash
npx designlang battle $ARGUMENTS
```
If `$ARGUMENTS` is empty or contains fewer than two URLs, ask the user for both sites.
Both sites are extracted in parallel (~30s total). Outputs land in `./design-extract-output/`:
- `<a>-vs-<b>.battle.html` — the shareable card
- `<a>-vs-<b>.battle.md` — markdown summary
- `<a>-vs-<b>.battle.json` — structured scores
After the run:
1. Read the `*.battle.md` file
2. Show the user the verdict line ("X wins" / "tie") and the per-dimension table
3. Highlight the dimensions where the gap is widest
4. Offer to open the HTML card
This is pure viral content — battles are designed to be tweeted. Pair with `/grade <url> --badge` so each side has a permanent badge to link back to.
© Manavarya Singh · MIT · Manavarya09/design-extract