administering-linux
Manage Linux systems covering systemd services, process management, filesystems, networking, performance tuning, and troubleshooting. Use when deploying…
When validating system performance under load, identifying bottlenecks through profiling, or optimizing application responsiveness. Covers load testing (k6, Locust), profiling (CPU, memory, I/O), and optimization strategies (caching, query optimization, Core Web Vitals). Use for
$ npx -y skills add ancoleman/ai-design-components --skill performance-engineering --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/performance-engineeringContext preview
The summary Claude sees to decide when to auto-load this skill.
When validating system performance under load, identifying bottlenecks through profiling, or optimizing application responsiveness. Covers load testing (k6, Locust), profiling (CPU, memory, I/O), and optimization strategies (caching, query optimization, Core Web Vitals). Use for
name: performance-engineering description: When validating system performance under load, identifying bottlenecks through profiling, or optimizing application responsiveness. Covers load testing (k6, Locust), profiling (CPU, memory, I/O), and optimization strategies (caching, query optimization, Core Web Vitals). Use for capacity planning, regression detection, and establishing performance SLOs.
Performance engineering encompasses load testing, profiling, and optimization to deliver reliable, scalable systems. This skill provides frameworks for choosing the right performance testing approach (load, stress, soak, spike), profiling techniques to identify bottlenecks (CPU, memory, I/O), and optimization strategies for backend APIs, databases, and frontend applications.
Use this skill to validate system capacity before launch, detect performance regressions in CI/CD pipelines, identify and resolve bottlenecks through profiling, and optimize application responsiveness across the stack.
**Common Triggers:**
**Use Cases:**
Validate system behavior under expected traffic levels.
**When to use:** Pre-launch capacity planning, regression testing after refactors, validating auto-scaling.
Find system capacity limits and failure modes.
**When to use:** Capacity planning, understanding failure behavior, infrastructure sizing decisions.
Identify memory leaks, resource exhaustion, and degradation over time.
**When to use:** Detecting memory leaks, validating connection pool cleanup, testing long-running batch jobs.
Validate system response to sudden traffic spikes.
**When to use:** Validating auto-scaling, testing event-driven systems (product launches), ensuring rate limiting works.
**Which test type to use?**
What am I trying to learn? ├─ Can my system handle expected traffic? → LOAD TEST ├─ What's the maximum capacity? → STRESS TEST ├─ Will it stay stable over time? → SOAK TEST └─ Can it handle traffic spikes? → SPIKE TEST
For detailed testing patterns, load scenarios, and interpreting results, see `references/testing-types.md`.
**Installation:**
brew install k6 # macOS sudo apt-get install k6 # Linux
**Basic Load Test:**
import http from 'k6/http';
import { check, sleep } from 'k6';
export const options = {
stages: [
{ duration: '30s', target: 20 },
{ duration: '1m', target: 20 },
{ duration: '30s', target: 0 },
],
thresholds: {
http_req_duration: ['p(95)<500'],
http_req_failed: ['rate<0.01'],
},
};
export default function () {
const res = http.get('https://api.example.com/products');
check(res, {
'status is 200': (r) => r.status === 200,
});
sleep(1);
}**Run:** `k6 run script.js`
For stress, soak, and spike testing examples, see `examples/k6/`.
**Installation:**
pip install locust
**Basic Load Test:**
from locust import HttpUser, task, between
class WebsiteUser(HttpUser):
wait_time = between(1, 3)
host = "https://api.example.com"
@task(3)
def view_products(self):
self.client.get("/products")
@task(1)
def view_product_detail(self):
self.client.get("/products/123")**Run:** `locust -f locustfile.py --headless -u 100 -r 10 --run-time 10m`
For REST API testing and data-driven testing, see `examples/locust/`.
| Symptom | Profiling Type | Tool | |---------|----------------|------| | High CPU (>70%) | CPU Profiling | py-spy, pprof, DevTools | | Memory growing | Memory Profiling | memory_profiler, pprof heap | | Slow response, low CPU | I/O Profiling | Query logs, pprof block |
**py-spy (Production-Safe):**
pip install py-spy # Profile running process py-spy record -o profile.svg --pid <PID> --duration 30 # Top-like view py-spy top --pid <PID>
**Memory Profiling:**
from memory_profiler import profile
@profile
def my_function():
a = [1] * (10 ** 6)
return a
# Run: python -m memory_profiler script.py**pprof (Built-in):**
import (
"net/http"
_ "net/http/pprof"
)
func main() {
go func() {
http.ListenAndServe("localhost:6060", nil)
}()
startApp()
}**Capture profile:**
# CPU profile (30 seconds) go tool pprof http://localhost:6060/debug/pprof/profile?seconds=30 # Interactive analysis (pprof) top (pprof) web
**Chrome DevTools (Browser/Node.js):**
Node.js:
node --inspect app.js # Open chrome://inspect # Performance tab → Record
**clinic.js (Node.js):**
npm install -g clinic clinic doctor -- node app.js
For detailed profiling workflows and analysis, see `references/profiling-guide.md` and `examples/profiling/`.
**When to cache:**
**Redis example:**
import redis
r = redis.Redis()
def get_cached_data(key, fn, ttl=300):
cached = r.get(key)
if cached:
returnComprehensive UI/UX and Backend component design skills for AI-assisted development with Claude
Repo: ancoleman/ai-design-components
Manage Linux systems covering systemd services, process management, filesystems, networking, performance tuning, and troubleshooting. Use when deploying…
Data pipelines, feature stores, and embedding generation for AI/ML systems. Use when building RAG pipelines, ML feature serving, or data transformations.…
Strategic guidance for designing modern data platforms, covering storage paradigms (data lake, warehouse, lakehouse), modeling approaches (dimensional,…
Design cloud network architectures with VPC patterns, subnet strategies, zero trust principles, and hybrid connectivity. Use when planning VPC topology,…
Design comprehensive security architectures using defense-in-depth, zero trust principles, threat modeling (STRIDE, PASTA), and control frameworks (NIST CSF,…
Assembles component outputs from AI Design Components skills into unified, production-ready component systems with validated token integration, proper import…