profile-optimizer
Skill20 starsChanged 13 days agoMITView on GitHub
Analyzes React Profiler exports, Chrome Performance traces, and heap snapshots to find the highest-impact CPU and memory bottlenecks and propose fixes ranked by measured impact. Invoke with /profile-optimizer for "why is this slow", "memory leak", or "analyze profile".
7 other projects use a version of this.
Adopted by
Most recently taken up by
- juanASP/mercurytheir own version, first seen Nov 1, 2026
- charlie947/social-media-skillstheir own version, first seen Sep 15, 2026
- alebgl77/claude-inctheir own version, first seen Jul 28, 2026
- moses607/socialforgetheir own version, first seen Jul 15, 2026
- wltn7810-dotcom/claude-skilltheir own version, first seen Jul 13, 2026
- mahiunfiltered/claude-code-skillstheir own version, first seen Jul 8, 2026
Used with
Projects with it also use reels-scripting, voice-builder and 1 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.
mahiunfilteredSkillreels-scripting
Turn a reference Instagram Reel into a script for your own Reel, tuned to your voice and repurposed from your newsletter content. Takes a Reel URL or Notion reference link, uses Apify to scrape the video, sends it to Gemini 2.5 Flash for full transcript + hook + structure analysis, then writes a new script applying the same patterns to your newsletter topic. Use this skill whenever the user says "script a reel", "reels scripting", "turn this into a reel", pastes an Instagram Reel URL, or references their Notion outlier reels database. Requires APIFY_API_TOKEN and GOOGLE_AI_API_KEY environment variables.
Also in 3 projects that use this
mahiunfilteredSkillvoice-builder
Build a personalised voice profile inside a Cowork project from a short interview plus 3 to 5 sample pieces of writing. Works for any content format: LinkedIn posts, newsletters, essays, emails, blog posts, tweets, or any other published writing. Use this skill at the start of any Cowork project where the user wants Claude to learn who they are and how they write before drafting new content. Trigger whenever the user says "build my voice", "learn my voice", "set up my content system", "onboard me", "train on my writing", "train on my posts", "I want Claude to sound like me", or drops a batch of writing samples into chat at the start of a project. Also trigger for first-time Cowork users who need a voice foundation before writing anything. Always produces two files (about-me.md and voice.md) saved into the project root.
Also in 3 projects that use this
OpenAnalystIncSkillhook-generator
Generates powerful hooks, headlines, CTAs, and attention-grabbing opening lines. Uses proven formulas and psychological triggers. Use this skill when you need subject lines, social media hooks, ad headlines, CTAs, or any content that must capture attention instantly.
Also in 3 projects that use this
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- charlie947/social-media-skills★ 4.4ksame name
- alebgl77/claude-inc★ 21same name
- FlavioZanoni/mercury★ 8same name
- moses607/socialforge★ 3same name
- mahiunfiltered/claude-code-skills★ 1same name
- juanASP/mercury★ 0same name
- wltn7810-dotcom/claude-skill★ 0same name
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 repository48 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- skills/workflow/autonomous-workflow/CLAUDE.mdCLAUDE.md
- ideateSkill
- interviewSkill
- playwright-trace-analyzerSkill
- rum-trackingSkill
- screencastSkill
- video-analyserSkill
- youtube-transcriptSkill
- create-skillSkill
- docsSkill
- handoffSkill
- optimize-claude-mdSkill
- persistent-memorySkill
- attach-mediaSkill
- ci-auto-fixSkill
- create-prSkill
- github-actions-authorSkill
- resolve-conflictsSkill
- animations-nativeSkill
- animationsSkill
- behavioral-designSkill
- chartingSkill
- storybookSkill
- uxSkill
- visual-designSkill
- ai-engineeringSkill
- confidenceSkill
- criticalSkill
- impact-mapSkill
- jev-assertSkill
- measurableSkill
- optimize-approachSkill
- polishSkill
- pr-reviewSkill
- review-loopSkill
- tddSkill
- verify-behaviorSkill
- aw-verifySkill
- e2e-testing-mobileSkill
- e2e-testingSkill
- telemetry-verifySkill
- ui-verifySkill
- autonomous-workflowSkill
- aw-create-planSkill
- aw-create-walkthroughSkill
- fix-bugSkill
- implement-suggestionSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 5 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 54
If the file is gzipped, decompress with gunzip -k before parsing.
- Distinctive: line 56
If multiple formats are passed, treat them as complementary evidence:
- Very specific: line 105
After the first pass at root-cause analysis, invoke the confidence skill in analysis mode:
- Distinctive: line 120
After two deep-dive iterations without reaching 90%, stop and present findings as a hypothesis with the evidence required to confirm it.
- Very specific: line 129
Measure before recommending: Every fix must be tied to a number from the profile.
- Distinctive: line 138
Auto-detect, do not interrogate: Read the file, infer the format, state what you found.
- Very specific: line 140
Confidence-gated honesty: If /confidence returns < 90%, dig deeper or admit uncertainty.
- Distinctive: line 165
When the input is a heap snapshot / timeline / profile:
- Very specific: line 182
Map suspects to source: Use rules/heap-snapshot-analysis.md Phases 3–4 to go from constructor name → source file → retainer pattern.
- Distinctive: line 187
Don't preload it — only when an input is detected as a heap format.
“Common” is measured: kept by at least 6 in 10 of the 7 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
Profile Optimizer
Turn a profile file into a ranked, evidence-backed optimisation plan.
Index file. Detailed analysis rules, optimisation patterns, and report templates live under
rules/,references/, andtemplates/. Load only what the current phase needs — the body ofSKILL.mdis a thin orchestrator.
Inputs
The user passes one or more profile files. Accept any of:
| Format | Extension | Detection signal |
| React DevTools Profiler | .json (often .reactprofile) | Top-level keys include dataForRoots and rendererID / version |
| Chrome Performance trace | .json / .json.gz | Top-level traceEvents array (or NDJSON with ph, ts, cat) |
| Chrome CPU profile (legacy) | .cpuprofile | Top-level nodes, samples, timeDeltas |
| Chrome heap snapshot | .heapsnapshot | Top-level snapshot.meta.node_fields + nodes/edges/strings |
| Chrome heap timeline | .heaptimeline | Heap snapshot shape + samples array |
| Chrome heap profile (sampled allocations) | .heapprofile | Top-level head + samples (V8 sampling-allocation profile) |
If the file is gzipped, decompress with gunzip -k before parsing.
If multiple formats are passed, treat them as complementary evidence:
- React profile + Chrome trace → correlate by wall-clock timestamp (React shows component cost, Chrome shows where the main thread actually spent time).
- Two or three heap snapshots → diff them to find what grew (leak detection).
- Chrome trace + heap timeline of the same interaction → CPU + memory cost of one action correlated.
See rules/input-detection.md for the precise
detection logic.
Workflow
Six phases. Do not skip a gate.
| Phase | Name | Rule file | Gate |
| 0 | Intake | rules/input-detection.md | Format detected, file size and validity confirmed |
| 1 | Measurement frame | rules/measurement-methodology.md | Baseline metric chosen (TBT, INP, p95 commit, retained MB, etc.) and target stated |
| 2 | Hotspot extraction | rules/react-profile-analysis.md, rules/chrome-trace-analysis.md, or rules/heap-snapshot-analysis.md | Top-N bottlenecks listed with concrete numbers (ms / MB / %, count) |
| 3 | Root-cause | rules/optimization-playbook.md | Each hotspot mapped to a code-level cause (file path / component / API) |
| 4 | Confidence gate | rules/confidence-loop.md | /confidence analysis ≥ 90% — else iterate (max 2 deep-dives) |
| 5 | Optimisation plan | templates/analysis-report.md | Report written with ranked fixes, expected impact, and verification plan |
Phases 2 and 3 branch on the input format (CPU / memory) — everything else is shared.
Required reading by phase
Load on demand — do not preload.
| Phase | Files |
| 0 | rules/input-detection.md |
| 1 | rules/measurement-methodology.md |
| 2 (CPU) | rules/react-profile-analysis.md, rules/chrome-trace-analysis.md |
| 2 (Memory) | rules/heap-snapshot-analysis.md (also points to scripts/heap-summary.mjs and scripts/heap-diff.mjs) |
| 3 | rules/optimization-playbook.md, references/react-optimization-patterns.md, references/chrome-optimization-patterns.md |
| 4 | rules/confidence-loop.md |
| 5 | templates/analysis-report.md |
Confidence-gated iteration
After the first pass at root-cause analysis, invoke the confidence skill in
analysis mode:
Skill(skill="confidence", args="analysis")Apply this gate:
| Score | Action |
| ≥ 90% | Proceed to Phase 5 (optimisation plan). |
| 70–89% | Run one deeper pass: re-read the profile, look at the next-deepest frame, correlate sources. |
| < 70% | Surface the gap to the user with a question — do not propose code changes on speculation. |
After two deep-dive iterations without reaching 90%, stop and present
findings as a hypothesis with the evidence required to confirm it. This is
the /confidence iteration protocol applied to performance work — see
rules/confidence-loop.md.
Core principles
- Measure before recommending. Every fix must be tied to a number from
the profile. "This component re-renders too much" is not a finding;
"
<UserList>rendered 47 times in a 230ms commit, accounting for 38% of that commit" is. - Rank by impact, not by ease. A 5ms fix on a hot path beats a 50ms fix on a cold one. Use the profile's own data to estimate ceiling impact.
- Root cause over symptom. A long task is the symptom; the work inside it is the cause. Do not stop at "task X took 240ms" — drill into the call stack.
- Auto-detect, do not interrogate. Read the file, infer the format, state what you found. Ask the user only if detection genuinely fails.
- Confidence-gated honesty. If
/confidencereturns < 90%, dig deeper or admit uncertainty. Do not paper over a weak diagnosis with a confident-sounding fix. - One profile at a time, but correlate when given two. A React profile plus a matching Chrome trace is far more powerful than either alone.
Anti-patterns (one-liners — full list in
rules/optimization-playbook.md)
- Recommending
useMemo/useCallbackeverywhere without measuring (the React Compiler exists, and unmeasured memoisation often regresses). - Treating a long task in
Function callas the root cause without expanding the call stack. - Reporting raw event counts without converting to percentage of total blocking time or commit duration.
- Skipping the confidence gate because the first hypothesis "looks right".
- Fixing one big bottleneck and ignoring the long tail of repeated small ones (death-by-a-thousand-cuts is the common case in real apps).
Memory-profiling quickstart
When the input is a heap snapshot / timeline / profile:
- Validate capture. A single snapshot is only good for a baseline analysis — refuse to diagnose a leak from one. Leak diagnosis needs ≥ 2 snapshots, ideally 3 (baseline → after-action → after-cleanup).
- Run
heap-summaryon the most recent snapshot for top constructors and node-type breakdown:node --max-old-space-size=4096 \ <skill_dir>/scripts/heap-summary.mjs <snapshot.heapsnapshot> - Run
heap-difffor the leak case to find what grew between two snapshots:node --max-old-space-size=4096 \ <skill_dir>/scripts/heap-diff.mjs <before.heapsnapshot> <after.heapsnapshot> - Map suspects to source. Use
rules/heap-snapshot-analysis.mdPhases 3–4 to go from constructor name → source file → retainer pattern.
The full methodology (capture protocol, how to interpret the diff, common
leak shapes) is in rules/heap-snapshot-analysis.md.
Don't preload it — only when an input is detected as a heap format.
Definition of Done
- Input format detected and stated.
- Baseline metric and target chosen (Phase 1) — ms for CPU work, MB retained for memory work.
- Top-N hotspots listed with measured cost (ms / MB / %, count).
- Each hotspot mapped to a file/component/API/constructor with line or retainer references where possible.
/confidence analysisreached ≥ 90% (or two deep-dives recorded with the remaining uncertainty surfaced to the user).- Optimisation plan written using
templates/analysis-report.md, with ranked fixes, expected ms / MB saved, and a re-profile verification step. - User has the next concrete action (apply fix N, re-profile, compare).
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.

