From magician
Guides baseline-first performance profiling for web apps, APIs, Python, and Go using wrk, lighthouse, cProfile, pprof to identify bottlenecks and apply targeted fixes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/magician:accelerateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Profile and optimize performance systematically. No optimization without measurement.
Profile and optimize performance systematically. No optimization without measurement.
Establish a baseline measurement BEFORE making any changes. Optimization without a baseline is guesswork.Ask both questions in one message:
"Before I start profiling, two quick questions:
- What specifically is slow? (page load, API response, query, computation — be as specific as possible)
- What's the acceptable performance target? (e.g., 'under 200ms', 'p99 < 500ms')"
End your turn. Wait for both answers before proceeding to Phase 2. Do not run any benchmarks until you have a defined target.
Measure current performance using the appropriate tool:
API:
wrk -t4 -c100 -d30s http://localhost:8080/api/endpoint
# or: hey -n 1000 -c 50 http://localhost:8080/api/endpoint
Web (browser):
npx lighthouse http://localhost:3000 --output json --output-path baseline.json
Python:
import cProfile, pstats
profiler = cProfile.Profile()
profiler.enable()
# ... run the slow code ...
profiler.disable()
stats = pstats.Stats(profiler).sort_stats('cumulative')
stats.print_stats(20)
Go:
import _ "net/http/pprof"
// Then: go tool pprof http://localhost:6060/debug/pprof/profile
Record baseline numbers.
Use the profiler to identify the actual bottleneck. The bottleneck is where the most time is spent — not the most obvious place.
Fix ONLY the identified bottleneck. Common fixes:
Run the same benchmark as Phase 2. Compare: baseline vs. optimized. If target not met: return to Phase 3.
"Accelerate complete. Baseline: . Optimized: . Improvement: %. Target <met/not met>."
npx claudepluginhub alexander-tyagunov/magician --plugin magicianProvides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.