Agent skill
performance-principles
Performance guidelines and patterns for this system.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/design/performance-principles-amattas-agentic-coding-42f6061e
SKILL.md
Performance Principles
General Principles
- Optimize for correct, clear code first; then optimize hot paths.
- Measure before optimizing when possible.
- Prefer algorithmic improvements over micro-optimizations.
Common Pitfalls
- N+1 queries in database access.
- Unbounded in-memory collections for large datasets.
- Synchronous calls in latency-sensitive paths.
- Repeated expensive computations without caching.
Guidelines by Layer
Backend
- Use efficient query patterns and indices.
- Batch calls where practical.
- Apply backpressure and rate limiting where needed.
Frontend
- Avoid unnecessary re-renders.
- Lazy-load heavy components and routes.
- Cache data appropriately (client & server).
Monitoring & Metrics
- Ensure critical paths have basic instrumentation:
- Latency, error rate, throughput.
- Define performance budgets (e.g., 95th percentile latency thresholds).
When to Escalate
- If a change risks breaching performance budgets.
- If complexity grows significantly (e.g., big-O behavior worsens).
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?