npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude-arena

v1.5.2

Published

Evaluate and optimize system prompt effectiveness - find the best way to express your system prompts

Readme

claude-arena

npm version License: MIT

Find the most effective way to write your CLAUDE.md system prompts.

Give claude-arena a system prompt, and it will test 5 different ways of expressing it—then tell you which one works best.

How It Works

Your System Prompt
       ↓
┌──────────────────────────────────────┐
│  1. DESIGN PHASE (Opus)              │
│     • Generates a revealing task     │
│     • Creates 5 prompt variations    │
└──────────────────────────────────────┘
       ↓
┌──────────────────────────────────────┐
│  2. TEST PHASE (Haiku × 5 parallel)  │
│     • Runs task with each variation  │
│     • Captures all outputs           │
└──────────────────────────────────────┘
       ↓
┌──────────────────────────────────────┐
│  3. EVALUATION PHASE (Opus)          │
│     • Scores each variation          │
│     • Recommends the winner          │
│     • Outputs optimized prompt       │
└──────────────────────────────────────┘

The 5 Variation Strategies

| Strategy | Approach | |----------|----------| | PERSONA | Role-based identity framing. Make the AI embody a specific expert. | | EXEMPLAR | Show, don't tell. Lead with concrete before/after code examples. | | CONSTRAINT | Hard rules with tripwires. Use MUST/NEVER/ALWAYS with violation callouts. | | SOCRATIC | Why-first philosophy. Explain reasoning before the rule. | | CHECKLIST | Gated process with verification steps before each action. |

Installation

Quick start (no install)

bunx claude-arena "code should follow Python's Zen principles"

Global install

bun add -g claude-arena
# or
npm install -g claude-arena

From source

git clone https://github.com/johnlindquist/claude-arena
cd claude-arena
bun install
bun link  # Makes 'claude-arena' available globally

Usage

# Pass a system prompt directly
claude-arena "code should follow Python's Zen principles"

# Or pass a markdown file
claude-arena ./my-system-prompt.md

# Test your own CLAUDE.md configuration
claude-arena --user

# Test your CLAUDE.md with additional instructions
claude-arena --user "also enforce strict TypeScript"

# Provide your own task instead of AI-generated one
claude-arena --task "build a REST API with auth" "use TypeScript strictly"

# Change the model used for test runs (default: haiku)
claude-arena --test-model sonnet "complex prompt"

# Change the judge model (default: opus)
claude-arena --model sonnet "your prompt"

# Test fewer variations
claude-arena --variations 3 "your prompt"

Running from source

# Run the tool directly
bun run start "your prompt"

# Or use the source file
bun run src/index.ts "your prompt"

Output

Each run creates a timestamped directory in your system's temp folder with a complete paper trail:

/tmp/claude-arena-2024-01-15T10-30/
├── session-summary.md          # Overview with links to all files
├── effective-prompt.md         # The resolved system prompt being tested
├── task.md                     # The generated stress-test task
├── design-conversation.md      # Full design phase conversation
├── evaluation-conversation.md  # Full evaluation phase conversation
├── variation-0.md              # BASELINE (original prompt)
├── variation-1.md              # PERSONA variation
├── variation-2.md              # EXEMPLAR variation
├── variation-3.md              # CONSTRAINT variation
├── variation-4.md              # SOCRATIC variation
├── variation-5.md              # CHECKLIST variation
├── run-0/                      # Baseline output
│   └── output.md               # Full output transcript
├── run-1/                      # Variation 1 output
│   └── output.md
├── run-2/
│   └── output.md
└── ...

The final evaluation includes:

  • Scores for each variation (0-12 scale: Adherence + Integration + Quality + Consistency)
  • Winner with explanation
  • Optimized system prompt text ready to paste into your CLAUDE.md

Examples

# Design principles
claude-arena "Beautiful is better than ugly. Simple is better than complex."

# Code quality rules
claude-arena "avoid code smells: feature envy, shotgun surgery, primitive obsession"

# TDD workflow
claude-arena "always write tests before implementation, follow red-green-refactor"

# TypeScript strictness
claude-arena "never use 'any' type, always define explicit return types"

# From a file
claude-arena ./goals/zen-principles.md

Development

# Install dependencies
bun install

# Run tests
bun test

# Type check
bun run typecheck

# Lint and format
bun run check

Requirements

License

MIT