Backend
Design and generate external backend API code (any language/framework — Go, Rust, Python, PHP, JavaScript, Ruby, etc.) that serves a Next.js JSX frontend. Use for API endpoints, auth, validation, and data modeling on a separate backend server.From its SKILL.md
npx -y skills add hilmifawwazsaad/NextJS-js-Boilerplate --skill backendAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.3 KB, 481 tokens by cl100k_base, as published. Nobody here has run it
Read
.agents/software-principles/SKILL.mdfirst.
Pre-Code Checklist
- Resource + HTTP method + action
- Request → response contract (input shape, output shape, errors)
- Auth requirement (public / authenticated / role-gated)
- Failure scenarios + validation rules
Response Envelope
Follow existing convention if one exists. If starting fresh, pick one shape and apply consistently. Never mix shapes across endpoints.
Required regardless of shape:
- Success and error responses must be distinguishable
- Validation errors must include field-level detail, not just a generic message
- Error responses must never expose stack traces, query strings, or internal paths
- Never return untyped raw objects
Design Rules
- Versioning — prefix all routes
/api/v1/ - Endpoints — plural nouns, kebab-case:
/api/v1/posts,/api/v1/post-categories - Query params —
page,limit,sort,filter[key]=value - Auth —
Authorization: Bearer <token>(JWT/opaque) or HTTP-only cookie (same parent domain) - Pagination — all list endpoints:
data: { items: T[], pagination: { page, limit, totalItems, totalPages } } - CORS — exact origin only. Never wildcard with credentials
- Naming — camelCase or snake_case — consistent throughout project
- Docs — expose OpenAPI spec at
/api/docsor/openapi.jsonwhen feasible
Architecture
- Route handlers thin — business logic in service/use-case layer
- Global error handler → catches all unhandled errors → safe fallback response
- DB connection pooling. Async/non-blocking I/O
Security (non-negotiable)
- Secrets via env vars only — never hardcoded
- Parameterized queries/ORM — no string-concatenated SQL
- Hash passwords (bcrypt/argon2 or language equivalent)
- Rate-limit auth endpoints (login, register, password reset)
- Limit request body size
- Security headers in production (X-Frame-Options, CSP, HSTS)
- Validate all input at boundary before processing
Never Do
- Trust unvalidated client input or hardcode secrets
- Business logic directly in route handlers
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.