Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add patricio0312rev/skills --skill backend-latency-profiler-helper -a claude-code
Open on GitHub

What 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/:id with priorities.

How to install backend-latency-profiler-helper

1Skills CLI (Vercel)

npx skills add patricio0312rev/skills --skill backend-latency-profiler-helper -a claude-code

2Manually: put the files in place

~/.claude/skills/backend-latency-profiler-helper/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/backend-latency-profiler-helper/

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

Similar skills

All skills for Backend and APIs →

From the same set148

The whole set →
security-pr-checklist-skill security-pr-checklist-skill builds a repeatable security checklist for pull requests. Use it to structure code reviews, required checks, and CI security gates. CX Codex +1 276installs design-to-component-translator The design-to-component-translator skill turns Figma specs into React components with design tokens, responsive rules, and interaction states for implementing designs in code. CX Codex +1 276installs secrets-env-manager secrets-env-manager validates environment variables in CI workflows, enforces secret masking, and catches leaked keys early. CX Codex +1 276installs evaluation-harness evaluation-harness — a skill for Claude Code and five other agent platforms that sets up repeatable LLM evaluation: golden datasets, scoring rubrics, pass/fail thresholds, and regression reports. CX Codex +1 275installs rbac-policy-tester rbac-policy-tester generates role permission matrices and automated authorization test suites to catch RBAC regressions in CI. CX Codex +1 274installs etl-sync-job-builder etl-sync-job-builder generates TypeScript ETL pipelines with incremental watermark tracking, idempotent batch upserts, and retry backoff logic. CX Codex +1 274installs structured-logging-standardizer structured-logging-standardizer sets up structured JSON logging with request correlation IDs using AsyncLocalStorage and pino. Keeps backend logs queryable and connected. CX Codex +1 273installs data-retention-archiving-planner data-retention-archiving-planner plans data retention policies, maps compliance requirements, and automates cold storage migration for databases. CX Codex +1 273installs

Project sponsors

Companies that keep this analytics open