Back to Skills

performance

verified

Target P99 latency in milliseconds

View on GitHub

Marketplace

pluginagentmarketplace-backend

pluginagentmarketplace/custom-plugin-backend

Plugin

backend-development-assistant

Repository

pluginagentmarketplace/custom-plugin-backend
1stars

skills/performance/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/pluginagentmarketplace/custom-plugin-backend/blob/main/skills/performance/SKILL.md -a claude-code --skill performance

Installation paths:

Claude
.claude/skills/performance/
Powered by add-skill CLI

Instructions

# Performance Optimization Skill

**Bonded to:** `caching-performance-agent`

---

## Quick Start

```bash
# Invoke performance skill
"My API is slow, help me optimize it"
"Set up Redis caching for my application"
"Configure load balancing for high availability"
```

---

## Instructions

1. **Identify Bottlenecks**: Profile application, analyze metrics
2. **Choose Strategy**: Select caching, scaling, or optimization approach
3. **Implement Cache**: Set up Redis/Memcached with appropriate pattern
4. **Configure Scaling**: Horizontal or vertical based on needs
5. **Monitor Results**: Set up APM and track improvements

---

## Caching Patterns

| Pattern | Use Case | Consistency | Complexity |
|---------|----------|-------------|------------|
| Cache-Aside | Read-heavy, tolerates stale | Eventual | Low |
| Write-Through | Write-heavy, needs consistency | Strong | Medium |
| Write-Behind | High throughput writes | Eventual | High |
| Refresh-Ahead | Predictable access | Strong | Medium |

---

## Decision Tree

```
Performance Issue?
    │
    ├─→ High latency → Check database queries
    │     ├─→ Slow queries → Add indexes, optimize SQL
    │     └─→ Network → Add caching, reduce round-trips
    │
    ├─→ High CPU → Profile code
    │     ├─→ Algorithmic → Optimize algorithms
    │     └─→ Too much load → Scale horizontally
    │
    └─→ Memory issues → Analyze memory usage
          ├─→ Leaks → Find and fix leaks
          └─→ Large data → Implement pagination, streaming
```

---

## Examples

### Example 1: Redis Cache-Aside
```python
import redis
import json
from functools import wraps

r = redis.Redis(host='localhost', port=6379, decode_responses=True)

def cache(ttl_seconds=3600):
    def decorator(func):
        @wraps(func)
        def wrapper(*args, **kwargs):
            cache_key = f"{func.__name__}:{args}:{kwargs}"
            cached = r.get(cache_key)
            if cached:
                return json.loads(cached)

            result = func(*args, **kwar

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
4453 chars