Skip to content
senior-backend logo

Senior Backend Engineer

senior-backend

This skill should be used 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".

SKILL.md

Full skill instructions

Senior Backend Engineer

Backend development patterns, API design, database optimization, and security practices for any language or framework.


Step 1: Detect the Stack

Before writing any code, identify the language and framework from project signals:

Signal file / patternStack
package.json with express/​fastify/​hono/​koaNode.js
package.json with nestNestJS
go.modGo
Cargo.tomlRust
pyproject.toml / requirements.txt + FastAPI/​Django/​FlaskPython
pom.xml / build.gradleJava/​Spring
*.csproj / Program.cs.NET/​C#
mix.exsElixir/​Phoenix
Gemfile with rails/​sinatraRuby

Check: ls -la, cat package.json, cat go.mod, cat pyproject.toml — whichever exists.


Step 2: Research Current Practices

Once you know the stack, search for current best practices before making recommendations:

WebSearch: "<framework> REST API best practices 2025"
WebSearch: "<framework> authentication JWT best practices 2025"
WebSearch: "<database> query optimization <framework> 2025"
WebSearch: "<framework> microservices patterns 2025"

Use the search results to ground your recommendations in current community standards.


Step 3: Universal Backend Principles

These apply regardless of language or framework.

API Design

  • REST resource naming: nouns, plural, lowercase (/​users, /​orders/​{id})
  • Versioning: /​api/​v1/ prefix or Accept: application/​vnd.api+json;version=1 header
  • Status codes: 200 OK, 201 Created, 204 No Content, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 409 Conflict, 422 Unprocessable Entity, 429 Too Many Requests, 500 Internal Server Error
  • Pagination: cursor-based for large/​changing datasets, offset-based for small/​stable ones
  • Idempotency: PUT and DELETE must be idempotent; POST uses idempotency keys for critical operations
  • Error shape: consistent { error: { code, message, details } } across all endpoints

Database

  • N+1 prevention: use eager loading / joins — never query in a loop
  • Index strategy: index foreign keys, columns in WHERE/​ORDER BY/​GROUP BY; composite indexes for multi-column filters
  • Transactions: wrap multi-step mutations; use the lowest isolation level that preserves correctness
  • Migrations: always reversible (up + down); never drop columns in same deploy as code change
  • Connection pooling: always use a pool; size = (2 x CPU cores) + effective spindle count as starting point

Authentication and Authorization

  • Password storage: bcrypt/​argon2/​scrypt — never MD5, SHA1, or plain SHA256
  • JWT: short-lived access tokens (15m), long-lived refresh tokens (7d) stored httpOnly cookie; validate alg, iss, aud, exp
  • Session tokens: cryptographically random, 128+ bits, stored server-side
  • RBAC: check permissions at the service layer, not just the route layer
  • Rate limiting: per-user and per-IP on auth endpoints; exponential backoff on failures

Error Handling

  • Never swallow errors: log with context (user ID, request ID, stack trace)
  • Distinguish errors: validation (400), auth (401/​403), not found (404), conflict (409), server (500)
  • Structured logging: JSON logs with level, timestamp, requestId, userId, message, error
  • Circuit breakers: wrap external service calls; fail fast when downstream is degraded

Security

  • Input validation: validate at the boundary — type, range, format, length
  • SQL injection: always use parameterized queries / prepared statements
  • Command injection: never interpolate user input into shell commands
  • CORS: explicit allowlist — never * in production for credentialed requests
  • Secrets: environment variables or secret manager — never hardcoded, never in version control
  • Dependencies: audit regularly (npm audit, cargo audit, pip-audit, govulncheck)

Performance

  • Caching strategy: cache at the right layer (CDN -> reverse proxy -> app -> DB); set explicit TTLs and cache-control headers
  • Async processing: move slow work (email, image processing, reports) to a queue
  • Payload size: paginate large responses; use field selection (GraphQL) or sparse fieldsets (JSON:API)
  • Database reads: read replicas for reporting queries; connection pooling for all queries

