backend/api-development

backend/api-development is a skill for Claude Code from echoVic/boss-skill. It costs 26 tokens per session (2,704 once invoked), scanned A, original, MIT.

A guide to building web APIs, including resource URLs, request validation, consistent responses, error handling, authentication, and security.

In plain words
What is it for?
Use it to implement REST or GraphQL endpoints, define request and response types, handle errors, validate input, add pagination, and protect API access.
Why use it?
It helps keep backend interfaces predictable and aligned with the project’s agreed API contract, which is the documented behavior frontend and backend share.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: agent in frontmatter.

Part of the boss plugin — 28 skills, 7 commands, 9 agents, 8 hooks shipped together

Good fit Use it to implement REST or GraphQL endpoints, define request and response types, handle errors, validate input, add pagination, and protect API access.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/echovic/boss-skill/api-development
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 echoVic/boss-skill --skill api-development
Clone the repo
git clone --depth 1 https://github.com/echoVic/boss-skill

Made for: Claude Code.

Or install boss, the plugin that ships this one along with the rest of its 28 skills, 7 commands, 9 agents, 8 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/api-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/echovic/boss-skill/api-development/github.svg)](https://agentmods.dev/skills/echovic/boss-skill/api-development)
Your own site
<a href="https://agentmods.dev/skills/echovic/boss-skill/api-development"><img src="https://agentmods.dev/badge/skills/echovic/boss-skill/api-development/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/api-development

Your own site · 80×15
<a href="https://agentmods.dev/skills/echovic/boss-skill/api-development"><img src="https://agentmods.dev/badge/skills/echovic/boss-skill/api-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,704 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00026 $0.02704
Opus 5.5 $0.00010 $0.01082
Sonnet 5.5 $0.00005 $0.00541
Haiku 4.5 $0.00003 $0.00270

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

Security

Grade A, and why

backend/api-development 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 22d 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.

skill/skills/backend/api-development/SKILL.md · 429 lines

How it starts

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

后端 API 开发方法论

API 契约管理

契约来源

实现 API 前,必须阅读 architecture.md §5(API 设计),获取:

  • API 规范(RESTful/GraphQL)
  • 接口列表(方法、路径、描述、认证要求)
  • 请求/响应格式约定
  • 错误码规范

契约遵守原则

  1. 严格实现:API 端点的方法、路径、参数必须与 architecture.md §5 一致
  2. 响应格式:遵循统一的成功/错误响应结构
  3. 偏差记录:如需偏离契约,必须在输出报告中标注原因
  4. 类型导出:将请求/响应类型导出到共享文件,供前端引用

RESTful API 设计

资源命名规范

操作 HTTP 方法 路径 说明
列表 GET /api/users 获取用户列表
详情 GET /api/users/:id 获取单个用户
创建 POST /api/users 创建新用户
更新 PUT/PATCH /api/users/:id 更新用户
删除 DELETE /api/users/:id 删除用户

统一响应格式

成功响应:

{
  "success": true,
  "data": { ... },
  "message": "Operation successful"
}

错误响应:

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid input data",
    "details": [
      { "field": "email", "message": "Invalid email format" }
    ]
  }
}

分页规范

请求参数:

GET /api/users?page=1&pageSize=20&sortBy=createdAt&order=desc

响应格式:

{
  "success": true,
  "data": {
    "items": [...],
    "pagination": {
      "page": 1,
      "pageSize": 20,
      "total": 100,
      "totalPages": 5
    }
  }
}

请求验证

输入验证层级

  1. 路由层:验证路径参数和查询参数
  2. 中间件层:验证请求体格式和必填字段
  3. Service 层:验证业务规则

验证示例

// 使用验证库(如 Zod、Joi、class-validator)
import { z } from 'zod';

const CreateUserSchema = z.object({
  name: z.string().min(1).max(100),
  email: z.string().email(),
  age: z.number().int().min(0).max(150).optional(),
});

// 在路由处理器中验证
app.post('/api/users', async (req, res) => {
  try {
    const validatedData = CreateUserSchema.parse(req.body);
    const user = await userService.create(validatedData);
    res.json({ success: true, data: user });
  } catch (error) {
    if (error instanceof z.ZodError) {
      res.status(400).json({
        success: false,
        error: {
          code: 'VALIDATION_ERROR',
          message: 'Invalid input data',
          details: error.errors,
        },
      });
    }
  }
});

Read the full file on GitHub · 429 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. 22d ago Changed · +2 lines 08746adf17a9
  2. 1mo ago First seen · 427 lines · 26 tokens per session scan A 0aad2b0d3634

Subscribe to this mod's changes

backend/api-development is a skill published in the GitHub repository echoVic/boss-skill (543 stars, last pushed 3d ago), licensed MIT. It adds 26 tokens to every session and 2,704 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.