backend-standards-always-follow
GitHub作为后端开发强制基线,触发时自动加载10个配套技能。适用于API、路由、控制器、数据库等所有后端任务。要求保持控制器精简、逻辑在Service层、严格验证与错误处理,并限制文件行数,确保代码规范与合规。
Trigger Scenarios
Install
npx skills add AjayIrkal23/agentic-mercy-10x --skill backend-standards-always-follow -g -y
SKILL.md
Frontmatter
{
"name": "backend-standards-always-follow",
"schema": 1,
"category": "backend",
"surfaces": [
"backend"
],
"triggers": {
"paths": [
"\/models\/",
"controller",
"internal\/",
"internal\/models\/",
"server\/",
"service"
],
"intents": [
"backend"
],
"keywords": [
"acceptance",
"always",
"always-on",
"api",
"auth",
"backend",
"backend\/server",
"baseline",
"behavior",
"bugfix",
"completion",
"compliance",
"contract",
"controller",
"core",
"debugging",
"delegation",
"follow",
"implementation",
"integration",
"member",
"part",
"persistence",
"planning",
"queue",
"requested",
"review",
"route",
"schema",
"server\/fastify",
"service",
"standards",
"surface",
"trigger",
"validation",
"worker"
]
},
"platforms": [
"linux",
"darwin",
"windows"
],
"token-cost": 711,
"description": "ALWAYS invoke when any backend API, route, controller, schema, service, contract, persistence, auth, validation, worker, queue, integration, server\/Fastify behavior, backend bugfix, or implementation is requested. Backend Core Compliance Set member for the always-on backend baseline — MUST use for any backend\/server trigger surface before planning, debugging, implementation, review, delegation, or completion acceptance.",
"disable-model-invocation": false
}
Backend Standards Always Follow
🔒 MANDATORY COMPANION BUNDLE — load ALL now, every time, no exceptions
Reading this skill is the trigger. Before doing ANY backend work you MUST immediately
Skill-invoke all of the following, end to end. Not "when the work clearly needs them" — always, as a set, the moment this baseline loads:
backend-api-standardsservice-layer-standardsbackend-error-handlingbackend-performance-standardsbackend-code-reviewapi-contract-standardsscaffold-standardsgolang-patternsgolang-testingpostgres-patternsThese 10 are the companion skills for backend work — NAMED here as trigger pointers so none is lost. Load a companion's BODY lazily, only when the task actually needs it — not all 10 in full up front.
Overview
This is the always-on backend baseline. The active backend stack is Go (GO_UDP) — all examples are Go-first; Node/TS/Fastify/Mongo variants live in references/node-stack.md.
Start here for any backend task. The companion bundle above is NAMED (trigger pointers); load each companion's body LAZILY, only when the task needs it — not all in full every time.
Always Apply
- Inspect existing routes, controllers, schemas, services, models, and helpers before changing behavior.
- Preserve current response shapes, DB fields, and domain behavior unless the task explicitly changes them.
- Keep controllers thin and keep business logic in services.
- Keep filtering, sorting, pagination, and search backend-driven for list endpoints.
- Validate request shapes with schemas instead of scattered ad hoc checks.
- Keep manually maintained backend source files at or below 250 lines. If a touched file is already over 250 lines, split or reduce it before adding more behavior unless the user explicitly scopes that cleanup out.
- Remove stale imports, replaced logic, and dead backend paths while you work.
Non-Negotiables
- No guessing when the repo already shows the pattern.
- No business logic hidden in controllers.
- No unbounded list endpoints for real datasets.
- No raw internal errors, stack traces, or driver errors leaking to clients.
- No touched manually maintained backend source file may remain over 250 lines without an explicit blocker.
- No partial old/new backend implementations left behind without a reason.
Load Next When Needed
service-layer-standardsfor controller/service boundaries and service contracts.backend-api-standardsfor detailed list/search endpoint semantics.api-contract-standardsfor success/error envelopes and contract compatibility.backend-error-handlingfor centralized handler rules and error taxonomy.backend-performance-standardsfor query-efficiency or scalability review.scaffold-standardsfor new domain or feature skeletons.
Completion Checklist
- Existing backend patterns were inspected first.
- Controllers stayed thin.
- Business logic stayed in services.
- Query behavior remained backend-driven.
- No stale backend code was left behind.
Version History
- 581d130 Current 2026-07-19 09:04


