One file.
Nine performance skills.

A CLAUDE.md template that turns Claude Code into a strict performance engineering expert. Drop it in your project root. No install, no plugin, no config.

claude — project root

$ cp performance-deity/CLAUDE.md ./CLAUDE.md

✔ Done. Open Claude Code in your project.

user: optimize this function

→ Running baseline benchmark... P95: 450ms

→ Identified O(n²) nested loop. Rewriting to HashMap lookup...

→ Benchmarking optimized code... P95: 12ms

✔ Baseline: 450ms → Optimized: 12ms (-97.3%)

How It Works

Claude Code reads CLAUDE.md automatically at session start. The file contains strict, phased instructions that override Claude's default behavior for performance-related tasks.

1

Copy the file

cp CLAUDE.md /your/project/CLAUDE.md

2

Open Claude Code

It reads CLAUDE.md on every session start. No flags, no setup.

3

Use natural language

Say "optimize this", "memory leak", or "slow query" — the right skill activates automatically.

Nine Performance Skills

Each skill is a phased methodology with mandatory benchmarking, proof requirements, and prohibited patterns.

Hot-Path Optimizer

Benchmarks baseline, analyzes Big-O, rewrites the algorithm, and proves improvement with a before/after table. Will not present a change without numbers.

🧠

Leak Hunter

Instruments memory with tracemalloc or process.memoryUsage(), proves the leak grows across iterations, then fixes the uncollected reference.

🧵

Race Condition Killer

Fires 1,000–10,000 concurrent requests at the target function, proves it fails, then applies the minimal synchronization primitive needed.

💾

N+1 Slayer

Runs EXPLAIN ANALYZE, identifies missing indexes, and rewrites ORM loops into batch joins or eager loads with exact CREATE INDEX statements.

💥

Chaos Engineer

Bombards code with 1GB payloads, null values, malformed JSON, and simulated network failures. Documents every crash, then hardens the boundary.

🌐

Network Squeezer

Profiles payload byte size, enforces Brotli compression and HTTP cache headers, and migrates heavy REST endpoints to GraphQL or protobuf when over 1MB.

🏗️

CI/CD Accelerator

Fixes Docker layer ordering, enables Webpack filesystem caching, and adds GitHub Actions dependency caching keyed on lockfile hashes.

👁️

Telemetry

Wraps critical paths in OpenTelemetry or Sentry spans with execution time, query tags, and payload sizes. Always includes a concrete Datadog or Prometheus alert rule.

🎨

Frame-Rate Enforcer

Audits React re-renders, migrates animations to GPU-composited transform, and virtualizes lists over 50 items. Target: 60 FPS.

Installation

Claude Code

cp CLAUDE.md /your/project/CLAUDE.md

Claude Code reads it automatically.

Cursor / Windsurf

cp CLAUDE.md /your/project/.cursorrules

Rename to .cursorrules for Cursor.

Pre-commit Hook

cp hooks/pre-commit .git/hooks/pre-commit

Blocks commits with unresolved TODO: optimize markers.

Roadmap

Where this project is headed.

Phase 1 — Benchmarking Tools

Cross-platform benchmark runners for Python, Node.js, PowerShell, and Bash.

Phase 2 — CLAUDE.md Consolidation

All nine skills compiled into a single, deployable CLAUDE.md with global rules and prohibited patterns.

Phase 3 — GitHub Actions Gate

A reusable workflow that runs the benchmark suite on pull requests and fails the build if P95 regresses beyond a configurable threshold.

Phase 4 — Cursor & Windsurf Variants

Adapted rule files for .cursorrules and Windsurf's memory system, maintained in sync with the canonical CLAUDE.md.