Skip to content
Back to skills

Optimization

ASecurity

Identifies performance bottlenecks and recommends optimization strategies.

  • 5 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added June 6, 2026
ai-agentsgodatabasefrontendperformance

Security analysis

A100/100

Scanned June 6, 2026

npx -y skills add nxtg-ai/forge-plugin --skill optimization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Optimization?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Optimization
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nxtg-ai-optimization/badge)](https://www.skillsdirectory.com/skills/nxtg-ai-optimization)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Optimization
description: Identifies performance bottlenecks and recommends optimization strategies.
---

# Performance Optimization Skill

Expert techniques for optimizing code performance and efficiency.

## Performance Analysis

### Measurement First
- **Profile Before Optimizing**: Never guess, always measure
- **Identify Bottlenecks**: Focus on the slowest parts
- **Set Performance Budgets**: Define acceptable limits
- **Monitor Continuously**: Track metrics over time

### Key Metrics
- Response time
- Throughput
- Memory usage
- CPU utilization
- Network I/O
- Disk I/O

## Optimization Strategies

### Algorithm Optimization
- Choose optimal data structures
- Reduce time complexity
- Minimize space complexity
- Use caching strategically
- Implement lazy evaluation

### Database Optimization
- **Query Optimization**
  - Use indexes effectively
  - Avoid N+1 queries
  - Batch operations
  - Use query explain plans

- **Schema Design**
  - Normalize appropriately
  - Denormalize for performance
  - Partition large tables
  - Archive old data

### Code-Level Optimization
- **Memory Management**
  - Prevent memory leaks
  - Use object pooling
  - Optimize data structures
  - Reduce allocations

- **Concurrency**
  - Parallel processing
  - Async operations
  - Thread pooling
  - Lock-free algorithms

### Frontend Optimization
- **Loading Performance**
  - Code splitting
  - Lazy loading
  - Bundle optimization
  - CDN usage

- **Runtime Performance**
  - Virtual scrolling
  - Debouncing/throttling
  - Web Workers
  - RequestAnimationFrame

## Caching Strategies

### Cache Levels
1. **Browser Cache**: HTTP headers, service workers
2. **CDN Cache**: Edge locations
3. **Application Cache**: In-memory, Redis
4. **Database Cache**: Query cache

### Cache Patterns
- Cache-aside
- Read-through
- Write-through
- Write-behind
- Refresh-ahead

## Network Optimization

- Minimize requests
- Compress payloads
- Use HTTP/2
- Implement pagination
- GraphQL for efficient queries

## Common Bottlenecks

### CPU Bound
- Inefficient algorithms
- Unnecessary computations
- Missing indexes
- Regex complexity

### Memory Bound
- Memory leaks
- Large objects
- Inefficient data structures
- Missing pagination

### I/O Bound
- Synchronous operations
- Missing caching
- Inefficient queries
- Network latency

## Optimization Workflow

1. **Establish Baseline**: Measure current performance
2. **Set Goals**: Define target metrics
3. **Profile**: Identify bottlenecks
4. **Optimize**: Apply targeted improvements
5. **Validate**: Measure improvements
6. **Monitor**: Track over time

Remember: Premature optimization is the root of all evil. Optimize what matters.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…