# Build RESTful Backend APIs

Backend API work often stalls on routing, versioning, and response standards. This skill guides Claude, Codex, and Claude Code through consistent REST endpoint design and implementation.

## Install

```bash
npx skillstore add devanb/backend-api
```

## Metadata

- Status: approved
- Slug: devanb-backend-api
- Skillstore revision: r1
- Version status: missing
- Tree hash: f8c6a940a610a2b31688480a90bee95f71904f5b8e1ff43d4499fcca3af2fb15
- Author: DevanB
- GitHub username: DevanB
- License: MIT
- Repository: https://github.com/DevanB/lucidlog/tree/master/.claude/skills/backend-api
- Ref: 0519034dad657fb1f7706e0550e962beeda73fdf
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, filesystem
- Quality score: 79
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/devanb-backend-api
- Manifest: https://skillstore.pages.dev/api/skills/devanb-backend-api/manifest

## Capabilities

- Guide route definitions for REST API endpoints in Laravel-style routing files.
- Recommend HTTP methods and status codes for CRUD endpoint behavior.
- Plan URL structures, nested resources, and API versioning approaches.
- Define query parameters for filtering, sorting, pagination, and search.
- Support controller and API resource patterns for response formatting.

## Use Cases

- Create REST Endpoints: Plan routes, controllers, HTTP methods, and response codes for new backend resources.
- Standardize API Responses: Align pagination, filtering, sorting, errors, and resource formatting across endpoints.
- Review API Changes: Check endpoint design for REST conventions, versioning choices, and throttling expectations.

## Prompt Templates

### Create a Basic Endpoint

```
Design a REST endpoint for this resource. Include the route purpose, HTTP method, controller action, expected status codes, and response shape.
```

### Add Query Behavior

```
Add filtering, sorting, pagination, and search behavior to this API endpoint. Explain the query parameters and validation rules.
```

### Design Versioned Resources

```
Plan versioning for this API resource. Compare URL path versioning and header-based versioning, then recommend one approach.
```

### Review an API Surface

```
Review these API routes and controllers for REST conventions, versioning, status codes, pagination, and rate limiting. List prioritized fixes with rationale.
```

## Limitations

- It only provides guidance; it does not include executable generators or tests.
- The referenced detailed standard is outside the skill package.
- It focuses on REST APIs, not GraphQL, WebSockets, or event streams.
- Framework-specific advice is strongest for Laravel-style file layouts.

## Best Practices

- Keep resource names consistent and use standard HTTP methods for each action.
- Define pagination, filtering, sorting, and search behavior before implementation.
- Map success and error paths to clear HTTP status codes.

## Anti Patterns

- Mixing custom verbs into URLs when standard HTTP methods already describe the action.
- Returning generic success or error codes that hide the real request outcome.
- Adding versioning, filtering, or throttling behavior differently for each endpoint.

## Security Audit

- Audited at: 2026-07-09T12:33:59.662\+00:00
- Summary: Four external command findings are false positives because they are Markdown inline code formatting for routes and paths. The filesystem finding is confirmed because SKILL.md points to ../../../agent-os/standards/backend/api.md, which directs the agent outside the skill package. No prompt injection or malicious data-exfiltration intent was found.

## Stats

- Views: 226
- Downloads: 14
- Favorites: 0
- Popularity score: 0
