academic-writing
Write or revise thesis and paper prose section by section (abstract, introduction, related work, method, results, discussion,…
Fix a performance problem by profiling first, making one targeted change, and verifying both the speedup and that correctness held. Use when a feature is measurably slow, a page or API exceeds its budget, or a query takes too long. Do not use to pre-optimize code that has not
Claude Code
$ npx -y skills add KhaledSaeed18/dotclaude --skill performance-optimization --agent claude-code
Codex
$ npx skills add KhaledSaeed18/dotclaude --skill performance-optimization -a codex -y
Cursor
$ npx skills add KhaledSaeed18/dotclaude --skill performance-optimization -a cursor -y
Gemini CLI
$ npx skills add KhaledSaeed18/dotclaude --skill performance-optimization -a gemini-cli -y
GitHub Copilot
$ npx skills add KhaledSaeed18/dotclaude --skill performance-optimization -a github-copilot -y
OpenCode
$ npx skills add KhaledSaeed18/dotclaude --skill performance-optimization -a opencode -y
Windsurf
$ npx skills add KhaledSaeed18/dotclaude --skill performance-optimization -a windsurf -y
name: performance-optimization description: Fix a performance problem by profiling first, making one targeted change, and verifying both the speedup and that correctness held. Use when a feature is measurably slow, a page or API exceeds its budget, or a query takes too long. Do not use to pre-optimize code that has not been measured.
Profile first. Every performance intuition is wrong until the profiler confirms it. The code that looks slow is rarely the bottleneck; the bottleneck is almost always somewhere the code looks unremarkable. An optimization without a measurement is a guess. A guess that happens to speed things up does not mean you found the right thing.
**No change before you have a baseline measurement and a profiled bottleneck.** If you cannot name the specific file, function, and line where the most time or memory is spent - with numbers - you are still in the investigation phase.
Define what "slow" means in terms the problem must satisfy:
Run the scenario and record the baseline:
# For Node.js / server-side node --prof app.js # then: node --prof-process isolate-*.log # or: clinic flame -- node app.js # For queries EXPLAIN ANALYZE SELECT ... # PostgreSQL # or the equivalent for your database # For browser / frontend # Use the browser devtools Performance panel; record the scenario end-to-end # Look at the flame chart, not just the summary
Save the baseline number. The optimization is only valid if the after-measurement is better than this.
Read the profiler output - do not guess from the source. Identify:
Common bottlenecks that do not look like bottlenecks:
State it exactly: "The bottleneck is X at file:line because Y, which will be fixed by Z."
Be specific enough to be falsifiable. "The code is slow because it does too much" is not a hypothesis. "The `getUser` function issues one SQL query per item in the `results` array at `src/db/users.ts:44`, so a page with 50 results makes 50 database round trips; replacing this with a single `WHERE id IN (...)` query should reduce the query time from ~500ms to ~10ms" is a hypothesis.
Address only the identified bottleneck. Do not:
The change should be the minimum needed to fix the specific bottleneck. Multiple simultaneous changes make the measurement impossible to attribute.
Run the same scenario under the same conditions as the baseline:
If the improvement is less than 20% or does not meet the target, re-profile - you may have fixed a symptom, or the bottleneck may have shifted to a new location now that the first one is gone.
An optimization that breaks behavior is not an optimization - it is a bug. Run the full test suite. If there are no tests covering the modified path, write one before treating the optimization as done.
Check specifically:
Reusable Claude Code extension registry. skills, subagents, slash commands, and hooks for engineering, git, testing, and security workflows. Distributed as a shadcn GitHub registry and as installable plugins.
Write or revise thesis and paper prose section by section (abstract, introduction, related work, method, results, discussion,…
Report computational benchmarks and experimental comparisons the way examiners and reviewers expect: fair baselines run under the…
Maintain the thesis .bib file as a single source of truth: fetch verified BibTeX from a DOI, arXiv id, or title via CrossRef and…
Expand a set of key papers into the literature around them by walking the citation graph with the Semantic Scholar and OpenAlex…
Audit every citation in a chapter, paper, or proposal against the .bib file and the real world: each cite key must exist, each…
Structure a thesis whose contribution is a built artifact (tool, system, method, model) using design science research: explicit…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.