/profile-api
Profile an API endpoint to identify performance bottlenecks and optimization opportunities.
$ npx -y skills add rohitg00/awesome-claude-code-toolkit --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/profile-api
Context preview
What this command does when you run it.
Profile an API endpoint to identify performance bottlenecks and optimization opportunities.
Command definition
profile-api.mdname: profile-api
description: Profile an API endpoint to identify performance bottlenecks and optimization opportunities.
Profile an API endpoint to identify performance bottlenecks and optimization opportunities.
Steps
1. Identify the target endpoint (URL, method, and payload). 2. Analyze the handler code path:
- Map all database queries executed per request.
- Identify external API calls and their expected latency.
- Check for synchronous blocking operations.
- Look for N+1 query patterns.
3. Measure baseline performance:
- Send sample requests and measure response time.
- Check memory allocation during request handling.
- Identify the slowest operations in the call chain.
4. Check for common performance issues:
- Missing database indexes for frequently queried columns.
- Unbounded result sets without pagination.
- Redundant data fetching (loading full objects when only IDs needed).
- Missing caching for expensive computations.
- Large response payloads without compression.
5. Suggest optimizations ranked by expected impact:
- Add database indexes.
- Implement caching layer.
- Batch database queries.
- Add pagination.
- Enable response compression.
6. Estimate performance improvement for each suggestion.
Format
Profile: <METHOD> <endpoint>
Baseline: <response time>ms (P50), <P99>ms (P99)
Bottlenecks:
1. [HIGH] <description> - estimated <N>ms savings
2. [MEDIUM] <description> - estimated <N>ms savings
Optimizations:
1. <specific action to take>
2. <specific action to take>
Expected improvement: <N>% faster response time
Rules
- Profile with realistic data volumes, not empty databases.
- Measure P50, P95, and P99 latencies, not just averages.
- Identify the single biggest bottleneck before suggesting broad optimizations.
- Never suggest premature optimization for endpoints under 100ms.
- Consider read vs write path optimizations separately.
Read more
name: profile-api description: Profile an API endpoint to identify performance bottlenecks and optimization opportunities.
Profile an API endpoint to identify performance bottlenecks and optimization opportunities.
Steps
1. Identify the target endpoint (URL, method, and payload). 2. Analyze the handler code path:
- Map all database queries executed per request.
- Identify external API calls and their expected latency.
- Check for synchronous blocking operations.
- Look for N+1 query patterns.
3. Measure baseline performance:
- Send sample requests and measure response time.
- Check memory allocation during request handling.
- Identify the slowest operations in the call chain.
4. Check for common performance issues:
- Missing database indexes for frequently queried columns.
- Unbounded result sets without pagination.
- Redundant data fetching (loading full objects when only IDs needed).
- Missing caching for expensive computations.
- Large response payloads without compression.
5. Suggest optimizations ranked by expected impact:
- Add database indexes.
- Implement caching layer.
- Batch database queries.
- Add pagination.
- Enable response compression.
6. Estimate performance improvement for each suggestion.
Format
Profile: <METHOD> <endpoint> Baseline: <response time>ms (P50), <P99>ms (P99) Bottlenecks: 1. [HIGH] <description> - estimated <N>ms savings 2. [MEDIUM] <description> - estimated <N>ms savings Optimizations: 1. <specific action to take> 2. <specific action to take> Expected improvement: <N>% faster response time
Rules
- Profile with realistic data volumes, not empty databases.
- Measure P50, P95, and P99 latencies, not just averages.
- Identify the single biggest bottleneck before suggesting broad optimizations.
- Never suggest premature optimization for endpoints under 100ms.
- Consider read vs write path optimizations separately.
The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills (+400,000 via SkillKit), 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 15 MCP configs, 26 companion apps, 53 ecosystem entries, and more.
Repo: rohitg00/awesome-claude-code-toolkit
Other commands on rohitg00-claude-code-toolkit.
- /adr
Write an Architecture Decision Record documenting a significant technical decision.
Open command - /design-review
Conduct a structured design review of a module, feature, or system component.
Open command - /diagram
Generate Mermaid diagrams from codebase analysis or description.
Open command - /migrate
Plan and execute a framework or library migration incrementally.
Open command - /plan
Create a structured implementation plan for the requested feature or change.
Open command - /refactor
Perform a systematic refactoring of the specified code area.
Open command

