Senior Backend

Designs and implements backend systems including REST APIs, microservices, database architectures, authentication flows, and security hardening.

Development / Engineeringdevelopmentengineering
by AgentVoltv1.0.0Published 1y ago1 install
Free to sign up · every skill included with AgentVolt Pro

Before & after

Same prompt, same agent — the only difference is the skill.

PromptThis endpoint takes 4 seconds. Make it fast.
Beforegeneric AI agent
A 4-second endpoint usually points to a database issue. Here are the common culprits:

- **N+1 queries**: Loading related records in a loop instead of a single join
- **Missing indexes**: Check if your WHERE and JOIN columns are indexed
- **Over-fetching**: Selecting columns you don't need
- **No pagination**: Returning thousands of rows at once
- **Synchronous external calls**: Blocking on third-party APIs

I'd start by adding query logging to see how many queries the endpoint fires and how long each takes. Running EXPLAIN ANALYZE on the slow ones will show whether indexes are being used.

Can you share the endpoint code?
Afterwith Senior Backend
Measure before changing anything — four seconds has one dominant cause and
guessing costs more than instrumenting.

STEP 1 — WHERE THE TIME GOES
  Log query count + duration for one request. Three shapes, three fixes:
    Many fast queries (50+ under 5ms)  → N+1
    One slow query (3s+)               → missing index or bad plan
    Few queries, still slow            → it's not the DB. External call
                                         or serialization.

STEP 2 — IF IT'S THE QUERY
  EXPLAIN (ANALYZE, BUFFERS) SELECT ...

  Read it in this order:
    Seq Scan on a big table          → missing index
    rows= estimate far off actual    → stale stats, run ANALYZE
    Nested Loop over many rows       → planner chose wrong, usually stats
    high shared read= vs hit=        → not cached, may be an I/O problem

  Index for the actual predicate, composite in the order the query
  filters:
    CREATE INDEX CONCURRENTLY idx_orders_user_created
      ON orders (user_id, created_at DESC);

  CONCURRENTLY matters — a plain CREATE INDEX takes a write lock and
  turns your slow endpoint into a down endpoint.

STEP 3 — IF IT'S N+1
  Eager-load the relation. In an ORM that's one include; hand-rolled,
  it's one IN query plus a map. Confirm the query count actually
  dropped rather than assuming.

STEP 4 — IF IT'S NOT THE DB
  External call → move it off the request path or set an aggressive
  timeout with a fallback. A 4s p50 usually means a 30s p99 and no
  timeout at all.
  Serialization → check payload size before optimizing anything. 2MB of
  JSON is 2 seconds regardless of how fast the query was.

Paste EXPLAIN output and I'll read the plan.

About this skill


name: senior-backend description: Use when Designs and implements backend systems including REST APIs, microservices, database architectures, authentication flows, and security hardening.

Senior Backend

Designs and implements backend systems including REST APIs, microservices, database architectures, authentication flows, and security hardening. Use when the user asks to "design REST APIs", "optimize database queries", "implement authentication", "build microservices", "review backend code", "set up GraphQL", "handle database migrations", or "load test APIs". Covers Node.js/Express/Fastify development, PostgreSQL optimization, API security, and backend architecture patterns.

What you get

  • Public GitHub repo (alirezarezvani/claude-skills)
  • the senior-backend skill folder with SKILL.md. Part of a 337-skill / 30-agent / 70-command install.

Customize your output

  • Fork the repo and adapt the skill's instructions and references to your workflow.

Example output

Activates automatically when your request matches Senior Backend; chains with the other skills, agents, and commands in the collection.

Best for

Creators, builders, and teams using Claude Code.

SKILL.md preview

SKILL.md
---
name: senior-backend
description: Use when designing REST APIs, optimizing database queries, implementing authentication, building microservices, or reviewing backend code.
version: 1.0.0
category: Development / Engineering
author: AgentVolt
license: proprietary
tags:
  - development
  - engineering
---

# Senior Backend

Designs and implements backend systems — REST APIs, microservices, database architecture, authentication, and security hardening.

## When to use

… (sign up to view the full skill)
Sign up to view, copy, and install the full skill

More development skills

View all Development skills →