Skip to main content
command CX Codex

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

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add Manavarya09/design-extract
/plugin install designlang@designlang
Open on GitHub

What 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@designlang

2Manually: put the files in place

.claude/commands/battle.md

Call it with /battle. For all projects use ~/.claude/commands/

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

Similar slash commands

All slash commands for Design →

From the same set16

The whole set →
extract-design The extract-design skill analyzes a website URL and generates files describing its design system. Use it to bring a site's colors, typography, and component patterns into a project. CX Codex +1 3,500installs designlang The designlang MCP server for Claude Code reads a site’s design system for an AI editor. It can also compare a UI with brand tokens and rate how generic a page looks. CX Codex +1 ★ 5,183repo stars grade grade audits design systems from a target URL, producing an HTML report card, scores, and an SVG badge. Useful when evaluating typography, color palettes, and rhythm. CX Codex +1 ★ 5,183repo stars verify verify rebuilds a page from design tokens, compares the render with the live site, and reports a fidelity score. Use it to check an extracted design system. CX Codex +1 ★ 5,183repo stars remix remix reworks an already extracted page in a different visual vocabulary: brutalist, swiss, art-deco, cyberpunk, soft-ui or editorial. The layout keeps its shape. CX Codex +1 ★ 5,183repo stars studio studio starts a local token editor over your latest design extraction to preview UI components, inspect motion, and export themes. CX Codex +1 ★ 5,183repo stars gallery Turns fidelity reports into a static gallery with score cards and a page for each clone. Use it to publish design comparison results. CX Codex +1 ★ 5,183repo stars pack pack runs designlang once and drops every output — tokens, components, Storybook, prompts — into one design-system folder you can zip. CX Codex +1 ★ 5,183repo stars

More in the catalog

Project sponsors

Companies that keep this analytics open