Senior Backend Engineer
Scaffold and review backend services: API design and OpenAPI-driven code generation for Express/Fastify/Koa, PostgreSQL schema analysis and migration generation, HTTP load testing, and production security hardening. Outputs ready-to-run route handlers, Zod validators, TypeScript types, migrations with rollbacks, and load-test reports.
Core Capabilities
- API scaffolding — generate route handlers, validation middleware, TypeScript types, and OpenAPI specs across Express, Fastify, and Koa.
- Database optimization — schema analysis, missing-index detection, N+1 risk detection, and migration generation with paired rollback scripts.
- Load testing — configurable concurrency with latency percentiles (P50/P90/P95/P99), throughput, error rates, and endpoint comparison.
- Security hardening — JWT config, rate limiting, input validation (Zod), and security headers (helmet) for production readiness.
- Standardized contracts — consistent
data/error/meta response envelope and HTTP status conventions.
When to Use
- Designing a new API or refactoring existing endpoints.
- Slow queries or database performance needs improvement.
- Preparing an API for production or after a security review.
- Building regression/load-test baselines for backend endpoints.
Clarify First
Before scaffolding, confirm these inputs. If any is unknown or vague, ASK — do not assume:
Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.
Tools
| Tool |
Purpose |
Command |
api_scaffolder.py |
Generate route handlers, Zod validators, and TS types from an OpenAPI spec |
python scripts/api_scaffolder.py openapi.yaml --framework express --output src/routes/ |
database_migration_tool.py |
Analyze schemas, suggest indexes, and generate migrations with rollbacks |
python scripts/database_migration_tool.py schema.sql --analyze |
api_load_tester.py |
HTTP load test with latency percentiles, throughput, and comparison |
python scripts/api_load_tester.py https://api.example.com/users --concurrency 50 --duration 30 |
References
Load the reference that matches the task — keep this file lean and pull detail on demand:
- references/tools-reference.md — full usage examples, flag tables, and sample output for the scaffolder, migration tool, and load tester, plus quick-start and common commands. Read when running any tool.
- references/workflows-and-patterns.md — the API-design, database-optimization, and security-hardening workflows, common response/index patterns, the troubleshooting table, and the success-criteria bar. Read when designing or hardening a service.
- references/api_design_patterns.md — REST vs GraphQL, versioning, error handling, pagination. Read when designing new APIs.
- references/database_optimization_guide.md — indexing strategies, query optimization, N+1 solutions. Read when fixing slow queries.
- references/backend_security_practices.md — OWASP Top 10, auth patterns, input validation. Read when hardening security.
Scope & Limitations
What this skill covers:
- REST API design, scaffolding, and OpenAPI-driven code generation for Express, Fastify, and Koa
- PostgreSQL schema analysis, index optimization, migration generation with rollback support
- HTTP load testing with latency percentile analysis, throughput measurement, and endpoint comparison
- Backend security patterns including JWT configuration, rate limiting, input validation, and security headers
What this skill does NOT cover:
- Frontend development, UI components, or client-side state management -- see
senior-frontend
- Infrastructure provisioning, container orchestration, or CI/CD pipeline setup -- see
senior-devops
- GraphQL schema design, resolvers, or subscriptions -- see
senior-fullstack
- Application performance monitoring (APM), distributed tracing, or log aggregation -- see
senior-secops
Integration Points
| Skill |
Integration |
Data Flow |
senior-fullstack |
API routes generated here feed into fullstack project scaffolding |
OpenAPI spec → fullstack scaffolder consumes as API contract |
senior-devops |
Migration scripts output here are consumed by CI/CD deployment pipelines |
migrations/ directory → deployment workflow applies and verifies |
senior-security |
Load test results and security hardening output feed into security review |
Load test JSON → security audit validates rate limiting and error handling |
senior-qa |
Generated route handlers and validators provide test surface for QA automation |
Route files + Zod schemas → QA generates integration test suites |
senior-frontend |
TypeScript types generated by the scaffolder are shared with frontend consumers |
types.ts → frontend imports API types for type-safe client code |
code-reviewer |
Schema analysis issues and migration diffs feed into code review checklists |
Analysis report → reviewer validates index coverage and naming conventions |
1---2name: senior-backend3description: Backend development with Node.js/Express/Fastify and PostgreSQL. Use when designing REST or GraphQL APIs, optimizing database queries, implementing authentication, building microservices, handling migrations, or reviewing backend code.4license: MIT + Commons Clause5---6# Senior Backend Engineer
7
8Scaffold and review backend services: API design and OpenAPI-driven code generation for Express/Fastify/Koa, PostgreSQL schema analysis and migration generation, HTTP load testing, and production security hardening. Outputs ready-to-run route handlers, Zod validators, TypeScript types, migrations with rollbacks, and load-test reports.
9
10## Core Capabilities
11
12- **API scaffolding** — generate route handlers, validation middleware, TypeScript types, and OpenAPI specs across Express, Fastify, and Koa.
13- **Database optimization** — schema analysis, missing-index detection, N+1 risk detection, and migration generation with paired rollback scripts.
14- **Load testing** — configurable concurrency with latency percentiles (P50/P90/P95/P99), throughput, error rates, and endpoint comparison.
15- **Security hardening** — JWT config, rate limiting, input validation (Zod), and security headers (helmet) for production readiness.
16- **Standardized contracts** — consistent `data`/`error`/`meta` response envelope and HTTP status conventions.
17
18## When to Use
19
20- Designing a new API or refactoring existing endpoints.
21- Slow queries or database performance needs improvement.
22- Preparing an API for production or after a security review.
23- Building regression/load-test baselines for backend endpoints.
24
25## Clarify First
26
27Before scaffolding, confirm these inputs. If any is unknown or vague, ASK — do not assume:
28
29- [ ] **Framework** — Express / Fastify / Koa (`--framework`; changes the generated route handlers, validators, and types)
30- [ ] **API contract source** — the OpenAPI spec or endpoint list to scaffold from (the input the scaffolder reads)
31- [ ] **Database intent** — the schema file and whether you want analysis vs migration generation (drives `database_migration_tool.py`)
32
33Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.
34
35## Tools
36
37| Tool | Purpose | Command |
38|------|---------|---------|
39| `api_scaffolder.py` | Generate route handlers, Zod validators, and TS types from an OpenAPI spec | `python scripts/api_scaffolder.py openapi.yaml --framework express --output src/routes/` |
40| `database_migration_tool.py` | Analyze schemas, suggest indexes, and generate migrations with rollbacks | `python scripts/database_migration_tool.py schema.sql --analyze` |
41| `api_load_tester.py` | HTTP load test with latency percentiles, throughput, and comparison | `python scripts/api_load_tester.py https://api.example.com/users --concurrency 50 --duration 30` |
42
43## References
44
45Load the reference that matches the task — keep this file lean and pull detail on demand:
46
47- **[references/tools-reference.md](references/tools-reference.md)** — full usage examples, flag tables, and sample output for the scaffolder, migration tool, and load tester, plus quick-start and common commands. Read when running any tool.
48- **[references/workflows-and-patterns.md](references/workflows-and-patterns.md)** — the API-design, database-optimization, and security-hardening workflows, common response/index patterns, the troubleshooting table, and the success-criteria bar. Read when designing or hardening a service.
49- **[references/api_design_patterns.md](references/api_design_patterns.md)** — REST vs GraphQL, versioning, error handling, pagination. Read when designing new APIs.
50- **[references/database_optimization_guide.md](references/database_optimization_guide.md)** — indexing strategies, query optimization, N+1 solutions. Read when fixing slow queries.
51- **[references/backend_security_practices.md](references/backend_security_practices.md)** — OWASP Top 10, auth patterns, input validation. Read when hardening security.
52
53## Scope & Limitations
54
55**What this skill covers:**
56- REST API design, scaffolding, and OpenAPI-driven code generation for Express, Fastify, and Koa
57- PostgreSQL schema analysis, index optimization, migration generation with rollback support
58- HTTP load testing with latency percentile analysis, throughput measurement, and endpoint comparison
59- Backend security patterns including JWT configuration, rate limiting, input validation, and security headers
60
61**What this skill does NOT cover:**
62- Frontend development, UI components, or client-side state management -- see `senior-frontend`
63- Infrastructure provisioning, container orchestration, or CI/CD pipeline setup -- see `senior-devops`
64- GraphQL schema design, resolvers, or subscriptions -- see `senior-fullstack`
65- Application performance monitoring (APM), distributed tracing, or log aggregation -- see `senior-secops`
66
67## Integration Points
68
69| Skill | Integration | Data Flow |
70|-------|-------------|-----------|
71| `senior-fullstack` | API routes generated here feed into fullstack project scaffolding | OpenAPI spec → fullstack scaffolder consumes as API contract |
72| `senior-devops` | Migration scripts output here are consumed by CI/CD deployment pipelines | `migrations/` directory → deployment workflow applies and verifies |
73| `senior-security` | Load test results and security hardening output feed into security review | Load test JSON → security audit validates rate limiting and error handling |
74| `senior-qa` | Generated route handlers and validators provide test surface for QA automation | Route files + Zod schemas → QA generates integration test suites |
75| `senior-frontend` | TypeScript types generated by the scaffolder are shared with frontend consumers | `types.ts` → frontend imports API types for type-safe client code |
76| `code-reviewer` | Schema analysis issues and migration diffs feed into code review checklists | Analysis report → reviewer validates index coverage and naming conventions |