# Backend patterns

> Backend patterns is an open-source agent skill for developer tools. Gives your agent server-side patterns for APIs, data access, caching and auth in Node.js. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/AbdullayevTemurmalik/ECC/tree/master/.kiro/skills/backend-patterns
- **Repository:** https://github.com/abdullayevtemurmalik/ecc
- **GitHub stars:** 7
- **License:** MIT
- **Skill name:** backend-patterns
- **Collection:** https://github.com/AbdullayevTemurmalik/ECC
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill is a reference of backend design patterns for server-side applications, with examples written in TypeScript for Node.js, Express and Next.js API routes. It covers how to split code into repository, service and controller layers, how to structure REST endpoints with resource URLs and query parameters, and how to wrap handlers in middleware for authentication and permission checks.

The bulk of the guidance is about data and reliability. It shows how to avoid N+1 queries with batch fetching, select only needed columns, wrap multi-step writes in a database function, and add a Redis or in-memory cache with invalidation. It also includes a centralized error handler that maps custom and validation errors to HTTP status codes, a retry helper with exponential backoff, a simple in-memory rate limiter, a basic job queue and structured JSON logging.

The examples reference Supabase, Prisma-style queries, Zod and JWT verification, so an agent applying them will need to adapt the snippets to the project's own libraries. The skill is a single SKILL.md with no scripts or companion files.

## When your agent uses it

> Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/AbdullayevTemurmalik/ECC/tree/HEAD/.kiro/skills/backend-patterns)
- [License: MIT](https://github.com/AbdullayevTemurmalik/ECC/tree/HEAD/.kiro/skills/backend-patterns)

## Features

- **Layered API architecture:** Guidance on separating repositories, services and controllers, with interface-based data access.
- **REST endpoint design:** Conventions for resource URLs, filtering, sorting and pagination query parameters.
- **Database query optimization:** Patterns for avoiding N+1 queries, selecting specific columns and wrapping writes in transactions.
- **Caching strategies:** Cache-aside and Redis-backed repository examples with expiry and invalidation.
- **Auth and access control:** JWT validation, bearer token extraction and role-based permission wrappers for route handlers.
- **Error handling and logging:** Centralized error responses, retry with backoff, rate limiting and structured JSON logs.

## Good for

- Design a REST API for a resource with filtering and pagination
- Fix N+1 queries in a data-fetching function
- Add a Redis cache in front of a repository
- Protect Next.js API routes with JWT and role checks
- Add a centralized error handler to an Express or Next.js backend

## Install

### Claude Code

This skill ships in the `ecc` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add AbdullayevTemurmalik/ECC
/plugin install ecc@ecc
```

Or copy only this skill to `~/.claude/skills/backend-patterns`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AbdullayevTemurmalik/ECC.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/backend-patterns &&
cp -R "$tmp/.kiro/skills/backend-patterns" ~/.claude/skills/backend-patterns &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/backend-patterns` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/backend-patterns` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AbdullayevTemurmalik/ECC.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/backend-patterns &&
cp -R "$tmp/.kiro/skills/backend-patterns" ~/.agents/skills/backend-patterns &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/backend-patterns` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/backend-patterns` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AbdullayevTemurmalik/ECC.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/backend-patterns &&
cp -R "$tmp/.kiro/skills/backend-patterns" ~/.cursor/skills/backend-patterns &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/backend-patterns` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/AbdullayevTemurmalik/ECC.git --path .kiro/skills/backend-patterns
```

Or copy the folder to `~/.gemini/skills/backend-patterns` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/backend-patterns`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AbdullayevTemurmalik/ECC.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/backend-patterns &&
cp -R "$tmp/.kiro/skills/backend-patterns" ~/.copilot/skills/backend-patterns &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/backend-patterns` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/AbdullayevTemurmalik/ECC.git
```

Then copy `ECC/.kiro/skills/backend-patterns` into your agent's skills folder as `backend-patterns`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Which frameworks do the examples target?

The examples target Node.js, Express and Next.js API routes, written in TypeScript.

### Does the skill run any scripts or change files?

No. It is a single SKILL.md with code examples and no scripts or bundled files.

### When does the skill activate?

It is meant for tasks such as designing API endpoints, optimizing database queries, adding caching, building middleware or structuring error handling.

### How do I install Backend patterns in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/backend-patterns to use it in all your projects, or to .claude/skills/backend-patterns in one project. Or install the ecc plugin, which includes it: /plugin marketplace add AbdullayevTemurmalik/ECC, then /plugin install ecc@ecc.

### Does Backend patterns run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Backend patterns?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Backend patterns?

The closest alternatives to Backend patterns are Backend patterns, Backend patterns, API integration, API design and Backend engineering edho ferdian.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Backend patterns](https://ai-powered.com/skills/backend-patterns-fmarzochi): Backend patterns is an open-source agent skill for developer tools.
- [Backend patterns](https://ai-powered.com/skills/backend-patterns): Backend patterns is an open-source agent skill for developer tools.
- [API integration](https://ai-powered.com/skills/api-integration-ajyadav013): API integration is an open-source agent skill for developer tools.
- [API design](https://ai-powered.com/skills/api-design-fmarzochi): API design is an open-source agent skill for developer tools.
- [Backend engineering edho ferdian](https://ai-powered.com/skills/backend-engineering-edho-ferdian): Backend engineering edho ferdian is an open-source agent skill for developer tools.
- [API design](https://ai-powered.com/skills/api-design-abdullayevtemurmalik): API design is an open-source agent skill for developer tools.
- [API and interface design](https://ai-powered.com/skills/api-and-interface-design-ajyadav013): API and interface design is an open-source agent skill for design and media.
- [API design](https://ai-powered.com/skills/api-design): API design is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/backend-patterns-abdullayevtemurmalik
