Skip to content
Agentmart
Submit a tool

backend

Backend and API design patterns — RESTful and GraphQL API conventions, error handling, pagination, authentication patterns, and database best practices.

Skill by Satcomx00-x00

IndexedMIT
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/satcomx00-x00-backend

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

Backend and API design patterns — RESTful and GraphQL API conventions, error handling, pagination, authentication patterns, and database best practices.

Use cases: design, backend

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

What's inside

Skill name
backend
Description
Backend and API design patterns — RESTful and GraphQL API conventions, error handling, pagination, authentication patterns, and database best practices.
License
MIT
Metadata
author: Satcomx00-x00 · version: 1.0.0
Instructions
190 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# backend

Backend and API design patterns — RESTful and GraphQL API conventions, error handling, pagination, authentication patterns, and database best practices.

## Instructions

Apply these backend practices when building services and APIs:

## Guidelines

### Type Safety

- **Type-safe schemas for every route**: define request and response types with Zod (TypeScript) or Pydantic (Python); validate before any business logic runs
- **Typed database models**: use an ORM with typed models (Prisma, Drizzle, SQLAlchemy); never return raw untyped query results
- **Validated environment variables**: parse and validate all `process.env` / `os.environ` values at application boot using a typed schema — fail fast if required vars are missing or invalid
- **No `any` in controller, service, or repository layers** — every function must have explicit parameter and return types

### Error Handling

- Every route handler must be wrapped in error-catching middleware or use typed `Result`/`Either` types
- Database errors must be caught and converted to domain errors before reaching the controller
- Never expose internal error details (stack traces, DB query strings) to API consumers
- Always return a `traceId` in error responses for debuggability

### Async / Performance

- All I/O operations (DB, HTTP, file) must be async — no synchronous blocking calls in request handlers
- Set explicit timeouts on all outbound HTTP calls and DB queries
- Use connection pooling for database connections; never create a new connection per request

### Security Baseline

- Validate and sanitise every request field — reject unknown fields (strict schema parsing)
- Rate-limit all public endpoints
- Never log request bodies that may contain credentials or PII

---

### RESTful API Design

**Resource naming — use nouns, not verbs:**
```
GET    /users           → list users
POST   /users           → create a user
GET    /users/:id       → get a user
PATCH  /users/:id       → partially update a user
PUT    /users/:id       → replace a user
DELETE /users/:id       → delete a user
GET    /users/:id/posts → list a user's posts
```

**HTTP status codes:**
| Situation | Code |
|-----------|------|
| OK / resource returned | 200 |
| Created | 201 |
| No content (DELETE) | 204 |
| Bad request (validation) | 400 |
| Unauthenticated | 401 |
| Forbidden | 403 |
| Not found | 404 |
| Conflict (duplicate) | 409 |
| Unprocessable entity | 422 |
| Server error | 500 |

**Versioning:** prefix routes with `/v1/`, `/v2/` etc. Never break a published API version.

### Error Response Format

Return consistent, machine-readable errors:
```json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request validation failed",
    "details": [
      { "field": "email", "message": "Must be a valid email address" }
    ],
    "traceId": "abc123"
  }
}
```

Always include a `traceId` for debuggability in production.

### Pagination

Use cursor-based pagination for large or real-time datasets; offset for simple cases:

**Cursor-based (preferred):**
```json
{
  "data": [...],
  "pagination": {
    "hasNextPage": true,
    "endCursor": "eyJpZCI6MTAwfQ=="
  }
}
```

**Offset-based:**
```json
{
  "data": [...],
  "pagination": {
    "page": 2,
    "perPage": 20,
    "total": 543
  }
}
```

### Authentication Patterns

- **JWT (stateless)**: use short-lived access tokens (15 min) + refresh tokens (7 days stored in `HttpOnly` cookie)
- **Session-based**: server stores session; send `HttpOnly; Secure; SameSite=Strict` cookie
- **API keys**: for machine-to-machine; hash the key in the DB (never store plaintext)
- **OAuth 2.0 / OIDC**: for third-party login; delegate to an identity provider

From Satcomx00-x00/skills-db, MIT.

More from Satcomx00-x00/skills-db

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Apr 20, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

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

More from Satcomx00-x00

Cite this page

backend skill. Agent Mart. https://agentmart.dev/skills/satcomx00-x00-backend (last updated 2026-10-24)