optimize

Analyze and improve performance metrics.

12 stars

Best use case

optimize is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Analyze and improve performance metrics.

Teams using optimize should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/optimize/SKILL.md --create-dirs "https://raw.githubusercontent.com/lionbenjamin/agent-templates/main/skills/optimize/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/optimize/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How optimize Compares

Feature / AgentoptimizeStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Analyze and improve performance metrics.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Optimize Skill

Performance analysis and optimization.

## When to Activate

This skill is relevant when:
- Performance improvements needed
- Bottlenecks identified
- Load time too slow
- Bundle size too large
- Query performance poor
- Resource usage high

## Core Principles

### Milliseconds Matter
- Every millisecond saved is a win
- Users notice speed differences
- Performance impacts UX
- Optimize critical paths
- Measure everything

### Efficiency
- O(n) is acceptable
- O(n^2) is a crime
- Choose right algorithms
- Minimize iterations
- Cache strategically

### Resource Usage
- Minimize memory footprint
- Reduce CPU cycles
- Optimize network calls
- Lazy load resources
- Bundle size matters

### Measure First
- Baseline before optimizing
- Benchmark current state
- Identify bottlenecks
- Verify improvements
- Compare before/after

## Quick Checks

For performance optimization, verify:
- [ ] Application is functional
- [ ] Baseline metrics captured
- [ ] Load time measured
- [ ] Execution time measured
- [ ] Bundle size measured
- [ ] Bottlenecks identified
- [ ] Database queries analyzed
- [ ] N+1 queries found
- [ ] Unnecessary re-renders found
- [ ] Large assets identified
- [ ] Optimizations applied
- [ ] Benchmarks re-run
- [ ] Improvements verified
- [ ] Before/after comparison documented
- [ ] No regressions introduced

## Optimization Targets

### Database
- Add missing indexes
- Optimize query structure
- Reduce query count
- Implement caching
- Avoid N+1 queries
- Use connection pooling

### Frontend
- Implement memoization
- Add lazy loading
- Optimize images
- Reduce re-renders
- Code splitting
- Virtual scrolling

### Backend
- Optimize algorithms
- Implement caching
- Reduce API calls
- Batch operations
- Async processing
- Resource pooling

### Bundle
- Tree-shake unused code
- Split code chunks
- Lazy load routes
- Optimize dependencies
- Remove duplicates
- Compress assets

## Performance Metrics

### Load Time
- Initial page load
- Time to interactive
- First contentful paint
- Largest contentful paint

### Execution Time
- API response time
- Query execution time
- Function execution time
- Render time

### Resource Usage
- Memory consumption
- CPU utilization
- Network bandwidth
- Bundle size
- Asset sizes

## Benchmarking

### Baseline
Measure current performance state

### Bottlenecks
Identify slowest operations

### Optimizations
Apply targeted improvements

### Verification
Confirm improvements with metrics

### Documentation
Record before vs after results

Related Skills

wireframe

12
from lionbenjamin/agent-templates

Create markdown wireframes with detailed UX descriptions from a product specification. Senior UX Designer perspective inspired by Notion and Linear.

ux_redesign

12
from lionbenjamin/agent-templates

Redesign a feature or page from a Principal UX Designer's perspective.

tech_review

12
from lionbenjamin/agent-templates

Senior Principal Engineer performing thorough technical review of implementation plans before development.

tasks

12
from lionbenjamin/agent-templates

Break down an approved implementation plan into specific, actionable tasks.

specify

12
from lionbenjamin/agent-templates

Create a product specification that defines what to build and why, without prescribing how.

skeptical_review

12
from lionbenjamin/agent-templates

Perform a critical, skeptical code review of the project from the perspective of a Principal Engineer.

security_agent

12
from lionbenjamin/agent-templates

Perform a full security review of the codebase (Node.js & React focus).

review_plan

12
from lionbenjamin/agent-templates

Review the technical implementation plan against the specification.

review_domain

12
from lionbenjamin/agent-templates

Perform a thorough architectural review of a domain model.

review_constitution

12
from lionbenjamin/agent-templates

Review and stress-test the technical constitution after /constitute.

retro

12
from lionbenjamin/agent-templates

Reflect on the completed feature, document lessons learned, and improve workflows.

release_gate

12
from lionbenjamin/agent-templates

Final Go/No-Go check and release preparation.