Automated summary
A performance optimization skill that walks the agent through a four-phase cycle: define metrics, measure and profile, locate the bottleneck, then optimize and verify there are no regressions.
Strengths
- Clear four-phase method (identify, locate, optimize, verify) that prevents blind optimization
- Bottleneck table broken down by layer (database, API, application, frontend, network) with concrete leads
- Before/after code examples for common wins: N+1 queries, pagination, field selection, compression, code splitting, memoization
- Concrete performance targets (p50/p95/p99, FMP, TTI, memory) usable as a comparison baseline
Limitations
- Code examples are mostly TypeScript/Node, with only a few profiling commands for Python and Go
- No automated measurement tooling is provided: no benchmark scripts, load tests, or distributed tracing
- Target thresholds in the reference table are generic and must be adapted to each project's context
Use it when an endpoint is slow, a page takes too long to render, or you need to reduce latency and memory usage in an existing application.
Avoid it for availability, security, or functional bug issues, or when no baseline measurement can be taken before the intervention.
Security analysis
CautionThe skill instructs the use of Bash, curl, and SQL commands for performance profiling and optimization. These are legitimate uses but involve network access and potential database modifications, so caution is warranted. No destructive, exfiltrating, or obfuscated actions are present.
- •Uses Bash for profiling commands and curl for network requests, which are powerful tools but appear legitimate.
- •Includes SQL CREATE INDEX statements that could modify a database if executed without review.
Examples
Notre endpoint GET /api/users prend environ 1,2 s au p95. Profile-le, identifie le goulot d'étranglement et propose une optimisation avec un avant/après mesuré.Cette requête Sequelize génère des centaines de requêtes SQL. Aide-moi à trouver le N+1 et à le remplacer par un eager loading, puis vérifie le temps de réponse.Notre page d'accueil met 4 s à devenir interactive. Analyse le bundle, ajoute du code splitting et du lazy loading, et compare le Time to Interactive avant/après.name: performance-engineer description: Performance optimization specialist for improving application speed and efficiency. Use when investigating performance issues or optimizing code. allowed-tools: Read, Write, Edit, Bash, Grep, Glob
Performance Engineer
Specialist in analyzing and optimizing application performance, identifying bottlenecks, and implementing efficiency improvements.
When This Skill Activates
Activates when you:
- Report performance issues
- Need performance optimization
- Mention "slow" or "latency"
- Want to improve efficiency
Performance Analysis Process
Phase 1: Identify the Problem
-
Define metrics
- What's the baseline?
- What's the target?
- What's acceptable?
-
Measure current performance
# Response time curl -w "@curl-format.txt" -o /dev/null -s https://example.com/users # Database query time # Add timing logs to queries # Memory usage # Use profiler -
Profile the application
# Node.js node --prof app.js # Python python -m cProfile app.py # Go go test -cpuprofile=cpu.prof
Phase 2: Find the Bottleneck
Common bottleneck locations:
| Layer | Common Issues | |-------|---------------| | Database | N+1 queries, missing indexes, large result sets | | API | Over-fetching, no caching, serial requests | | Application | Inefficient algorithms, excessive logging | | Frontend | Large bundles, re-renders, no lazy loading | | Network | Too many requests, large payloads, no compression |
Phase 3: Optimize
Database Optimization
N+1 Queries:
// Bad: N+1 queries
const users = await User.findAll();
for (const user of users) {
user.posts = await Post.findAll({ where: { userId: user.id } });
}
// Good: Eager loading
const users = await User.findAll({
include: [{ model: Post, as: 'posts' }]
});
Missing Indexes:
-- Add index on frequently queried columns
CREATE INDEX idx_user_email ON users(email);
CREATE INDEX idx_post_user_id ON posts(user_id);
API Optimization
Pagination:
// Always paginate large result sets
const users = await User.findAll({
limit: 100,
offset: page * 100
});
Field Selection:
// Select only needed fields
const users = await User.findAll({
attributes: ['id', 'name', 'email']
});
Compression:
// Enable gzip compression
app.use(compression());
Frontend Optimization
Code Splitting:
// Lazy load routes
const Dashboard = lazy(() => import('./Dashboard'));
Memoization:
// Use useMemo for expensive calculations
const filtered = useMemo(() =>
items.filter(item => item.active),
[items]
);
Image Optimization:
- Use WebP format
- Lazy load images
- Use responsive images
- Compress images
Phase 4: Verify
- Measure again
- Compare to baseline
- Ensure no regressions
- Document the improvement
Performance Targets
| Metric | Target | Critical Threshold | |--------|--------|-------------------| | API Response (p50) | < 100ms | < 500ms | | API Response (p95) | < 500ms | < 1s | | API Response (p99) | < 1s | < 2s | | Database Query | < 50ms | < 200ms | | Page Load (FMP) | < 2s | < 3s | | Time to Interactive | < 3s | < 5s | | Memory Usage | < 512MB | < 1GB |
Common Optimizations
Caching Strategy
// Cache expensive computations
const cache = new Map();
async function getUserStats(userId: string) {
if (cache.has(userId)) {
return cache.get(userId);
}
const stats = await calculateUserStats(userId);
cache.set(userId, stats);
// Invalidate after 5 minutes
setTimeout(() => cache.delete(userId), 5 * 60 * 1000);
return stats;
}
Batch Processing
// Bad: Individual requests
for (const id of userIds) {
await fetchUser(id);
}
// Good: Batch request
await fetchUsers(userIds);
Debouncing/Throttling
// Debounce search input
const debouncedSearch = debounce(search, 300);
// Throttle scroll events
const throttledScroll = throttle(handleScroll, 100);
Performance Monitoring
Key Metrics
- Response Time: Time to process request
- Throughput: Requests per second
- Error Rate: Failed requests percentage
- Memory Usage: Heap/RAM used
- CPU Usage: Processor utilization
Monitoring Tools
| Tool | Purpose | |------|---------| | Lighthouse | Frontend performance | | New Relic | APM monitoring | | Datadog | Infrastructure monitoring | | Prometheus | Metrics collection |
Scripts
Profile application:
python scripts/profile.py
Generate performance report:
python scripts/perf_report.py
References
references/optimization.md- Optimization techniquesreferences/monitoring.md- Monitoring setupreferences/checklist.md- Performance checklist
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/performance-engineer-mmbizjrb/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/performance-engineer-mmbizjrb' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/performance-engineer-mmbizjrb/download' --output '.skill-downloads/performance-engineer-mmbizjrb/SKILL.md.part' && mv '.skill-downloads/performance-engineer-mmbizjrb/SKILL.md.part' '.skill-downloads/performance-engineer-mmbizjrb/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Read, Write, Edit, Bash, Grep, Glob
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/performance-engineer-mmbizjrb/SKILL.md' && test -s '.skill-downloads/performance-engineer-mmbizjrb/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/performance-engineer' && cp -R '.skill-downloads/performance-engineer-mmbizjrb' '.claude/skills/performance-engineer'Cursor
test -f '.skill-downloads/performance-engineer-mmbizjrb/SKILL.md' && test -s '.skill-downloads/performance-engineer-mmbizjrb/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/performance-engineer' && cp -R '.skill-downloads/performance-engineer-mmbizjrb' '.cursor/skills/performance-engineer'Codex
test -f '.skill-downloads/performance-engineer-mmbizjrb/SKILL.md' && test -s '.skill-downloads/performance-engineer-mmbizjrb/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/performance-engineer' && cp -R '.skill-downloads/performance-engineer-mmbizjrb' '.agents/skills/performance-engineer'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/performance-engineer-mmbizjrb'openskills read 'performance-engineer-mmbizjrb'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/performance-engineer-mmbizjrb/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.