后端编码

后端编码 is a skill for Claude Code, Codex from jianchen08/Agent-os-open. It costs 49 tokens per session (2,442 once invoked), scanned A, original, Apache-2.0.

A backend coding guide covering web APIs, databases, error handling, logging, and endpoint tests. Backend code runs on servers and handles data and application operations.

In plain words
What is it for?
Building or reviewing backend and full-stack features, including REST APIs, database tables, errors, logs, and tests.
Why use it?
It gives developers shared rules for designing interfaces and storing data consistently and safely.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Building or reviewing backend and full-stack features, including REST APIs, database tables, errors, logs, and tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jianchen08/agent-os-open/code-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 jianchen08/Agent-os-open --skill code-backend
Clone the repo
git clone --depth 1 https://github.com/jianchen08/Agent-os-open

Made for: Claude Code, Codex.

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 后端编码

README.md
[![agentmods](https://agentmods.dev/badge/skills/jianchen08/agent-os-open/code-backend/github.svg)](https://agentmods.dev/skills/jianchen08/agent-os-open/code-backend)
Your own site
<a href="https://agentmods.dev/skills/jianchen08/agent-os-open/code-backend"><img src="https://agentmods.dev/badge/skills/jianchen08/agent-os-open/code-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 后端编码

Your own site · 80×15
<a href="https://agentmods.dev/skills/jianchen08/agent-os-open/code-backend"><img src="https://agentmods.dev/badge/skills/jianchen08/agent-os-open/code-backend.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,442 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.00049 $0.02442
Opus 5.5 $0.00020 $0.00977
Sonnet 5.5 $0.00010 $0.00488
Haiku 4.5 $0.00005 $0.00244

Measured 28d ago against content hash f9e0dc243d73, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

后端编码 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 28d 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.

plugins/shared/modes/mode_coding/skills/code-backend/SKILL.md · 269 lines

How it starts

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

后端编码

本技能是流程指引,不是逐条打勾清单:按场景判断使用,遇不适用情况保持裁量,不机械执行。

API 设计规范

RESTful 规范

原则 说明
资源命名 使用名词复数表示资源
层级结构 使用嵌套表示资源关系
HTTP 方法 正确使用 GET/POST/PUT/PATCH/DELETE
统一接口 所有 API 遵循统一的接口约束
无状态 请求包含所有必要信息

HTTP 方法

方法 用途 幂等性 安全性 示例
GET 查询资源 幂等 安全 GET /users/123
POST 创建资源 非幂等 不安全 POST /users
PUT 更新资源(全量) 幂等 不安全 PUT /users/123
PATCH 更新资源(部分) 非幂等 不安全 PATCH /users/123
DELETE 删除资源 幂等 不安全 DELETE /users/123

URL 设计

规范 正确 错误
使用名词复数 GET /users GET /getUsers
层级表示关系 GET /users/123/orders GET /getUserOrders?userId=123
小写字母 GET /user-profiles GET /UserProfiles
省略扩展名 GET /users/123 GET /users/123.json
查询参数过滤 GET /users?role=admin GET /adminUsers

版本控制

URL 路径版本(推荐):/v1/users, /v2/users

方式 示例 适用场景
URL 路径 /v1/users, /v2/users 简单直观,推荐
Header API-Version: v1 资源导向
Query 参数 /users?version=v1 不推荐

FastAPI 最佳实践(本仓后端技术栈)

from fastapi import FastAPI, HTTPException, status, Query
from pydantic import BaseModel, EmailStr, Field
from typing import Optional, List

app = FastAPI(title="My API", version="1.0.0")

# 请求模型
class UserCreate(BaseModel):
    name: str = Field(..., min_length=1, max_length=100)
    email: EmailStr
    role: str = Field(default="user")

# 响应模型
class UserResponse(BaseModel):
    id: int
    name: str
    email: EmailStr
    role: str

@app.get("/users/{user_id}", response_model=UserResponse)
async def get_user(user_id: int = Path(..., gt=0)) -> UserResponse:
    user = await db.get_user(user_id)
    if not user:
        raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=f"User with id {user_id} not found")
    return user

@app.get("/users", response_model=List[UserResponse])
async def list_users(
    skip: int = Query(0, ge=0),
    limit: int = Query(10, ge=1, le=100),
    role: Optional[str] = None
) -> List[UserResponse]:
    return await db.list_users(skip=skip, limit=limit, role=role)

@app.post("/users", response_model=UserResponse, status_code=status.HTTP_201_CREATED)
async def create_user(user: UserCreate) -> UserResponse:
    existing = await db.get_user_by_email(user.email)
    if existing:
        raise HTTPException(status_code=status.HTTP_409_CONFLICT, detail="User with this email already exists")
    return await db.create_user(user)

Read the full file on GitHub · 269 lines

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. 28d ago Changed f9e0dc243d73
  2. 1mo ago Changed · +129 lines 3015bcb00425
  3. 1mo ago First seen · 140 lines · 49 tokens per session scan A cad1c6187a3e

Subscribe to this mod's changes

后端编码 is a skill published in the GitHub repository jianchen08/Agent-os-open (7 stars, last pushed 9d ago), licensed Apache-2.0. It adds 49 tokens to every session and 2,442 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

background-task

Add or modify work that runs outside the request/response cycle — emails, document ingestion, webhooks, cleanups, scheduled jobs. Use when something is slow or fire-and-forget, or when adding a periodic/cron task. This project's queue is {{ cookiecutter.backgroundtasks }}.

vstorm-co/full-stack-ai-agent-template · 62 tokens

alembic-migration

Create, review, and apply database schema changes with Alembic. Use whenever a SQLAlchemy model is added or changed, a column/index/constraint needs to change, or a data backfill is required — anything that alters the PostgreSQL schema.

vstorm-co/full-stack-ai-agent-template · 56 tokens

channel-bot

Work with messaging-channel bots (Telegram / Slack) — register a bot, route inbound messages through the AI agent, handle webhooks vs polling, or add a new channel adapter. Use when wiring chat into a messaging platform or debugging bot delivery.

vstorm-co/full-stack-ai-agent-template · 53 tokens

gitlab_write

Create, modify resources in GitLab. Use gitlabapi for everything.

ParendumOU/Nexora · 0 tokens

aiocache

Configure or use the aiocache caching layer. Use when: adding cache reads/writes, configuring cache backends, working with TTLs, enabling/disabling caching, or understanding the NoOpCache fallback pattern.

tedivm/robs_awesome_python_template · 47 tokens

backend-patterns

Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes. Use when building or reviewing Node.js, Express, or Next.js API routes and their data access.

affaan-m/ECC · 51 tokens