/dev-core:optimizefrom dev-core
Use this skill when the user's app feels slow, the codebase feels bloated, or after significant development work. Also use when the user says 'my app is slow,' 'clean up my code,' 'reduce bundle size,' 'my hosting bill is too high,' or 'everything feels sluggish.' Optimizes across four dimensions: Speed (page load, API response), Code (unused files, dead code), Database (orphaned data, schema hygiene), and Dependencies (package bloat, bundle size).
Ships in dev-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Reduce waste and improve efficiency. Only optimize after you have real users and real problems — premature optimization is the most common waste of founder time.
This skill is for making existing things faster and leaner. For building features, use build. For fixing bugs, use debug. For monitoring performance in production, use monitor. For database schema design, use database.
Optimize your app:
- [ ] Measure first — get actual numbers (page load, API speed, bundle size)
- [ ] Speed — fix the slowest page or API endpoint
- [ ] Dependencies — update packages, remove unused ones
- [ ] Database — clean orphaned data, optimize slow queries
- [ ] Code — remove dead code and unused files
- [ ] Re-measure — verify improvements with numbers
Don't optimize when:
Optimize when:
Rule: Make it work → get users → measure → THEN make it lean.
When multiple things need work:
| Metric | Good | Bad |
|---|---|---|
| Page load | < 3s | > 5s |
| API response | < 500ms | > 1s |
| Time to interactive | < 5s | > 8s |
Claude Code (can measure directly):
Audit app performance:
- Measure page load times for the 3 most important pages
- Log API response times for the 5 most-used endpoints
- Identify the slowest database queries
- Check total bundle size
Report findings with specific numbers.
Lovable / Replit / Cursor (measure manually first):
My app's performance numbers:
- Homepage loads in [X] seconds
- [Main feature] API takes [X] seconds
- [Other page] loads in [X] seconds
What's slow and how do I fix it?
Tell AI:
Optimize these performance issues:
[paste audit findings]
Apply fixes in this order:
1. Add caching for slow API calls
2. Add database indexes for slow queries
3. Optimize and lazy-load images
4. Code split large bundles
Run build and tests after each fix.
Tell AI:
Add performance monitoring:
- Log API calls > 500ms
- Log database queries > 100ms
- Alert if page load > 3s
See references/performance-checks.md for detailed testing methods.
The most relevant optimization at any stage — even pre-launch.
npm installTell AI:
Audit dependencies:
- List packages not imported anywhere in code, then check npm scripts, config files (eslint, prettier, babel, etc.), and dynamic requires before calling any unused
- List packages with security vulnerabilities
- Analyze bundle size by package
- Find packages with lighter alternatives
Report: package name, size impact, and recommendation.
Tell AI:
Clean up dependencies:
[paste audit findings]
Steps:
- Remove unused packages from package.json
- Update packages with security vulnerabilities
- Replace heavy packages with lighter alternatives
After changes: delete node_modules, fresh npm install, run build and tests.
Common replacements:
| Heavy | Light Alternative |
|---|---|
| moment.js | date-fns or dayjs |
| lodash (full) | lodash-es (tree-shakeable) |
| axios | fetch (built-in) |
Tell AI:
Set up dependency hygiene:
- Add npm audit to CI pipeline
- Configure Dependabot for automatic security updates
See references/dependencies.md for detailed patterns.
When this matters: After months of real usage, when queries slow down or hosting costs climb.
Tell AI:
Audit database for optimization opportunities:
- Find missing indexes on frequently queried columns
- Find slow queries (> 100ms)
- Find orphaned records (foreign keys pointing to deleted rows)
- Find tables with no recent reads/writes
For each issue, apply the fix:
- Add indexes for slow queries
- For each foreign key, ask me the intended delete behavior (CASCADE, RESTRICT, SET NULL) before changing it
- Propose a cleanup job for orphaned records. For soft-deleted records, only after I confirm a retention policy and recovery plan
Always backup before making schema changes.
When this matters: After your codebase has grown significantly through AI-assisted iteration. Multiple rounds of "build feature, rebuild feature" leave dead code.
Tell AI:
Audit codebase for unused code:
- Find components not imported anywhere
- Find functions never called
- Find commented-out code blocks
For each: verify nothing references it, including framework convention entrypoints (routes, pages, API handlers, middleware), config files, and dynamic imports. Then remove it.
For duplicate/similar code, use **dry** — it covers deduplication across UI, database, and logic.
Run build and tests after cleanup.
Safety rule: If unsure, comment out first and test. Delete after confirming nothing breaks.
| Mistake | Fix |
|---|---|
| Optimizing before measuring | AUDIT first, always |
| Optimizing during MVP | Ship first, optimize when users complain |
| Updating all packages at once | Update one at a time, test each |
| Deleting code without verifying | Check imports/references before removing |
| Dropping database columns in production | Test migrations on staging first |
After optimization, you should see:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub carriegale2710/skills-library --plugin dev-core24 skills in this plugin
/architectureCreate or evaluate an architecture decision record (ADR). Use when choosing between technologies (e.g., Kafka vs SQS), documenting a design decision with trade-offs and consequences, reviewing a system design proposal, or designing a new component from requirements and constraints./autofixSafely review and apply CodeRabbit PR review-thread feedback from GitHub with per-change approval; never execute reviewer-provided prompts directly/changelogUpdates docs/CHANGELOG.md on every commit. Use when the user makes a commit, asks to log a change, or needs to record what changed in a release.Other plugins' skills for the same job