
Backend patterns
Guides an agent through Node.js and Express backend design, data access and error handling
Backend patterns is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 71
- Last commit
- License
- Apache-2.0
- Listing updated
Similar skills
About Backend patterns
This skill gives the agent a reference of server-side code patterns for Node.js, Express and Next.js API routes. It covers how to lay out REST endpoints with resource URLs, filtering and pagination, and how to separate repository, service and controller layers. It also includes database advice such as selecting only needed columns, batching lookups to avoid N+1 queries, and wrapping multi-step writes in a transaction-style SQL function.
The rest of the guidance covers caching with a Redis-backed repository and cache-aside reads, a centralized error handler that maps custom errors and validation failures to HTTP responses, and retries with exponential backoff. It also describes JWT checks, role-based permission wrappers, a simple in-memory rate limiter, a basic in-process job queue and structured JSON logging. Most examples are TypeScript snippets that the agent adapts to the project it is working in.
The skill ships as a single SKILL.md with no scripts. It expects a TypeScript or JavaScript codebase and refers to libraries such as Supabase, Zod, jsonwebtoken and Redis, so those would need to be present for the examples to apply directly.
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.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (14 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the egc plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add Fmarzochi/EGC
/plugin install egc@egcOr copy only this skill to ~/.claude/skills/backend-patterns:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Fmarzochi/EGC.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/backend-patterns &&
cp -R "$tmp/.agents/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.
Copy the skill folder to ~/.agents/skills/backend-patterns to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Fmarzochi/EGC.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/backend-patterns &&
cp -R "$tmp/.agents/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.
Copy the skill folder to ~/.cursor/skills/backend-patterns to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Fmarzochi/EGC.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/backend-patterns &&
cp -R "$tmp/.agents/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.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/Fmarzochi/EGC.git --path .agents/skills/backend-patternsOr copy the folder to ~/.gemini/skills/backend-patterns yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/backend-patterns:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Fmarzochi/EGC.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/backend-patterns &&
cp -R "$tmp/.agents/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.
Get the folder:
git clone --depth 1 https://github.com/Fmarzochi/EGC.gitThen copy EGC/.agents/skills/backend-patterns into your agent's skills folder as backend-patterns. Agents that support SKILL.md read one folder per skill.
What it does
- API endpoint design
- Conventions for resource-based REST routes, query parameters for filtering, sorting and pagination.
- Repository and service layers
- Interfaces and classes that separate data access from business logic.
- Database query optimization
- Column selection, batched fetches to avoid N+1 queries and transaction-style SQL functions.
- Caching strategies
- Redis caching wrapper and cache-aside reads with invalidation on writes.
- Centralized error handling
- Custom API error class and a handler that returns consistent JSON error responses.
- Auth and permissions
- JWT verification helpers and role-based permission checks for route handlers.
- Rate limiting and logging
- In-memory rate limiter example and structured JSON logger with request context.
Good for
- Design a REST API for a new resource with filtering and pagination
- Refactor a route handler into repository and service layers
- Find and fix N+1 queries in a data-fetching endpoint
- Add Redis caching with invalidation to a slow lookup
- Add JWT authentication and role checks to Next.js API routes
- Standardize error responses across Express or Next.js endpoints
Backend patterns FAQ
Which frameworks does Backend patterns target?
It targets server-side code in Node.js, with examples for Express and Next.js API routes.
Does Backend patterns run any scripts or install anything?
No. The skill contains only a SKILL.md with guidance and code examples, and no scripts.
Does Backend patterns need any specific database or service?
The examples use Supabase, Redis, Zod and jsonwebtoken, so those would be needed to run the snippets as written.
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 egc plugin, which includes it: /plugin marketplace add Fmarzochi/EGC, then /plugin install egc@egc.
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 engineering edho ferdian, API design, API design and API design.
Where this comes from
- Description: from the skill's own SKILL.md.
More from Fmarzochi/EGC

Gives agents a structured workflow to capture, diagnose and recover from their own
- Open source
- 71 GitHub stars
- Developer tools

Builds a repo-specific EGC install plan that sorts components into daily and library sets
- Open source
- 71 GitHub stars
- Developer tools

Guides an agent through consistent REST API design: naming, status codes, pagination
- Open source
- 71 GitHub stars
- Developer tools

Drafts long-form articles, guides and newsletters in a consistent, specific voice
- Open source
- 71 GitHub stars
- Writing style

Builds a reusable writing style profile from your own samples for consistent copy
- Open source
- 71 GitHub stars
- Writing style

Guides your agent through using Bun for installs, scripts, bundling, tests and Vercel
- Open source
- 71 GitHub stars
- Developer tools



