brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Autonomous performance optimization: research, PoC, benchmark, implement, review, PR
Claude Code
$ npx -y skills add raullenchai/Rapid-MLX --skill perfup --agent claude-code
Codex
$ npx skills add raullenchai/Rapid-MLX --skill perfup -a codex -y
Cursor
$ npx skills add raullenchai/Rapid-MLX --skill perfup -a cursor -y
Gemini CLI
$ npx skills add raullenchai/Rapid-MLX --skill perfup -a gemini-cli -y
GitHub Copilot
$ npx skills add raullenchai/Rapid-MLX --skill perfup -a github-copilot -y
OpenCode
$ npx skills add raullenchai/Rapid-MLX --skill perfup -a opencode -y
Windsurf
$ npx skills add raullenchai/Rapid-MLX --skill perfup -a windsurf -y
name: perfup description: "Autonomous performance optimization: research, PoC, benchmark, implement, review, PR" disable-model-invocation: true allowed-tools: - Bash - Read - Write - Edit - Glob - Grep - Task - WebSearch - WebFetch - Skill - TaskCreate - TaskUpdate - TaskList - TaskGet - EnterPlanMode - ExitPlanMode - AskUserQuestion
Inspired by [karpathy/autoresearch](https://github.com/karpathy/autoresearch): you are an autonomous performance researcher for vllm-mlx. You propose optimizations, benchmark them, keep what works, discard what doesn't, and ship a production PR.
Read existing state, then discover new opportunities.
1. Read `memory/knowledge/perf_optimization_queue.md` and `memory/MEMORY.md` 2. If `$ARGUMENTS` is provided (e.g. `/perfup decode`), focus on that area. Otherwise broad search. 3. Scan codebase for optimization opportunities:
4. WebSearch for latest MLX inference optimizations if needed 5. Produce candidate list, each with: problem, solution, estimated impact, effort, coverage, risk
Score and rank. Persist to memory.
1. Score each candidate (1-5 per axis):
2. Sort by composite = Impact x Ease x Coverage x Safety 3. Update `memory/knowledge/perf_optimization_queue.md`:
4. Present top 3 to user. Wait for confirmation before proceeding.
**This is the core loop. Inspired by autoresearch: try, measure, keep or discard. Repeat.**
SETUP:
git checkout -b perfup/<optimization-name>
Record baseline metrics (run benchmark on current code)
Initialize reports/perfup-results.tsv if not exists
LOOP:
1. Implement minimal PoC change in code
2. git commit -m "perfup: <brief description>"
3. Run benchmark: python3.12 scripts/benchmark_engines.py (or custom)
Redirect output: > reports/perfup-run.log 2>&1
4. Extract metrics from log (TTFT, decode tok/s, etc.)
5. Record to reports/perfup-results.tsv:
commit<TAB>decode_tps<TAB>ttft_ms<TAB>status<TAB>description
6. DECISION:
- If metric improved: KEEP. Log "keep" status. This is the new baseline.
- If metric same or worse: DISCARD. Log "discard". git reset --hard to previous keep.
- If crashed: Log "crash". Try to fix (1-2 attempts). If unfixable, discard and move on.
7. If improvement confirmed and significant (>5%): break loop → Phase 4
8. If no candidate works after trying top 3: inform user and stop.**Rules for the loop:**
PoC validated. Now build it properly.
1. Clean up or rewrite the PoC code for production quality 2. Enter plan mode — design clean architecture, tests, docs 3. Implement:
4. Run full test suite: `python3.12 -m pytest tests/ -v` 5. Run benchmark again — confirm improvement matches PoC
Independent review via Codex.
1. Invoke: `/review-loop <description of optimization>` 2. Address all findings (P0 = blocker, P1 = should fix, P2 = nice to have) 3. After review passes, run final benchmarks on all relevant models 4. Update README/docs with new benchmark numbers if applicable
1. Ensure all changes are on `perfup/<name>` or `feat/<name>` branch 2. Push to `raullenchai` remote (NEVER origin, NEVER main directly) 3. Create PR:
gh pr create --repo raullenchai/vllm-mlx --base main
PR body must include:
4. Update memory:
5. Present PR URL to user
---
commit decode_tps ttft_ms status description a1b2c3d 68.4 245 baseline current main branch b2c3d4e 72.1 240 keep reduce redundant mx.eval in decode loop c3d4e5f 67.9 248 discard speculative prefill chunking d4e5f6g 0.0 0 crash fused MoE kernel (import error)
If `$ARGUMENTS` provided:
1. **B
Rapid-MLX is an open-source (Apache 2.0) OpenAI- and Anthropic-compatible LLM inference server for Apple Silicon, built on MLX, focused on reliable tool calling for coding agents. Up to 4× faster than Apple's MLX (mlx-lm) on the same weights.
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.