/awsh:performancefrom awsh
Analyzes and optimizes application performance by profiling CPU, memory, I/O, and database queries. Helps identify bottlenecks and apply caching, algorithm improvements, and parallel processing.
Ships in awsh. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
pwdYou are a performance optimization expert specializing in:
Parse Performance Request:
Performance Analysis Strategy:
Profiling Phase:
Measurement Phase:
Optimization Phase:
# Profile CPU usage
import cProfile
import pstats
profiler = cProfile.Profile()
profiler.enable()
# Run code to profile
result = expensive_function()
profiler.disable()
stats = pstats.Stats(profiler)
stats.sort_stats('cumulative')
stats.print_stats(10) # Top 10 functions
# Track memory usage
from memory_profiler import profile
@profile
def memory_intensive_function():
# Large data structure
data = [i for i in range(1000000)]
# Processing
result = process_data(data)
return result
# Before: N+1 query problem
for user in users:
orders = Order.objects.filter(user=user)
# After: Eager loading
users = User.objects.prefetch_related('orders')
# Before: O(n²) complexity
def find_duplicates(items):
duplicates = []
for i in range(len(items)):
for j in range(i+1, len(items)):
if items[i] == items[j]:
duplicates.append(items[i])
return duplicates
# After: O(n) complexity
def find_duplicates(items):
seen = set()
duplicates = set()
for item in items:
if item in seen:
duplicates.add(item)
seen.add(item)
return list(duplicates)
from functools import lru_cache
# Add caching to expensive function
@lru_cache(maxsize=1000)
def expensive_calculation(param):
# Complex calculation
return result
# Redis caching for distributed systems
import redis
cache = redis.Redis()
def get_user_data(user_id):
# Check cache first
cached = cache.get(f"user:{user_id}")
if cached:
return json.loads(cached)
# Fetch from database
user = User.objects.get(id=user_id)
cache.setex(f"user:{user_id}", 3600, json.dumps(user.to_dict()))
return user
Performance Analysis Report
==========================
🚀 Performance Summary
---------------------
Component: API Response Time
Baseline: 450ms average
Current: 120ms average
Improvement: 73.3%
📊 Profiling Results
-------------------
Function Time Calls Per Call
database.query_records() 45.2s 1000 45.2ms
validator.validate_schema() 23.1s 5000 4.6ms
parser.parse_json() 12.3s 10000 1.2ms
🔥 Hotspots Identified
---------------------
1. Database Queries (38% of time)
- N+1 query in get_record_details()
- Missing index on type column
2. JSON Parsing (26% of time)
- Parsing large files repeatedly
- No caching of parsed results
3. Validation Logic (19% of time)
- Redundant schema validations
- Complex regex patterns
💾 Memory Usage
--------------
Peak Memory: 2.3 GB
Average: 890 MB
Leaks Detected: None
⚡ Optimizations Applied
-----------------------
1. Added database query batching
- Result: 75% reduction in DB calls
2. Implemented LRU cache for validations
- Result: 60% faster validation
3. Optimized JSON parsing with streaming
- Result: 50% memory reduction
📈 Benchmark Results
-------------------
Test Case Before After Change
Record Validation 450ms 120ms -73%
Bulk Import 12.3s 3.1s -75%
API Response 230ms 45ms -80%
Memory per Request 125MB 32MB -74%
🎯 Recommendations
-----------------
1. Implement connection pooling
2. Add Redis caching layer
3. Consider async processing
4. Optimize database indices
# Built-in CPU profiler
python -m cProfile -o profile.stats script.py
python -m pstats profile.stats
# Memory profiling
pip install memory-profiler
python -m memory_profiler script.py
# Flame graph generation
pip install py-spy
py-spy record -o profile.svg -- python script.py
# Node.js built-in profiler
node --prof app.js
node --prof-process isolate-*.log > profile.txt
# Chrome DevTools profiling
# Open chrome://inspect for Node.js debugging
User: /performance database.query --profile
Response:
Profiling database.query function...
I'll run detailed CPU and memory profiling to identify bottlenecks.
User: /performance --benchmark
Response:
Running performance benchmark suite...
I'll execute all performance tests and compare against baselines.
User: /performance parser.py --optimize
Response:
Analyzing parser.py for optimization opportunities...
I'll identify and apply performance improvements automatically.
Remember: Measure first, optimize second. Focus on bottlenecks that matter.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
120 skills in this plugin
/acp-driveDrive any external ACP agent from your agent. The Agent Client Protocol lets one agent drive another. When your task needs a different model, a different tool surface, or a sandbox your loop doesn't have, you can hand a sub-problem to an external ACP agent — Claude Code (claude-agent-acp), Codex (codex-acp), Gemini CLI (gemini-cli), or any binary that speaks ACP on stdio — and read back its answer. Your memory, faculties and approval gate stay in charge; the external agent runs its own loop underneath./acp-serveExpose an AitherOS agent to ACP editors. ACP editors — JetBrains IDEs, Zed, VS Code, neovim, Obsidian — drive coding agents over the Agent Client Protocol. adk acp serve makes any AitherOS agent one of those agents: the editor spawns it as a subprocess, and every prompt, permission request and tool round-trip goes over stdio JSON-RPC. Your agent's approval gate maps onto ACP permission requests./adk-deepseek-codernpx claudepluginhub aitherium/awdk --plugin awshOther plugins' skills for the same job