agentleFS
2389-research2389-research/speed-run/CLAUDE.md

speed-run

CLAUDE.md1 starsChanged 4 months agoMITView on GitHub

Speed-run offloads first-pass code generation to Cerebras (~2000 tokens/sec), then Claude handles architecture decisions and surgical fixes. Same quality code, ~60% fewer Claude tokens, 20x faster generation per file. Most code is pattern-following, not reasoning. Cerebras handles the patterns; Claude handles the thinking. Get a free key at https://cloud.cerebras.ai Set it using either method: Option A (recommended): Add to ~/.claude/settings.json: Option B: Export in shell profile (~/.zshrc or ~/.bashrc): Restart Claude Code after setting the key. The plugin checks on…

  • Reads credentials
  • Installs packages

The file

We split this CLAUDE.md into the rules it gives an agent

12 rules. About 0 are common, 6 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Option A (recommended): Add to ~/.claude/settings.json:

    line 42
  2. Distinctive:

    Write a contract prompt (DATA CONTRACT, API CONTRACT, ALGORITHM, RULES)

    line 83
  3. Very specific:

    Call mcp__speed-run__generate_and_write_files with the prompt

    line 84
  4. Distinctive:

    If tests fail, Claude fixes surgically (don't regenerate the whole thing)

    line 86
  5. Distinctive:

    Write a shared design document

    line 99
  6. Distinctive:

    Write a plan document defining each approach

    line 114
  7. Distinctive:

    Best for: When you genuinely don't know which approach is right and want to let the code speak.

    line 120
  8. Very specific:

    If generated code contains literal triple backticks, use TRIPLE_BACKTICK as a placeholder - the server auto-replaces after extraction.

    line 157
  9. Very specific:

    Use test-kitchen when first-pass quality matters most.

    line 171
  10. Distinctive:

    Don't re-prompt Cerebras when tests fail.

    line 185
  11. Very specific:

    Don't use speed-run for tasks that require actual reasoning about architecture or tradeoffs.

    line 191
  12. Very specific:

    If tools aren't working, you probably forgot the API key.

    line 193

≈ “Common” is an estimate: at least 1 in 5 of the 28,029 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Speed-Run Plugin

Overview

Speed-run offloads first-pass code generation to Cerebras (~2000 tokens/sec), then Claude handles architecture decisions and surgical fixes. Same quality code, ~60% fewer Claude tokens, 20x faster generation per file.

Most code is pattern-following, not reasoning. Cerebras handles the patterns; Claude handles the thinking.

Architecture

┌─────────────────────────────────────────────┐
│  speed-run (orchestrator skill)             │
│  Checks API key → routes to sub-skill       │
├──────────┬──────────┬───────────────────────┤
│  turbo   │ showdown │  any-percent          │
│  1 task  │ N runners│  N approaches         │
│  direct  │ same spec│  different specs      │
└────┬─────┴────┬─────┴────┬──────────────────┘
     │          │          │
     v          v          v
┌─────────────────────────────────────────────┐
│  MCP Server (@2389/speed-run-mcp)           │
│  ┌───────────┬──────────────┬─────────────┐ │
│  │ generate  │ generate_and │ check_status│ │
│  │           │ _write_files │             │ │
│  └─────┬─────┴──────┬───────┴─────────────┘ │
│        │            │                        │
│        v            v                        │
│  Cerebras API (gpt-oss-120b)                  │
└─────────────────────────────────────────────┘

Prerequisites

CEREBRAS_API_KEY

Get a free key at https://cloud.cerebras.ai

Set it using either method:

Option A (recommended): Add to ~/.claude/settings.json:

{
  "env": {
    "CEREBRAS_API_KEY": "your-key-here"
  }
}

Option B: Export in shell profile (~/.zshrc or ~/.bashrc):

export CEREBRAS_API_KEY="your-key-here"

Restart Claude Code after setting the key. The plugin checks on session start via a hook and warns if the key is missing.

MCP Server

The MCP server auto-registers via .mcp.json when the plugin is installed. If mcp__speed-run__* tools aren't available, build manually:

cd ./mcp && npm install && npm run build

Skills

Routing

SkillTriggerWhat it does
speed-run"speed-run", "turbo", "fast codegen", "cerebras"Orchestrator. Checks API key, presents options.
speed-run:turboSingle task, straightforward codegenDirect generation. One contract prompt, one output.
speed-run:showdownMultiple implementations of the same specParallel competition. N runners implement the same design, judge picks the winner.
speed-run:any-percentMultiple architectural approachesParallel exploration. N variants try different approaches, judge evaluates tradeoffs.
speed-run:judgeCalled by showdown/any-percentScoring framework. 5 criteria, 25 points max, hard gates on critical flaws.

Turbo (Direct Codegen)

The simplest path. Use when you have one task and want fast generation.

Flow:

  1. Write a contract prompt (DATA CONTRACT, API CONTRACT, ALGORITHM, RULES)
  2. Call mcp__speed-run__generate_and_write_files with the prompt
  3. Run tests
  4. If tests fail, Claude fixes surgically (don't regenerate the whole thing)
  5. Re-test until green

Best for: Algorithmic code, boilerplate, data transformations, multi-file scaffolding.

Not great for: Novel architecture decisions, complex business logic, anything requiring deep reasoning about tradeoffs.

Showdown (Parallel Competition)

Same design doc, multiple runners implement it independently. The judge scores all variants and picks a winner.

Flow:

  1. Assess complexity → decide runner count (2-5)
  2. Write a shared design document
  3. Dispatch all runners in a single message (parallel agents)
  4. Each runner: hosted LLM generates → tests → Claude fixes
  5. Judge scores all variants (fitness, complexity, readability, robustness, maintainability)
  6. Winner gets promoted, losers get cleaned up

Critical: Dispatch all runners in a single message. Sequential dispatch defeats the purpose.

Any-Percent (Parallel Exploration)

Different architectural approaches to the same problem. Unlike showdown, each variant uses a different strategy.

Flow:

  1. Gather context about the problem
  2. Identify 2-5 distinct approaches (e.g., "event-driven vs polling vs hybrid")
  3. Write a plan document defining each approach
  4. Dispatch all variants in a single message
  5. Each variant: hosted LLM generates → tests → Claude fixes
  6. Judge evaluates tradeoffs across approaches
  7. Winner gets promoted

Best for: When you genuinely don't know which approach is right and want to let the code speak.

Judge (Scoring Framework)

Evaluates implementations across 5 criteria, each scored 1-5:

CriterionWhat it measures
Fitness for PurposeDoes it actually do what was asked? (8 checkboxes)
Justified ComplexityIs the complexity earned? (line count analysis)
ReadabilityCan someone else understand it? (violation counting)
Robustness & ScaleWill it hold up? (12-item checklist)
MaintainabilityCan it evolve? (6-item checklist)

Hard gates: Fitness delta >= 2 between variants, or any score of 1, triggers automatic disqualification.

MCP tools

ToolPurpose
mcp__speed-run__generateSend a prompt to Cerebras, get raw text back
mcp__speed-run__generate_and_write_filesSend a prompt, parse file blocks from response, write to disk
mcp__speed-run__check_statusVerify API key is set and Cerebras is reachable

File output format

The MCP server parses generated code from XML-style tags:

<FILE path="src/main.py">
def hello():
    print("hello world")
</FILE>

Two legacy fallback formats (### FILE: path with fenced blocks, or raw content) are supported but not recommended.

If generated code contains literal triple backticks, use TRIPLE_BACKTICK as a placeholder - the server auto-replaces after extraction.

Speed-run vs test kitchen

AspectTest KitchenSpeed-Run
Code generationClaude directHosted LLM (Cerebras)
API key requiredNoYes (CEREBRAS_API_KEY)
Token costStandard Claude pricing~60% savings on generation
Generation speed~10s per file~0.5s per file
First-pass quality~100% correct80-95% (Claude fixes the rest)
Fix strategyRarely neededSurgical fixes by Claude
Best forAny taskAlgorithmic code, boilerplate, multi-variant

Use test-kitchen when first-pass quality matters most. Use speed-run when you want speed and token savings and don't mind a fix cycle.

Skill dependencies

DependencyUsed ByPurpose
speed-run:judgeshowdown, any-percentScoring framework (bundled)
superpowers:dispatching-parallel-agentsshowdown, any-percentParallel dispatch
superpowers:using-git-worktreesshowdown, any-percentIsolated workspaces
superpowers:verification-before-completionallVerify before claiming done
fresh-eyes-review:fresh-eyes-reviewshowdown, any-percentQuality gate before comparison

Common mistakes

Don't re-prompt Cerebras when tests fail. Claude should read the error and fix it surgically. Cerebras already did the structural work -- regenerating from scratch wastes the effort.

Showdown and any-percent must dispatch all runners in a single message. Running them one at a time defeats the whole point of parallelism.

Turbo needs structured contract prompts (DATA CONTRACT, API CONTRACT, etc). If you send it a vague prompt, you get vague code back.

Don't use speed-run for tasks that require actual reasoning about architecture or tradeoffs. Cerebras is fast at following patterns, not at thinking. Use Claude directly for those.

If tools aren't working, you probably forgot the API key. The session-start hook warns on launch, but mcp__speed-run__check_status will confirm.

Configuration

VariableDefaultPurpose
CEREBRAS_API_KEY(required)API key from https://cloud.cerebras.ai
CEREBRAS_MODELgpt-oss-120bModel to use
CEREBRAS_URLhttps://api.cerebras.ai/v1API endpoint
GENERATION_TIMEOUT120Timeout in seconds

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.