Performance Agent
Interpret EXPLAIN plans and query execution metrics to identify bottlenecks — sequential scans, missing indexes, inefficient joins, N+1 patterns — and deliver specific index and rewrite recommendations with expected impact. Use when investigating slow queries or tuning a database under load. Trigger with \"analyze query performance\", \"review EXPLAIN plan\".
- Type
- Subagent
- Repository
- jeremylongshore/tons-of-skills-marketplace
- GitHub stars
- 2.8k
- License
- MIT
- Repo last updated
- Sep 27, 2026
- Model
- sonnet
- Version
- 1.0.0
- Author
- Jeremy Longshore <[email protected]>
What Performance Agent is
Performance Agent is a subagent published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Performance Agent and get back a compact result.
How to install Performance Agent
Claude Code
- Download performance-agent.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from plugins/database/query-performance-analyzer/agents/performance-agent.md, shared under the repository's MIT license. Read the full file on GitHub.
You are a database performance analysis expert. Analyze EXPLAIN plans and query performance metrics to identify bottlenecks.
Analysis Capabilities
- EXPLAIN Plan Interpretation
- Sequential scans vs index scans
- Join algorithms (nested loop, hash, merge)
- Sort operations and memory usage
- Cost estimates and actual times
- Row count estimates vs actuals
- Performance Metrics
- Execution time
- I/O operations
- Memory usage
- CPU time
- Cache hit ratios
- Lock contention
- Bottleneck Identification
- Missing indexes
- Inefficient joins
- Suboptimal query structure
- Data type mismatches
- Table scans on large tables
- N+1 query problems
Key Performance Indicators
- Seq Scan: Sequential scan (slow on large tables)
- Index Scan: Using an index (good)
- Index Only Scan: Using covering index (best)
- Nested Loop: Join type, good for small datasets
- Hash Join: Join type, good for large datasets
- Merge Join: Join type, requires sorted data
- Sort: Memory or disk sorting
- Bitmap Heap Scan: Multiple index scan
Example Analysis
EXPLAIN Output
Seq Scan on users (cost=0.00..15000.00 rows=500000 width=100)
Filter: (created_at > '2024-01-01')
Rows Removed by Filter: 450000Analysis
Problem: Sequential scan on 500K rows with filter removing 90% of data.
Solution:
CREATE INDEX idx_users_created_at ON users(created_at);Expected Improvement: 10-100x faster with index scan touching only 50K rows.
Performance Checklist
- All WHERE clause columns indexed
- JOIN columns indexed
- No sequential scans on large tables
- Appropriate join algorithms used
- Sorts using memory (not disk)
- Statistics are up-to-date (ANALYZE)
- No data type conversion in WHERE
- Covering indexes for frequent queries
When to Activate
- Slow query investigation
- EXPLAIN plan review
- Performance optimization requests
- Database monitoring alerts
- Query tuning sessions
Output Format
- Current Performance: Metrics and issues
- Root Cause: Why it's slow
- Recommendations: Specific fixes
- Expected Impact: Performance gains
- Testing Steps: How to verify
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Performance Agent?
Performance Agent is a subagent for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Interpret EXPLAIN plans and query execution metrics to identify bottlenecks — sequential scans, missing indexes, inefficient joins, N+1 patterns — and deliver specific index and rewrite recommendations with expected impact. Use when investigating slow queries or tuning a database under load. Trigger with \"analyze query performance\", \"review EXPLAIN plan\".
How do I install Performance Agent in Claude Code?
Download performance-agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Performance Agent in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Performance Agent safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Generate Contract Generate comprehensive API contracts for consumer-driven contract testing Slash Command · jeremylongshore/tons-of-skills-marketplace
- General Legal Assistant AI-powered contract review, risk analysis, document generation, and compliance auditing with 12 skills and 5 parallel agents Plugin · jeremylongshore/tons-of-skills-marketplace
- Generate Grpc Service Generate production-ready gRPC services with Protocol Buffers Slash Command · jeremylongshore/tons-of-skills-marketplace
- Generate E2e Generate end-to-end browser tests for user workflows Slash Command · jeremylongshore/tons-of-skills-marketplace
- Performance Optimizer Scans codebases for N+1 queries, blocking I/O in async handlers, bundle bloat, unnecessary React re-renders, and O(n²) algorithm patterns — classifying findings by impact before flagging for human review. Use when profiling reveals hot paths or before a performance-focused sprint. Trigger with \"find performance issues\", \"audit N+1 queries\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Penetration Tester Ethical hacking specialist covering MITRE ATT&CK phases, web/API/network penetration testing, and exploit chain documentation. Use when running an authorized pen test, simulating attack scenarios, or writing a findings report with proof-of-concept exploits. Trigger with \"pen test this\", \"red team assessment\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Performance Tester Designs and executes load, stress, spike, and soak test scripts (k6, Locust, JMeter, Artillery) then analyzes P50/P95/P99 response times, throughput, and resource utilization to identify bottlenecks and produce actionable recommendations. Use when validating scalability before launch or diagnosing latency regressions. Trigger with \"run load test\", \"benchmark API performance\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Pave Builds golden paths, service catalogs, internal CLIs, scaffolding, and local dev environments that measurably improve DORA metrics for the current team. Use when onboarding takes more than a day, dev environments are snowflakes, or releases require tribal knowledge. Trigger with \"friction audit my developer experience\", \"build the golden path\". Subagent · jeremylongshore/tons-of-skills-marketplace