Skillquality 0.46

code-perf

Performance profiling and optimization. Use when code is slow, has memory issues, or needs optimization. Triggers on "slow", "performance", "optimize", "memory leak", "profiling", "bottleneck", or any performance-related concern.

Price
free
Protocol
skill
Verified
no

What it does

Code Perf

Performance profiling and optimization workflow.

The Golden Rule

Never optimize without profiling.

You don't know where the bottleneck is until you measure. Making changes without profiling wastes time and often makes things worse.


Workflow

1. Profile

Measure the current performance.

Questions:

  • What's slow? (endpoint, operation, page load)
  • How slow? (latency, throughput)
  • Under what conditions? (load, data size)

Tools:

  • Browser DevTools (Performance tab)
  • Node clinic.js
  • Python cProfile
  • Go pprof

2. Identify

Find the hot paths.

Look for:

  • Functions called many times
  • Large memory allocations
  • Blocking I/O
  • Unnecessary computations

3. Optimize

Apply the right optimization pattern.

4. Verify

Re-profile to confirm improvement.


Common Bottlenecks

See references/common-bottlenecks.md for detailed patterns:

PatternSymptomSolution
N+1Multiple DB queriesEager load, batch
Memory leakGrowing RSSClear caches, weak refs
Blocking I/OThread blockedAsync, worker pool
Unnecessary workCPU highSkip redundant calc
Large dataSlow serializationPagination, streams

Optimization Patterns

See references/optimization-patterns.md for:

Caching

// Before: every call hits DB
const user = await db.users.find(id);

// After: cache
const cacheKey = `user:${id}`;
let user = await redis.get(cacheKey);
if (!user) {
  user = await db.users.find(id);
  await redis.set(cacheKey, user, 'EX', 300);
}

Lazy Loading

// Before: load everything
const allUsers = await db.users.findMany();

// After: paginate
const users = await db.users.findMany({
  take: 20,
  skip: page * 20
});

Connection Pooling

// Before: new connection each time
const client = new Client();
await client.connect();

// After: pool
const pool = new Pool({ max: 20 });
// Use pool.query() throughout

Profiling Tools

See references/profiling-tools.md for:

Node.js

# CPU profiling
node --prof app.js

# Memory
node --inspect app.js  # Chrome DevTools

# clinic.js
npx clinic doctor -- node app.js

Python

# cProfile
python -m cProfile -o profile.prof app.py

# view with: python -m cProfile -s cumulative app.py

Go

# pprof
go test -cpuprofile=cpu.prof
go tool pprof cpu.prof

# Web interface
go tool pprof -http=:8080 cpu.prof

Skill Loading

  • If optimization involves queries → load python-sqlalchemy or typescript-drizzle-orm
  • If memory issues → load for heap snapshots
  • If database → load appropriate database skill

Capabilities

skillsource-martinffxskill-code-perftopic-agent-skillstopic-agentic-codingtopic-anthropictopic-claude-codetopic-claude-skillstopic-code-reviewtopic-codextopic-codex-skilltopic-opencodetopic-prompt-engineeringtopic-sddtopic-spec-driven-development

Install

Installnpx skills add martinffx/atelier
Transportskills-sh
Protocolskill

Quality

0.46/ 1.00

deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 23 github stars · SKILL.md body (2,712 chars)

Provenance

Indexed fromgithub
Enriched2026-05-18 19:05:22Z · deterministic:skill-github:v1 · v1
First seen2026-05-10
Last seen2026-05-18

Agent access