Review Checklist

Before any backend PR:

  • All inputs validated and sanitized at the boundary
  • Auth checked — correct user can do this, others cannot
  • N+1 queries absent — checked with query logging or explain
  • Error paths return correct status codes and structured errors
  • Secrets in env vars, not source
  • DB migrations are reversible
  • Logging includes requestId and userId for traceability
  • Rate limiting on public/​auth endpoints
  • No shell command injection surface
  • Dependencies pinned and audited

More skills from diegosouzapw

accessibility logo
diegosouzapw/awesome-omni-skill

accessibility

Accessibility guidelines for VS Code features — covers accessibility help dialogs, accessible views, verbosity settings, accessibility signals, ARIA alerts/status announcements, keyboard navigation, and ARIA labels/roles. Applies to both new interactive UI surfaces and updates to existing feature...

62 1
View
mermaid-diagrams logo
diegosouzapw/awesome-omni-skill

mermaid-diagrams

Mermaid diagram creation for flowcharts, sequences, ERDs, and more. Generate diagrams from text in markdown files. Use for documentation, architecture diagrams, and visual representations. Triggers on mermaid, flowchart, sequence diagram, ERD, entity relationship, gantt chart, pie chart, class di...

62 1
View
tauri2-react-rust logo
diegosouzapw/awesome-omni-skill

tauri2-react-rust

Guides development of cross-platform desktop apps with Tauri 2, TypeScript, React, and Rust. Use when building Tauri apps, implementing IPC, designing Rust backend or TypeScript/React frontend, when researching or cloning a website (open site, snapshot elements), when verifying local dev or built...

62 1
View
fp-ts-errors logo
diegosouzapw/awesome-omni-skill

fp-ts-errors

Handle errors as values using fp-ts Either and TaskEither for cleaner, more predictable TypeScript code. Use when implementing error handling patterns with fp-ts.

62 0
View
ring:pre-dev-research logo
diegosouzapw/awesome-omni-skill

ring:pre-dev-research

Gate 0 research phase for pre-dev workflow. Dispatches 3 parallel research agents to gather codebase patterns, external best practices, and framework documentation BEFORE creating PRD/TRD. Outputs research.md with file:line references.

62 0
View
create-assistant logo
diegosouzapw/awesome-omni-skill

create-assistant

Create and configure Vapi voice AI assistants with models, voices, transcribers, tools, hooks, and advanced settings. Use when building voice agents, phone bots, customer support assistants, or any conversational AI that handles phone or web calls.

62 0
View
codex-headless logo
diegosouzapw/awesome-omni-skill

codex-headless

Delegiere Aufgaben an OpenAI Codex CLI im Headless-Mode. Nutzt ChatGPT Subscription (KEIN API Key). Nur Workspace-Zugriff, KEIN System-Zugriff. Auto-Accept mit --full-auto. Web-Recherche mit --search.

62 0
View
social-media-scheduler logo
diegosouzapw/awesome-omni-skill

social-media-scheduler

Generate a full week of social media content for any topic. Outputs platform-optimized posts for Twitter/X, LinkedIn, and Instagram with hashtags and posting times.

62 0
View
Data Privacy Compliance logo
diegosouzapw/awesome-omni-skill

Data Privacy Compliance

Data privacy and regulatory compliance specialist for GDPR, CCPA, HIPAA, and international data protection laws. Use when implementing privacy controls, conducting data protection impact assessments, ensuring regulatory compliance, or managing data subject rights. Expert in consent management, da...

62 0
View
triple-review logo
diegosouzapw/awesome-omni-skill

triple-review

Reviews a task using the TRIPLE protocol, as the review agent.

62 0
View
Tech Stack & Architecture Decision logo
diegosouzapw/awesome-omni-skill

Tech Stack & Architecture Decision

Define and document the technology stack and architecture decisions for a project. Use when the user needs to choose a tech stack, make architecture decisions, define infrastructure choices, or document technology selections. Triggers on requests like "define the tech stack", "choose technologies...

62 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View