Skip to content
Agentmart
Submit a tool

backend-implementation-patterns

Production-ready backend API implementation patterns including REST, GraphQL, authentication, error handling, and data validation

Skill by 4444J99

IndexedMIT★ 17
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/4444j99-backend-implementation-patterns

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Production-ready backend API implementation patterns including REST, GraphQL, authentication, error handling, and data validation

Use cases: backend, data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/backend-implementation-patterns

What's inside

Skill name
backend-implementation-patterns
Description
Production-ready backend API implementation patterns including REST, GraphQL, authentication, error handling, and data validation
License
MIT
Metadata
category: backend-development · adapted-by: ai-skills
Instructions
249 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • middleware-patterns.md · references/

SKILL.md (first lines)

# Backend Implementation Patterns

Production-ready patterns for building robust, scalable backend APIs.

## API Design Patterns

### RESTful Endpoints

```typescript
// Resource-based routing
app.get('/api/users', getUsers);           // List
app.get('/api/users/:id', getUserById);    // Get
app.post('/api/users', createUser);        // Create
app.put('/api/users/:id', updateUser);     // Update
app.delete('/api/users/:id', deleteUser);  // Delete

// Nested resources
app.get('/api/users/:id/posts', getUserPosts);
app.post('/api/users/:id/posts', createUserPost);
```

### Request/Response Pattern

```typescript
interface APIResponse<T> {
  success: boolean;
  data?: T;
  error?: {
    code: string;
    message: string;
    details?: any;
  };
  meta?: {
    page?: number;
    limit?: number;
    total?: number;
  };
}

async function handleRequest<T>(
  handler: () => Promise<T>
): Promise<APIResponse<T>> {
  try {
    const data = await handler();
    return { success: true, data };
  } catch (error) {
    return {
      success: false,
      error: {
        code: error.code || 'INTERNAL_ERROR',
        message: error.message,
      }
    };
  }
}
```

### Validation Layer

```typescript
import { z } from 'zod';

const CreateUserSchema = z.object({
  email: z.string().email(),
  name: z.string().min(2).max(100),
  age: z.number().int().min(18).optional(),
});

app.post('/api/users', async (req, res) => {
  const validation = CreateUserSchema.safeParse(req.body);
  
  if (!validation.success) {
    return res.status(400).json({
      success: false,
      error: {
        code: 'VALIDATION_ERROR',
        message: 'Invalid request data',
        details: validation.error.errors
      }
    });
  }
  
  const user = await userService.create(validation.data);
  res.status(201).json({ success: true, data: user });
});
```

## Authentication Patterns

### JWT Authentication

```typescript
import jwt from 'jsonwebtoken';

// Generate token
function generateToken(userId: string) {
  return jwt.sign(
    { userId },
    process.env.JWT_SECRET!, // allow-secret
    { expiresIn: '7d' }
  );
}

// Middleware
async function authenticateToken(req, res, next) {
  const token = req.headers.authorization?.split(' ')[1];  // allow-secret
  
  if (!token) {
    return res.status(401).json({
      success: false,
      error: { code: 'UNAUTHORIZED', message: 'Missing token' }
    });
  }
  
  try {
    const decoded = jwt.verify(token, process.env.JWT_SECRET!); // allow-secret
    req.userId = decoded.userId;
    next();
  } catch (error) {

From 4444J99/a-i--skills, MIT.

More from 4444J99/a-i--skills

Signals

Stars
17
Forks
9
Open issues
6
Last commit (this folder)
Apr 18, 2026 (6 months ago)
Last release
Feb 6, 2026 (8 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from 4444J99

Cite this page

backend-implementation-patterns skill. Agent Mart. https://agentmart.dev/skills/4444j99-backend-implementation-patterns (last updated 2026-10-24)