perf
Skill19 starsChanged 3 months agoMITView on GitHub
Performance analysis and optimization workflow
19 other projects use a version of this.
Adopted by
Most recently taken up by
- jisuzzzz/haechitheir own version, first seen Nov 8, 2026
- umararshad4/honey-stacktheir own version, first seen Nov 1, 2026
- jameskrupnik/indie-app-skillstheir own version, first seen Oct 15, 2026
- snowzhaozhj/claude-devtools-rstheir own version, first seen Oct 9, 2026
- alamenai/terraetheir own version, first seen Oct 8, 2026
- mik2win/foureyestheir own version, first seen Oct 8, 2026
Used with
Projects with it also use incident, refactor and 5 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.
JkudjoSkillincident
Production incident response — structured triage, hypothesis tree, safe remediation, incident record
Also in 3 projects that use this
GitHubSkillrefactor
Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.
Also in 6 projects that use this
0xSeroSkillsecurity
Also in 4 projects that use this
SentrySkillonboard
Onboard a service to sentry-options. Use when integrating a new service, creating schemas, or setting up the multi-repo sentry-options workflow.
Also in 3 projects that use this
SentrySkillspec
Produce a verified spec — problem, desired outcome, and acceptance criteria — before building. Use when given a GitHub/Linear issue link, when starting from a fuzzy in-conversation idea, or asked to "figure out what to do" / "scope this" / "what should I build" — whenever the *what* isn't yet pinned down. Grills the ambiguities, checks the premise against the code, and produces acceptance criteria you sign off on — then hands to design-first.
Also in 3 projects that use this
AWSSkillship
Finalize dev work on an issue branch — update docs, push, and open a PR.
Also in 4 projects that use this
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- alamenai/terrae★ 245same name
- OutThisLife/brooklyn-skills★ 207same name
- zeuikli/claude-code-workspace★ 155same name
- microsoft/webui★ 100same name
- epicsagas/epic-harness★ 20same name
- jisuzzzz/haechi★ 17same name
- QAInsights/perf-skills★ 16same name
- fullymiddleaged/Clawness★ 5same name
- umararshad4/honey-stack★ 5same name
- JustinK33/foreman★ 3same 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.
In this repository25 other files it gives its agents.
- assess-findingsSkill
- autopilotSkill
- build-fixSkill
- code-searchSkill
- context-usageSkill
- debugSkill
- decideSkill
- designSkill
- docsSkill
- forgetSkill
- gitSkill
- implementSkill
- memoriseSkill
- patternsSkill
- plan-swarmSkill
- recallSkill
- reflectSkill
- reviewSkill
- semgrepSkill
- surveySkill
- swarmSkill
- swarm-statusSkill
- testSkill
- verifySkill
- worktree-resolveSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
3
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 25
Ensure you can measure performance reproducibly
- Very specific: line 90
Read hotspot functions directly from known profiling/search locations, or batch known symbols with code_read_symbol.
- Distinctive: line 96
Look for these common issues:
- Distinctive: line 116
Micro-optimizations: - Only as last resort
“Common” is measured: kept by at least 6 in 10 of the 14 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
Performance Mode
Recommended model tier: smart (opus) - this skill requires complex reasoning
Systematic approach to identifying and fixing performance issues.
Prerequisites
Before starting:
- Identify the specific operation or endpoint that is slow
- Understand what "fast enough" means (target latency, throughput)
- Ensure you can measure performance reproducibly
Workflow
Step 1: Establish Baseline Measurement
Never optimize without data. Measure current performance:
# Node.js - simple timing
time node script.js
# Node.js - CPU profiling
node --cpu-prof script.js
# Creates CPU.*.cpuprofile - analyze in Chrome DevTools
# Go - benchmarks
go test -bench=. -benchmem ./...
# API endpoint (ENDPOINT_URL is the URL under test)
curl -w "@curl-format.txt" -o /dev/null -s "$ENDPOINT_URL"Record baseline metrics:
- Execution time (p50, p95, p99 if available)
- Memory usage
- Number of operations per second
- Number of I/O operations
Step 2: Identify Hotspots
Find where time is being spent:
# Node.js profiling
node --cpu-prof app.js
# Then load .cpuprofile in Chrome DevTools > Performance
# Go profiling
go test -cpuprofile=cpu.prof -bench=.
go tool pprof -http=:8080 cpu.prof# Navigate unfamiliar large suspect files when their structure is needed
mcp__plugin_aide_aide__code_outline file="path/to/hotspot.ts"
# Find functions/classes in suspect area by name
mcp__plugin_aide_aide__code_search query="processData" kind="function"
# Find all callers of a hot function
mcp__plugin_aide_aide__code_references symbol="processData"
# Search for expensive patterns in code bodies (Grep is better here)
Grep for ".forEach(", ".map(", ".filter(" # Loop/iteration patterns
Grep for "SELECT", "find(", "query(" # Database queries
Grep for "fetch(", "axios", "http.Get" # Network calls
Grep for "setTimeout", "setInterval" # Timers
Grep for "JSON.parse", "JSON.stringify" # SerializationNote: code_search finds function/class/type definitions by name.
For patterns inside function bodies (loops, queries, call chains), use Grep.
Read hotspot functions directly from known profiling/search locations, or batch known symbols with
code_read_symbol. Use code_outline when unfamiliar large-file structure would help locate relevant
code. Read full files when small or mostly relevant; extra navigation rounds can outweigh smaller responses.
Step 3: Analyze Performance Patterns
Look for these common issues:
| Issue | Pattern | Solution |
| N+1 queries | Loop containing DB call | Batch/eager load |
| Repeated computation | Same calculation in loop | Memoize/cache |
| Large allocations | Creating objects in loop | Reuse/pool objects |
| Blocking I/O | Sync file/network ops | Make async/concurrent |
| Missing indexes | Slow DB queries | Add database indexes |
| Unnecessary work | Processing unused data | Filter/skip early |
| Serial execution | Sequential independent ops | Parallelize |
Step 4: Apply Optimizations
Priority order (highest impact first):
- Algorithmic improvements - O(n^2) -> O(n log n)
- Reduce I/O - Batch requests, add caching
- Parallelize - Concurrent operations
- Reduce allocations - Reuse objects, pre-allocate
- Micro-optimizations - Only as last resort
Make one optimization at a time and measure after each.
Step 5: Measure After Each Change
# Same measurement as baseline
time node script.js
go test -bench=. -benchmem ./...Compare:
- Did the metric improve?
- By how much (percentage)?
- Any negative side effects?
If no improvement: Revert and try different approach.
Step 6: Verify No Regressions
# Run all tests
npm test
go test ./...
# Check for correctness
# Ensure output is still correct after optimizationFailure Handling
| Situation | Action |
| Cannot measure reliably | Increase sample size, reduce variance sources |
| Optimization made it slower | Revert, analyze why, profile more carefully |
| Optimization broke tests | Fix tests or revert if behavior changed |
| Bottleneck is external | Document, consider caching, async processing |
| Memory improved but CPU worse | Evaluate trade-off for use case |
Common Optimizations
JavaScript/TypeScript
// BAD: N+1 queries
for (const user of users) {
const posts = await db.getPosts(user.id);
}
// GOOD: Batch query
const userIds = users.map((u) => u.id);
const posts = await db.getPostsForUsers(userIds);
// BAD: Repeated work
const typeA = items.filter((x) => x.type === "a").map((x) => x.value);
const typeB = items.filter((x) => x.type === "b").map((x) => x.value);
// GOOD: Single pass
const grouped = { a: [], b: [] };
for (const x of items) {
if (x.type in grouped) grouped[x.type].push(x.value);
}
// BAD: Serial async
const result1 = await fetch(url1);
const result2 = await fetch(url2);
// GOOD: Parallel async
const [result1, result2] = await Promise.all([fetch(url1), fetch(url2)]);Go
// BAD: Allocation in loop
var result []T
for _, item := range items {
result = append(result, process(item))
}
// GOOD: Pre-allocate
result := make([]T, 0, len(items))
for _, item := range items {
result = append(result, process(item))
}
// BAD: String concatenation
s := ""
for _, item := range items {
s += item
}
// GOOD: Builder
var b strings.Builder
for _, item := range items {
b.WriteString(item)
}SQL
-- BAD: Missing index on frequently queried column
SELECT * FROM users WHERE email = 'x@y.com';
-- GOOD: Add index
CREATE INDEX idx_users_email ON users(email);
-- BAD: SELECT *
SELECT * FROM users;
-- GOOD: Select only needed columns
SELECT id, name, email FROM users;
-- BAD: Query in loop
-- for each user: SELECT * FROM posts WHERE user_id = ?
-- GOOD: Single batch query
SELECT * FROM posts WHERE user_id IN (?, ?, ?);MCP Tools
mcp__plugin_aide_aide__code_outline- Navigate unfamiliar large files when their structure is neededmcp__plugin_aide_aide__code_search- Find function/class/type definitions by namemcp__plugin_aide_aide__code_symbols- List all symbol definitions in a filemcp__plugin_aide_aide__code_references- Find all callers of a hot function (exact name match)mcp__plugin_aide_aide__memory_search- Check past performance decisions- Grep - Find code patterns in bodies: loops, queries, call chains, string literals
Profiling Commands Reference
Node.js
# CPU profiling
node --cpu-prof app.js
# Produces .cpuprofile file
# Memory profiling
node --heap-prof app.js
# Produces .heapprofile file
# Clinic.js for analysis
npx clinic doctor -- node app.js
npx clinic flame -- node app.jsGo
# CPU profiling
go test -cpuprofile=cpu.prof -bench=.
go tool pprof -http=:8080 cpu.prof
# Memory profiling
go test -memprofile=mem.prof -bench=.
go tool pprof -http=:8080 mem.prof
# Execution trace
go test -trace=trace.out -bench=.
go tool trace trace.outBrowser
- DevTools -> Performance -> Record
- DevTools -> Memory -> Heap snapshot
- Lighthouse for overall page performance
Verification Criteria
Before completing:
- Baseline measurement recorded
- Improvement quantified (percentage)
- All tests still pass
- No correctness regressions
- Memory usage acceptable
Output Format
## Performance Analysis: [Operation/Endpoint Name]
### Baseline
- Execution time: 450ms (p50), 680ms (p95)
- Memory: 125MB peak
- Database queries: 150
### Hotspots Identified
1. `db.getUsers()` - 300ms (67% of total)
2. `processData()` - 100ms (22% of total)
3. `formatOutput()` - 50ms (11% of total)
### Optimizations Applied
1. Batched user queries - 300ms -> 50ms
2. Memoized processData for repeated calls - 100ms -> 5ms
### Results
- Execution time: 450ms -> 105ms (77% faster)
- Memory: 125MB -> 80MB (36% reduction)
- Database queries: 150 -> 3 (98% reduction)
### Verification
- All tests: PASS
- Output correctness: VERIFIEDDoes 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.

