
Backend Development
Design REST APIs, Postgres-style schemas, and service boundaries with consistent response and error shapes before you implement endpoints.
Overview
backend-development is an agent skill for the Build phase that guides REST API design, database schema patterns, microservices layout, and test-driven backend architecture.
Install
npx skills add https://github.com/skillcreatorai/ai-agent-skills --skill backend-developmentWhat is this skill?
- REST resource layout for users and nested posts with GET/POST/PUT/PATCH/DELETE conventions
- Standard JSON envelopes for `data` plus pagination `meta` and structured validation `error` objects
- SQL schema patterns: UUID public IDs, soft deletes, and indexing on email and created_at
- Microservices and test-driven development sections in the full skill (v4.1.0, MIT, sourced from wshobson/agents)
- Use when designing APIs, database schemas, or backend system architecture
- 6 REST verbs illustrated on user and nested post resources
- MIT licensed skill version 4.1.0
Adoption & trust: 664 installs on skills.sh; 1.1k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your agent drafts endpoints and tables without shared REST, pagination, or error conventions, creating rework before you can ship an API.
Who is it for?
Indie developers scaffolding a new API or refactoring a monolith who want opinionated REST and SQL defaults in every agent session.
Skip if: Pure frontend UI work, mobile-only clients with no custom backend, or specialists who already enforce an org-wide OpenAPI standard without agent help.
When should I use this skill?
Use for designing APIs, database schemas, or backend system architecture.
What do I get? / Deliverables
You get aligned route naming, response envelopes, SQL baselines, and TDD-minded structure ready to implement in your chosen framework.
- REST route map and HTTP verb plan
- JSON response and error envelope examples
- SQL table definitions with indexes and soft-delete columns
Recommended Skills
Journey fit
Build is where backend architecture decisions lock in data models, routing, and test strategy for the product you are shipping. Backend subphase is the canonical home for API conventions, SQL schema patterns, and microservice guidance in the skill body.
How it compares
Use as a design playbook skill rather than a deploy or CI integration—pair with testing skills when you move from schema design to Ship.
Common Questions / FAQ
Who is backend-development for?
Solo and small-team builders using AI coding agents to design or implement server APIs and relational schemas.
When should I use backend-development?
During Build backend work when defining routes, migrations, service boundaries, or TDD cases for new endpoints.
Is backend-development safe to install?
It is procedural documentation under MIT; review the Security Audits panel on this page and treat generated SQL or API code like any other agent output.
SKILL.md
READMESKILL.md - Backend Development
# Backend Development ## API Design ### RESTful Conventions ``` GET /users # List users POST /users # Create user GET /users/:id # Get user PUT /users/:id # Update user (full) PATCH /users/:id # Update user (partial) DELETE /users/:id # Delete user GET /users/:id/posts # List user's posts POST /users/:id/posts # Create post for user ``` ### Response Format ```json { "data": { ... }, "meta": { "page": 1, "per_page": 20, "total": 100 } } ``` ### Error Format ```json { "error": { "code": "VALIDATION_ERROR", "message": "Invalid input", "details": [ { "field": "email", "message": "Invalid format" } ] } } ``` ## Database Patterns ### Schema Design ```sql -- Use UUIDs for public IDs CREATE TABLE users ( id SERIAL PRIMARY KEY, public_id UUID DEFAULT gen_random_uuid() UNIQUE, email VARCHAR(255) UNIQUE NOT NULL, created_at TIMESTAMPTZ DEFAULT NOW(), updated_at TIMESTAMPTZ DEFAULT NOW() ); -- Soft deletes ALTER TABLE users ADD COLUMN deleted_at TIMESTAMPTZ; -- Indexes CREATE INDEX idx_users_email ON users(email); CREATE INDEX idx_users_created ON users(created_at DESC); ``` ### Query Patterns ```sql -- Pagination with cursor SELECT * FROM posts WHERE created_at < $cursor ORDER BY created_at DESC LIMIT 20; -- Efficient counting SELECT reltuples::bigint AS estimate FROM pg_class WHERE relname = 'users'; ``` ## Authentication ### JWT Pattern ```typescript interface TokenPayload { sub: string; // User ID iat: number; // Issued at exp: number; // Expiration scope: string[]; // Permissions } function verifyToken(token: string): TokenPayload { return jwt.verify(token, SECRET) as TokenPayload; } ``` ### Middleware ```typescript async function authenticate(req: Request, res: Response, next: Next) { const token = req.headers.authorization?.replace('Bearer ', ''); if (!token) { return res.status(401).json({ error: 'Unauthorized' }); } try { req.user = verifyToken(token); next(); } catch { res.status(401).json({ error: 'Invalid token' }); } } ``` ## Caching Strategy ```typescript // Cache-aside pattern async function getUser(id: string): Promise<User> { const cached = await redis.get(`user:${id}`); if (cached) return JSON.parse(cached); const user = await db.users.findById(id); await redis.setex(`user:${id}`, 3600, JSON.stringify(user)); return user; } // Cache invalidation async function updateUser(id: string, data: Partial<User>) { await db.users.update(id, data); await redis.del(`user:${id}`); } ``` ## Rate Limiting ```typescript const limiter = rateLimit({ windowMs: 60 * 1000, // 1 minute max: 100, // 100 requests per window keyGenerator: (req) => req.ip, handler: (req, res) => { res.status(429).json({ error: 'Too many requests' }); } }); ``` ## Observability - **Logging**: Structured JSON logs with request IDs - **Metrics**: Request latency, error rates, queue depths - **Tracing**: Distributed tracing with correlation IDs - **Health checks**: `/health` and `/ready` endpoints