perf-profile
Skill12 starsChanged 4 months agoMITView on GitHub
Performance profiling — measures code execution time, DB call time, and identifies bottlenecks at both the application and database layer. Use when asked to "profile performance", "measure execution time", "find bottlenecks", "check response times", or "why is this slow".
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 18 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Ask the user (or infer from context): what are we profiling?
- Very specific: line 101
Add import _ "net/http/pprof" to enable the endpoint
- Distinctive: line 170
Ask: "Want me to implement fixes for the top bottlenecks, or set up profiling instrumentation so you can measure before/after?"
“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/perf-profile
Profile application performance: code execution time, DB call time, and bottleneck identification at both the application and database layer.
Step 1: Identify the target
Ask the user (or infer from context): what are we profiling?
- A specific endpoint / route
- A background job / worker
- A specific function or module
- The whole application (general audit)
Step 2: DB call time profiling
PostgreSQL
# Enable timing in psql
psql "$DATABASE_URL" -c "\timing on"
# Check pg_stat_statements for query timing (if available)
psql "$DATABASE_URL" -c "
SELECT
LEFT(query, 80) AS query,
calls,
ROUND(mean_exec_time::numeric, 2) AS mean_ms,
ROUND(total_exec_time::numeric, 2) AS total_ms,
ROUND((total_exec_time / SUM(total_exec_time) OVER ()) * 100, 1) AS pct_total
FROM pg_stat_statements
ORDER BY mean_exec_time DESC
LIMIT 20;
" 2>/dev/null || echo "pg_stat_statements not available — enable with: CREATE EXTENSION pg_stat_statements;"MySQL / MariaDB
mysql -e "
SELECT
LEFT(DIGEST_TEXT, 80) AS query,
COUNT_STAR AS calls,
ROUND(AVG_TIMER_WAIT/1e9, 2) AS mean_ms,
ROUND(SUM_TIMER_WAIT/1e9, 2) AS total_ms
FROM performance_schema.events_statements_summary_by_digest
ORDER BY AVG_TIMER_WAIT DESC
LIMIT 20;
" 2>/dev/null || echo "MySQL performance_schema unavailable"Report: table of top 20 queries by mean execution time, with call count and % of total DB time.
Step 3: Application-level profiling
Detect the runtime and suggest the right profiler:
# Detect language/framework
[ -f package.json ] && echo "RUNTIME=node"
[ -f Gemfile ] && echo "RUNTIME=ruby"
[ -f requirements.txt ] || [ -f pyproject.toml ] && echo "RUNTIME=python"
[ -f go.mod ] && echo "RUNTIME=go"
[ -f pom.xml ] || [ -f build.gradle ] && echo "RUNTIME=java"Node.js:
- Built-in:
node --prof app.js+node --prof-process isolate-*.log - For web: add
--inspectand use Chrome DevTools profiler - Suggest:
clinic.js(npx clinic doctor -- node app.js) for flame graphs
Ruby:
- Suggest:
stackproforrack-mini-profilerfor Rails - For a specific method: wrap with
Benchmark.measure { ... }
Python:
- Built-in:
python -m cProfile -s cumulative script.py - For web:
py-spy top --pid <pid>for live profiling - Suggest:
snakevizfor visualization
Go:
- Built-in:
go tool pprof http://localhost:6060/debug/pprof/profile - Add
import _ "net/http/pprof"to enable the endpoint
Scan for existing timing instrumentation:
grep -rn "benchmark\|timing\|elapsed\|duration\|stopwatch\|time\.now\|Time\.now\|perf_hook\|performance\.now" \
--include="*.rb" --include="*.py" --include="*.js" --include="*.ts" --include="*.go" \
. 2>/dev/null | head -20Step 4: Code-level bottleneck scan
Scan for common performance anti-patterns in the codebase:
Synchronous blocking in async contexts:
grep -rn "fs\.readFileSync\|execSync\|spawnSync\|sleep\|time\.Sleep" \
--include="*.js" --include="*.ts" --include="*.go" . 2>/dev/null | head -10Missing pagination (unbounded queries):
grep -rn "\.all\b\|find_all\|SELECT \*\b" \
--include="*.rb" --include="*.py" --include="*.js" --include="*.ts" . 2>/dev/null | head -10Repeated expensive calls in loops:
grep -rn "each\|forEach\|for " \
--include="*.rb" --include="*.py" --include="*.js" --include="*.ts" . 2>/dev/null | head -20For each flagged file, read the context and assess impact.
Step 5: Response time targets
Evaluate findings against these thresholds:
| Metric | Good | Acceptable | Needs Fix |
| DB query mean time | <10ms | <100ms | >100ms |
| DB calls per request | ≤3 | ≤10 | >10 |
| Endpoint response time | <100ms | <500ms | >500ms |
| Background job duration | <1s | <30s | >30s |
Step 6: Bottleneck report
## Performance Profile Report
### DB Layer
- Slowest query: <query> — Xms mean (Y calls/min)
- Total DB time as % of request: Z%
- Queries over 100ms: N
### Application Layer
- Blocking calls found: X
- Unbounded queries (no LIMIT): Y
- Loops with expensive operations: Z
### Top 3 Bottlenecks (by estimated impact)
1. <bottleneck> — estimated Xms saved per request
2. <bottleneck> — estimated Yms saved per request
3. <bottleneck> — estimated Zms saved per request
### Recommended profiling tools for this stack
- <tool 1>
- <tool 2>Ask: "Want me to implement fixes for the top bottlenecks, or set up profiling instrumentation so you can measure before/after?"
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- Donchitos/Claude-Code-Game-Studios★ 27ksame name
- facontidavide/PlotJuggler★ 6.3ksame name
- pixel-cellar/Claude-Code-Game-Studios★ 324same name
- striderZA/OpenCodeGameStudios★ 93same name
- tranhieutt/software_development_department★ 71same name
- cenconq25/claude-code-app-studio★ 40same name
- CoralGame/Claude-Code-Game-Studios★ 19same name
- dawn840705/codex-code-studios★ 17same name
- CodePhobiia/claude-roblox-game-studio★ 9same name
- lilangMax/ClaudeCodeGameStudios★ 8same name
9 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use soak-test, team-live-ops and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
lilangMaxSkillsoak-test
Generate a soak test protocol for extended play sessions. Defines what to observe, measure, and log during long play sessions to surface slow leaks, fatigue effects, and edge cases that only appear after sustained play. Primarily used in Polish and Release phases.
Also in 9 projects that use this
lilangMaxSkillteam-live-ops
Orchestrate the live-ops team for post-launch content planning: coordinates live-ops-designer, economy-designer, analytics-engineer, community-manager, writer, and narrative-director to design and plan a season, event, or live content update.
Also in 9 projects that use this
- +10 more from lilangMax
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- a11ySkill
- articleSkill
- basic-reviewSkill
- cache-strategySkill
- clean-codeSkill
- cli-for-agentSkill
- content-writerSkill
- daily-qaSkill
- dbmap-auto-offSkill
- dbmapSkill
- db-optimizeSkill
- debugSkill
- defenseSkill
- diff-walkthroughSkill
- evalSkill
- executing-plansSkill
- finish-branchSkill
- fuzzSkill
- handoffSkill
- humanizeSkill
- iac-scanSkill
- kb-advisorSkill
- minimalist-reviewSkill
- pentestSkill
- playwrightSkill
- pricingSkill
- qa-fullSkill
- quota-resilienceSkill
- subagent-driven-developmentSkill
- superskills-doctorSkill
- superskills-upgradeSkill
- tapestrySkill
- tddSkill
- test-coverageSkill
- validate-ideaSkill
- verifySkill
- web-perfSkill
- worktreesSkill
- write-planSkill
- youtubeSkill
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
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.

