backend

backend is a skill for Claude Code from xiaobei930/cc-best. It costs 27 tokens per session (1,776 once invoked), scanned A, original, MIT.

A set of patterns for building backend software, the part of an application that handles requests, data, and business rules. It covers service structure, errors, logging, caching, and concurrency for several programming languages.

In plain words
What is it for?
Use it when designing or building APIs, web services, microservices, middleware, or business logic in Python, TypeScript, Java, Go, C#, or Rust.
Why use it?
It gives backend work a consistent structure and helps address common concerns such as failures, performance, and data access.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the cc-best plugin — 19 skills, 44 commands, 8 agents, 20 hooks shipped together

Good fit Use it when designing or building APIs, web services, microservices, middleware, or business logic in Python, TypeScript, Java, Go, C#, or Rust.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xiaobei930/cc-best/backend
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xiaobei930/cc-best --skill backend
Clone the repo
git clone --depth 1 https://github.com/xiaobei930/cc-best

Made for: Claude Code.

Or install cc-best, the plugin that ships this one along with the rest of its 19 skills, 44 commands, 8 agents, 20 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for backend

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaobei930/cc-best/backend/github.svg)](https://agentmods.dev/skills/xiaobei930/cc-best/backend)
Your own site
<a href="https://agentmods.dev/skills/xiaobei930/cc-best/backend"><img src="https://agentmods.dev/badge/skills/xiaobei930/cc-best/backend/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for backend

Your own site · 80×15
<a href="https://agentmods.dev/skills/xiaobei930/cc-best/backend"><img src="https://agentmods.dev/badge/skills/xiaobei930/cc-best/backend.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,776 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.01776
Opus 5.5 $0.00011 $0.00710
Sonnet 5.5 $0.00005 $0.00355
Haiku 4.5 $0.00003 $0.00178

Measured 1mo ago against content hash 88f3b5da53f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

backend scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/backend/SKILL.md · 234 lines

How it starts

The opening of the file, as written. The whole thing — 234 lines — stays where its author put it; the contents beside it link to each section on GitHub.

后端开发模式

本技能提供后端服务开发的最佳实践和模式,支持多语言按需加载。

触发条件

  • 构建后端服务
  • 设计服务架构
  • 实现业务逻辑层
  • 配置中间件
  • 处理错误和日志
  • 性能优化(数据库、缓存、并发)

语言专属模式

根据项目技术栈,加载对应的语言专属文件:

技术栈 加载文件 框架
Python python.md FastAPI, Django, Flask
TypeScript/Node.js typescript.md Express, NestJS, Fastify
Java java.md Spring Boot, Quarkus
Go go.md Gin, Echo, Fiber
C# csharp.md ASP.NET Core
Rust rust.md Axum, Actix-web, Rocket

加载方式: 检测项目中的 pyproject.toml/package.json/pom.xml/go.mod/Cargo.toml 等文件确定技术栈。


通用架构模式

分层架构

┌─────────────────────────────────────┐
│           Controller 层              │  处理 HTTP 请求/响应
├─────────────────────────────────────┤
│            Service 层                │  业务逻辑
├─────────────────────────────────────┤
│          Repository 层               │  数据访问
├─────────────────────────────────────┤
│             Model 层                 │  数据模型
└─────────────────────────────────────┘

通用目录结构

src/
├── controllers/          # 控制器(或 routes/handlers)
├── services/             # 业务逻辑
├── repositories/         # 数据访问(或 dal/)
├── models/               # 数据模型(或 entities/)
├── middlewares/          # 中间件
├── utils/                # 工具函数
├── config/               # 配置
└── types/                # 类型定义(如适用)

通用最佳实践

1. 错误处理原则

┌─────────────────────────────────────────────────────┐
│                    错误处理金字塔                     │
├─────────────────────────────────────────────────────┤
│  业务错误 (400-499)                                  │
│  ├─ ValidationError (400)   输入验证失败             │
│  ├─ UnauthorizedError (401) 未认证                  │
│  ├─ ForbiddenError (403)    无权限                  │
│  └─ NotFoundError (404)     资源不存在              │
├─────────────────────────────────────────────────────┤
│  系统错误 (500-599)                                  │
│  ├─ InternalError (500)     服务器内部错误           │
│  ├─ ServiceUnavailable (503) 服务不可用             │
│  └─ GatewayTimeout (504)    网关超时                │
└─────────────────────────────────────────────────────┘

Read the full file on GitHub · 234 lines

Files

What ships with it

10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 234 lines · 27 tokens per session scan A 88f3b5da53f6

Subscribe to this mod's changes

backend is a skill published in the GitHub repository xiaobei930/cc-best (48 stars, last pushed 4mo ago), licensed MIT. It adds 27 tokens to every session and 1,776 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

eval-hooks

Audit Claude Code and Codex hooks for validity, safety, and correctness across settings.json, hooks.json, config.toml, plugin, and skill or agent frontmatter hooks. Resolves each command, checks event names, handler types, matchers, exit-code and JSON decision strategy, and timeouts against each host's documented…

FlorianBruniaux/claude-code-ultimate-guide · 115 tokens

eval-skills

Audit a project or library of skills for metadata, trigger boundaries, workflow completion criteria, local resource closure, instruction economy, tool scope, effort, and routing evidence. Use before shipping skills, after importing a skill collection, or when a skill triggers too often or not at all.

FlorianBruniaux/claude-code-ultimate-guide · 60 tokens

source-command-audit-whitepapers

Audit version freshness, FR/EN parity, and metadata quality of all whitepapers and recap cards.

FlorianBruniaux/claude-code-ultimate-guide · 26 tokens

audit-agents-skills

Audit Claude Code agents, skills, and commands for quality and production readiness. Use when evaluating skill quality, checking production readiness scores, or comparing agents against best-practice templates.

FlorianBruniaux/claude-code-ultimate-guide · 41 tokens

design-patterns

Detect, suggest, and evaluate GoF design patterns in TypeScript/JavaScript codebases. Use when refactoring code, applying singleton/factory/observer/strategy patterns, reviewing pattern quality, or finding stack-native alternatives for React, Angular, NestJS, and Vue.

FlorianBruniaux/claude-code-ultimate-guide · 59 tokens

eval-agents

Audit custom subagent definitions for Claude Code (.claude/agents/.md) and Codex (.codex/agents/.toml): loadability against the native schema, description overlap, model tier, tool scope, and headless-safe instructions. Use when onboarding to a project with agents, after adding or importing agents, or when the parent…

FlorianBruniaux/claude-code-ultimate-guide · 80 tokens