Skip to main content
skill CX Codex

backend-development · moizibnyousaf — Claude Code skill: APIs, DB schemas, TDD

A skill that gives your agent conventions for REST APIs, database schemas and microservice patterns. Useful when backend code should stay consistent across sessions.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add MoizIbnYousaf/ai-agent-skills --skill backend-development -a claude-code
Open on GitHub

What backend-development does

The skill is a reference file the agent reads before writing backend code. It covers REST routing: GET /users, POST /users, PATCH /users/:id, plus nested routes like GET /users/:id/posts. Responses carry a data object and pagination in meta; errors carry a code, a message and a list of offending fields.

Database guidance is written in SQL. Tables get a SERIAL primary key and a UUID in public_id, soft deletes go through deleted_at, and indexes cover email and created_at DESC. Pagination uses a cursor instead of OFFSET, and row counts come from pg_class rather than a full count. Auth is JWT with sub, iat, exp and scope, checked by middleware that pulls the token from the Authorization header.

Caching follows cache-aside: read from Redis, fall back to the database, then setex for 3600 seconds, and redis.del on update. Rate limiting is 100 requests per minute keyed on IP, answering 429. The examples are TypeScript and SQL, so on another stack you rewrite them by hand.

What it helps with

  • lay out REST routes for a new resource
  • write a table schema with UUID and soft deletes
  • add JWT verification to middleware
  • wire cache-aside into a user lookup
  • cap request rate per IP

Example prompts for the agent

  • Design a REST API for orders following the backend-development skill conventions
  • Write the users table with a public_id UUID, deleted_at and indexes
  • Add cache-aside for getUser with Redis and invalidate on update

How to install backend-development

1Skills CLI (Vercel)

npx skills add MoizIbnYousaf/ai-agent-skills --skill backend-development -a claude-code

2Manually: put the files in place

~/.claude/skills/backend-development/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/backend-development/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about backend-development

How do I install backend-development in Claude?

Run npx skills add MoizIbnYousaf/ai-agent-skills --skill backend-development -a claude-code. The skill file lands at ~/.claude/skills/backend-development/SKILL.md.

What does backend-development do?

It hands the agent templates for API design, database schemas, microservice patterns and test-driven development. The agent applies them when you ask for an API or a schema.

Does the skill require Redis and PostgreSQL?

The skill itself is a text reference and runs nothing. Its cache examples target Redis and its queries and schema target PostgreSQL, so another database means rewriting those parts.

Source text

SKILL.md · MIT
---
name: backend-development
description: Backend API design, database architecture, microservices patterns, and test-driven development. Use for designing APIs, database schemas, or backend system architecture.
source: wshobson/agents
license: MIT
version: 4.1.0
---

# 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

© MoizIbnYousaf · MIT · MoizIbnYousaf/ai-agent-skills

Similar skills

Everything for Backend and APIs →

backend-development by other authors comes first.

backend-development mrgoonie A skill that walks your agent through API design, database schemas, auth and CI/CD. Useful when a backend starts from scratch or heads to production. CX Codex +1 2,300installs backend-development Mindrally Tells the agent how to write backend code in C++ and Elixir/Phoenix: naming, memory management, Phoenix contexts, error handling. CX Codex +1 753installs senior-backend Alireza Rezvani Scaffolds backend APIs, detects database bottlenecks, and runs load tests. Useful when designing Express routes, optimizing PostgreSQL, or preparing for production. 1,674installs nodejs-express-server aj-geddes A skill that guides your agent through building Express.js servers: routing, middleware chains, JWT auth, database integration. Useful for REST APIs in Node.js. CX Codex +1 3,300installs security-best-practices Mindrally A skill providing security principles for backend and microservice development. It helps agents enforce strict input validation, protect APIs, and prevent sensitive data leaks. CX Codex +1 930installs create-spring-boot-kotlin-project official github This skill scaffolds a Spring Boot project in Kotlin, then configures PostgreSQL, Redis and MongoDB. Use it when you want a reactive starter with Gradle tests. 8,700installs insforge-integrations InsForge A skill that walks your agent through hooking a third-party auth provider into InsForge and through taking x402 payments on an HTTP endpoint. CX Codex +1 55,900installs neon neondatabase This skill helps choose and configure a Neon backend with Postgres, auth, storage, functions, the AI Gateway, and Realtime. Use it when building an app. CX Codex +1 234,000installs

From the same set6

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor