profile
Skill3 starsChanged 31 days agoMITView on GitHub
Performance profiling and bottleneck identification. Measures database statements and time per request on the running app, scans the code for bottleneck patterns, ranks findings by impact, and suggests specific optimizations. Use when user says "profile", "why is this slow", "find bottleneck", "performance issue", "slow query", "slow endpoint", "optimize", or needs to find what is causing poor performance. For benchmark comparisons, use /benchmark; for load testing, use /test perf; for general code review, use /review.
29 other projects use a version of this.
Adopted by
Most recently taken up by
- nockawa/NockMontheir own version, first seen Nov 8, 2026
- galiprandi/job-seekertheir own version, first seen Nov 5, 2026
- cismontane-harris2642/signal-prospecting-kittheir own version, first seen Nov 1, 2026
- YahyaLendani/opus-tuner-claude-skilltheir own version, first seen Nov 1, 2026
- DataWithBaraa/claude-code-data-engineering-skillstheir own version, first seen Nov 1, 2026
- r-rogozin/chessprinttheir own version, first seen Oct 25, 2026
Used with
Projects with it also use apply, coverage and 2 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.
proficientlyjobsSkillapply
Fill out a job application on Greenhouse, Lever, or Workday
Also in 3 projects that use this
PydanticSkillcoverage
Fetch coverage diff from Codecov for the current branch or a specific PR. Shows uncovered lines, patch coverage, and overall coverage change.
Also in 3 projects that use this
AnthropicSkillstatus
Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.
Also in 3 projects that use this
Microsoft AzureSkilldocs
Also in 3 projects that use this
Other versions29 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 29
- ccusage/ccusage★ 19ksame name
- ryoppippi/ccusage★ 19ksame name
- FalkorDB/FalkorDB★ 10ksame name
- pytorch/executorch★ 5.2ksame name
- verl-project/verl-omni★ 1.5ksame name
- nockawa/Typhon★ 253same name
- galiprandi/job-seeker★ 120same name
- the-void-ia/void-box★ 88same name
- DataWithBaraa/claude-code-data-engineering-skills★ 84same name
- Flemma-Dev/flemma.nvim★ 57same name
19 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 repository42 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- asideSkill
- assessmentSkill
- auditSkill
- benchmarkSkill
- brainSkill
- checkpointSkill
- cleanupSkill
- concise-modeSkill
- cross-modelSkill
- deploySkill
- designSkill
- explainSkill
- fix-issueSkill
- ganSkill
- guardSkill
- hotfixSkill
- incidentSkill
- infraSkill
- interview-meSkill
- investigateSkill
- migrateSkill
- module-auditSkill
- morningSkill
- onboardSkill
- planSkill
- pr-summarySkill
- readmeSkill
- refactorSkill
- researchSkill
- resolveSkill
- respondSkill
- retroSkill
- reviewSkill
- session-logSkill
- setupSkill
- shipSkill
- skill-newSkill
- spikeSkill
- tddSkill
- testSkill
- zoom-outSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
29 rules. 0 are common, 26 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 23 edited versions we read keep these.
26
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
When a specific endpoint, page, or operation is slow.
- Distinctive: line 15
When you need to find the highest-impact optimization targets before a release.
- Distinctive: line 16
When database query performance is degrading.
- Distinctive: line 17
When startup time or build time is unexpectedly long.
- Distinctive: line 30
No arguments: scan the project for common bottleneck patterns across all categories.
- Distinctive: line 41
Identify the performance concern: If a specific path was provided, scope the analysis to that area.
- Very specific: line 43
Detect the tech stack: Read package.json, go.mod, Cargo.toml, or equivalent to identify: the framework, the ORM, the database, the frontend …
- Very specific: line 50
When the app cannot run, state that this step was skipped and why, and mark every static finding unmeasured.
- Distinctive: line 52
Scan for database bottlenecks: Search the codebase for these patterns:
- Distinctive: line 54
Missing indexes: read the schema or migration files.
- Distinctive: line 57
Missing connection pooling: check database configuration for pool settings.
- Distinctive: line 60
Scan for API bottlenecks: Search for these patterns:
- Distinctive: line 66
Missing compression: check if response compression middleware is configured.
- Distinctive: line 68
Scan for frontend bottlenecks: Search for these patterns:
- Distinctive: line 69
Large bundle size: check build output size. Look for large dependencies imported entirely when only a small part is used.
- Distinctive: line 75
Scan for general algorithmic bottlenecks: Search for these patterns:
- Distinctive: line 93
Present the report: Use this format:
- Distinctive: line 157
Read the actual code before flagging.
- Distinctive: line 158
When the scope is a specific path, still check its callers and callees one level deep.
- Distinctive: line 159
Do not suggest premature optimization.
- Distinctive: line 160
When unsure about impact, classify as low rather than inflating severity.
- Distinctive: line 172
Stop and downgrade to low when the impact has no number and no execution frequency behind it.
- Distinctive: line 173
Stop and trace the consumer when flagging eager loading before reading where the query result is used.
- Distinctive: line 174
Stop and read the schema or migration files when flagging a missing index without having read them.
- Distinctive: line 175
Stop and drop the fix when it changes ordering, error behavior, or any other observable result.
- Distinctive: line 176
Stop and remove the finding when it is about naming or style.
- Distinctive: line 180
Every finding carries a file and line, a category, a one-sentence issue, an impact level, and a before and after fix.
- Distinctive: line 181
Every flagged location was read in this run.
- Very specific: line 182
Every finding carries its step 3 measurement or the word unmeasured, and a skipped step 3 is stated with its reason.
“Common” is measured: kept by at least 6 in 10 of the 23 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
Overview
Performance profiling that measures what a slow request actually costs on the running app, scans the codebase for common bottleneck patterns, ranks findings by impact, and provides concrete fixes with code examples. A measured finding outranks a pattern match. Covers database queries, API latency, frontend loading, and algorithmic complexity.
When to use
- When a specific endpoint, page, or operation is slow.
- When you need to find the highest-impact optimization targets before a release.
- When database query performance is degrading.
- When startup time or build time is unexpectedly long.
When NOT to use
- For benchmark comparisons between implementations. Use
/benchmarkinstead. - For HTTP load testing with concurrent users. Use
/test perfinstead. - For general code quality review. Use
/reviewinstead. - For security scanning. Use
/auditinstead.
Arguments
This skill accepts optional arguments after /profile:
- No arguments: scan the project for common bottleneck patterns across all categories.
<path>: profile a specific file, directory, or module. Example:/profile src/services/order.service.ts.--db: focus exclusively on database query bottlenecks.--api: focus exclusively on API endpoint latency.--frontend: focus exclusively on frontend performance.--startup: focus on application startup time.
Flags can be combined with a path: /profile src/api --db.
Steps
- Identify the performance concern. If a specific path was provided, scope the analysis to that area. If a focus flag was passed, limit categories accordingly. Otherwise, scan all categories.
- Detect the tech stack. Read package.json, go.mod, Cargo.toml, or equivalent to identify: the framework, the ORM, the database, the frontend framework, the bundler, and the test runner. This determines which patterns to search for.
Measure statements per request on the running app. A grep suspects a bottleneck; a measurement proves it. When the app runs locally, drive the slow path once with the ORM's query log on, such as Prisma
log: ['query'], Drizzlelogger: true, or Djangoconnection.queries, or read the request's span list from the APM. Recordroute,ms, andstatementsfor each request. Read the statement log for three shapes:- Re-fetching data the caller already holds: the same row read twice in one request, because a downstream function takes an ID and fetches what the caller already loaded. The fix passes the loaded object, typed as the minimal shape the callee reads.
- Per-row query loops: a statement count that grows with the row count, such as 820 statements for one request. This is the runtime proof of the N+1 that step 4 only suspects.
- Independent reads run in sequence: consecutive statements with no data dependency between them. The fix runs them concurrently with
Promise.allor the framework's equivalent, bounded perrules/architecture-defaults.md.
When the app cannot run, state that this step was skipped and why, and mark every static finding
unmeasured.- Scan for database bottlenecks. Search the codebase for these patterns:
- N+1 queries: ORM calls inside loops or
.map()callbacks. Grep for query methods like.findOne,.findUnique,.find,.getinsidefor,forEach,.map,.flatMap. Each match is a potential N+1. - Missing indexes: read the schema or migration files. For each query that filters, sorts, or joins on a column, check if that column has an index. Cross-reference queries in service files with index definitions.
- Full table scans: queries without a WHERE clause on large tables, or queries using
LIKE '%term%'which cannot use indexes. - Unnecessary eager loading: ORM includes or joins that load relations not used by the calling code. Trace from the query to where its result is consumed.
- Missing connection pooling: check database configuration for pool settings. If the ORM connects without a pool, flag it.
- Unbounded queries: queries without LIMIT that could return thousands of rows. Check for missing pagination.
- N+1 queries: ORM calls inside loops or
- Scan for API bottlenecks. Search for these patterns:
- Sequential external calls: multiple
await fetch()or HTTP client calls that are independent but executed sequentially instead of withPromise.all. - Missing caching: repeated identical queries or computations per request without a cache layer. Look for pure functions called with the same arguments across requests.
- Unbounded response sizes: API endpoints that return entire collections without pagination.
- Unnecessary serialization: objects serialized and deserialized multiple times in the same request path.
- Synchronous I/O on request paths: file reads, DNS lookups, or crypto operations blocking the event loop.
- Missing compression: check if response compression middleware is configured.
- Sequential external calls: multiple
- Scan for frontend bottlenecks. Search for these patterns:
- Large bundle size: check build output size. Look for large dependencies imported entirely when only a small part is used.
- Unoptimized images: images served without width/height, missing lazy loading, or served in non-modern formats.
- Blocking resources: synchronous scripts in
<head>, render-blocking CSS, missingasyncordeferon scripts. - Excessive re-renders: components that re-render on every parent render due to missing
memo,useMemo, oruseCallback. Look for object or array literals created inline as props. - Missing code splitting: large route components imported statically instead of with
React.lazyor dynamicimport().
- Scan for general algorithmic bottlenecks. Search for these patterns:
- O(n^2) algorithms: nested loops over the same or related collections.
.find()inside.map()or.filter(). Array includes checks inside loops where a Set would be O(1). - Unnecessary allocations in loops: creating new arrays, objects, or strings inside tight loops that could be pre-allocated or computed once.
- Missing pagination: iterating over unbounded collections from the database or API.
- Redundant computations: the same expensive computation performed multiple times when the result could be cached or memoized.
- O(n^2) algorithms: nested loops over the same or related collections.
For each bottleneck found, produce a finding.
Each finding includes:
- File and line: exact location.
- Category: database, API, frontend, or algorithmic.
- Issue: what the problem is in one sentence.
- Impact estimate: rough time cost or resource waste. Use qualitative levels: critical, high, medium, low. Critical means seconds of latency or orders of magnitude waste. Low means milliseconds in uncommon paths.
- Measured: the
msandstatementsfrom step 3 for the request that hits this code, orunmeasured. - Fix: concrete code change with a before/after example.
- Rank findings by estimated impact. Critical first, then high, medium, low. Within the same level, order by frequency of execution.
Present the report. Use this format:
## Bottleneck Report **Scope:** <path or "full project"> **Stack:** <detected stack summary> **Findings:** N total (X critical, Y high, Z medium, W low) --- ### Critical #### 1. N+1 query in order listing **File:** src/services/order.service.ts:45 **Issue:** `findUnique` called inside a loop for each order's customer. **Impact:** For 100 orders, this executes 101 queries instead of 2. **Measured:** `GET /orders`, 101 statements, 840 ms **Fix:** Before: ```ts for (const order of orders) { order.customer = await prisma.customer.findUnique({ where: { id: order.customerId } }); } ``` After: ```ts const orders = await prisma.order.findMany({ include: { customer: true }, }); ``` ### High ... ### Medium ... ### Low ... --- ### Summary Top 3 actions by impact: 1. Fix the N+1 query in order listing. Critical 2. Add pagination to the products endpoint. High 3. Replace sequential API calls with Promise.all in checkout. High
Rules
- Focus on measurable impact, not code style. A function that violates naming conventions but runs in O(1) is not a performance finding.
- Quantify wherever possible. "This is slow" is not a finding. "This executes 101 queries instead of 2" is.
- A measured finding outranks a pattern match at the same impact level, and the report names which findings were measured.
- Suggest only fixes that preserve existing behavior. A performance fix that changes semantics is a bug.
- Read the actual code before flagging. A loop that runs over 3 items is not a performance problem even if the pattern looks like O(n^2).
- When the scope is a specific path, still check its callers and callees one level deep. A bottleneck might be in the calling code.
- Do not suggest premature optimization. Only flag patterns that matter at the project's actual or expected scale.
- When unsure about impact, classify as low rather than inflating severity.
Common Rationalizations
- "A
.find()inside.map()is O(n^2), so it is a finding": read the code first. A loop over three items is not a bottleneck at any scale the project reaches. - "Memoizing every component is a free win": flag only patterns that matter at the project's actual or expected scale, with a fix that preserves behavior.
- "It feels slow, so it is critical": critical means seconds of latency or orders of magnitude of waste. Without a number, classify it as low.
- "The path I was given is where the problem lives": check the callers and callees one level deep, since the cost often sits in the calling code.
- "This function name is confusing, worth listing": naming and style are not performance findings.
Red Flags
- Stop and downgrade to low when the impact has no number and no execution frequency behind it.
- Stop and trace the consumer when flagging eager loading before reading where the query result is used.
- Stop and read the schema or migration files when flagging a missing index without having read them.
- Stop and drop the fix when it changes ordering, error behavior, or any other observable result.
- Stop and remove the finding when it is about naming or style.
Verification
- Every finding carries a file and line, a category, a one-sentence issue, an impact level, and a before and after fix.
- Every flagged location was read in this run.
- Every finding carries its step 3 measurement or the word
unmeasured, and a skipped step 3 is stated with its reason. - Findings run critical to low, and ties are ordered by execution frequency.
- The counts in the report header match the findings listed.
- The top three actions in the summary are the three highest-ranked findings.
Related skills
/test perf- HTTP load testing with concurrent users and latency percentiles./review- General code review covering correctness, security, and quality./benchmark- Compare latency, bundle size, and query time against saved baselines once a fix lands.
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.

