backend-latency-profiler-helper — Claude Code skill: install and use
backend-latency-profiler-helper tracks down slow API endpoints, lists likely causes, and puts the fixes in priority order.
MIT 275 installs ★ 64 updated 2026-01-12
npx skills add patricio0312rev/skills --skill backend-latency-profiler-helper -a claude-codeWhat backend-latency-profiler-helper does
The skill is a set of recipes for chasing latency in an API. It ships a request timer you can drop into an Express app: every call is timed, and anything past 1000 ms gets logged with the route, the method, the duration and the user id.
From there a SQL query pulls the ten worst endpoints of the last day out of request_logs, sorted by average time. A TypeScript type holds the per-endpoint findings — latency figure, candidate causes, and whether the fix ranks high, medium or low. The last piece is a markdown roadmap split into three weeks of checkboxes, from indexes and caching to service decomposition and a CDN.
One catch: the query expects a request_logs table with endpoint, duration_ms and created_at columns. Logs kept anywhere else mean rewriting the SQL before it returns anything.
What it helps with
- find endpoints that take longer than a second to answer
- rank routes by average and worst-case response time
- list plausible causes for one slow handler
- split performance work into quick wins and longer jobs
- log slow requests from an Express app
Example prompts for the agent
- Profile the backend and show me the ten slowest endpoints from the last day.
- Add request timing middleware that logs anything over 1000 ms with the route and method.
- Write a fix roadmap for
GET /api/users/:idwith priorities.
How to install backend-latency-profiler-helper
1Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill backend-latency-profiler-helper -a claude-code2Manually: put the files in place
~/.claude/skills/backend-latency-profiler-helper/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/backend-latency-profiler-helper/
1Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill backend-latency-profiler-helper -a codex2Manually: put the files in place
.agents/skills/backend-latency-profiler-helper/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill backend-latency-profiler-helper -a cursor2Manually: put the files in place
.cursor/skills/backend-latency-profiler-helper/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install patricio0312rev/skills performance/backend-latency-profiler-helper/SKILL.md2Manually: put the files in place
.github/skills/backend-latency-profiler-helper/SKILL.md1Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill backend-latency-profiler-helper -a gemini-cli2Platform CLI
gemini skills install https://github.com/patricio0312rev/skills --path performance/backend-latency-profiler-helperManually: put the files in place
.devin/skills/backend-latency-profiler-helper/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add patricio0312rev/skills --skill backend-latency-profiler-helper -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about backend-latency-profiler-helper
How to install backend-latency-profiler-helper in Claude Code?
Run npx skills add patricio0312rev/skills --skill backend-latency-profiler-helper -a claude-code, then the skill sits at ~/.claude/skills/backend-latency-profiler-helper/SKILL.md.
What does backend-latency-profiler-helper do?
It looks for slow API endpoints, suggests what might be causing the delay, and builds a week-by-week fix plan with a closing checklist.
Can I use it outside Claude?
Yes. There are install commands for Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode, each writing the skill into that tool's own skills folder.
Source text
SKILL.md · MIT
---
name: backend-latency-profiler-helper
description: Identifies API latency hotspots and bottlenecks with profiling tools, slow endpoint detection, suspected causes, and fix roadmap. Use for "latency profiling", "performance bottlenecks", "slow APIs", or "backend performance".
---
# Backend Latency Profiler Helper
Find and fix API performance bottlenecks.
## Slow Endpoint Detection
```typescript
// Middleware to track latency
app.use((req, res, next) => {
const start = Date.now();
res.on("finish", () => {
const duration = Date.now() - start;
if (duration > 1000) {
logger.warn(
{
endpoint: req.path,
method: req.method,
duration_ms: duration,
userId: req.user?.id,
},
"Slow request detected"
);
}
});
next();
});
```
## Top Slow Endpoints
```sql
-- Query from logs
SELECT
endpoint,
AVG(duration_ms) as avg_ms,
MAX(duration_ms) as max_ms,
COUNT(*) as requests
FROM request_logs
WHERE created_at > NOW() - INTERVAL '1 day'
GROUP BY endpoint
HAVING AVG(duration_ms) > 500
ORDER BY avg_ms DESC
LIMIT 10;
```
## Suspected Causes
```typescript
interface PerformanceBottleneck {
endpoint: string;
avgLatency: number;
suspectedCauses: string[];
fixPriority: "high" | "medium" | "low";
}
const bottlenecks: PerformanceBottleneck[] = [
{
endpoint: "GET /api/users/:id",
avgLatency: 2500,
suspectedCauses: [
"N+1 query fetching user orders",
"No database index on user_id",
"Expensive JSON serialization",
],
fixPriority: "high",
},
];
```
## Fix Roadmap
```markdown
# Performance Fix Roadmap
## Week 1: Quick Wins
- [ ] Add database indexes
- [ ] Enable response caching
- [ ] Fix N+1 queries
## Week 2: Medium Effort
- [ ] Optimize slow database queries
- [ ] Implement Redis caching
- [ ] Add connection pooling
## Week 3: Long-term
- [ ] Database query optimization
- [ ] Service decomposition
- [ ] CDN integration
```
## Output Checklist
- [ ] Slow endpoints identified
- [ ] Causes analyzed
- [ ] Fix roadmap created
- [ ] Monitoring configured
ENDFILE
© patricio0312rev · MIT · patricio0312rev/skills