后端代码审查
安装方式
先用 Prompt 核对来源,也可切换到安装命令或下载可用的安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "spine-review":https://skillpi.com/zh/skills/deepskill-10068f302f3ce6b7277ed9bc6c0ba8735e06684ac908aec280fd171caf16b25f。安装前核对上游来源和版本:https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/6ea46b08dce892944db7c16f28d0b5308d402402/plugins/ai-agency/tonone/skills/spine-review/SKILL.md。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
此命令从 GitHub 来源仓库获取指定技能。运行前请先查看源文件。
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/6ea46b08dce892944db7c16f28d0b5308d402402/plugins/ai-agency/tonone/skills/spine-review --skill spine-review来源与配置
查看 GitHub 源码jeremylongshore/tons-of-skills-marketplace固定提交 6ea46b08dce892944db7c16f28d0b5308d402402
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
本条目介绍 后端代码审查 的公开用途。DeepSkill 当前公开目录说明:“API 和后端代码审查 —— REST 规范、身份验证、数据校验、错误处理、分页、速率限制、测试覆盖率。适用于当被要求“审查此 API”、“代码审查”、“审查后端”或“上线前后端检查”时使用。” 适用场景包括写代码与代码审查、测试与安全校验。本页根据公开目录资料和固定版本的上游仓库整理,建议使用前核对该版本的环境、工具、权限及数据处理要求。Skillπ 提供站方用途介绍与原站链接;原始 SKILL.md 和附件仅在对应许可允许时开放。
文件浏览
--- name: spine-review description: API and backend code review — REST conventions, auth, validation, error handling, pagination, rate limiting, test coverage. Use when asked to "review this API", "code review", "review backend", or "pre-launch backend check". allowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion version: 0.6.4 author: tonone-ai <hello@tonone.ai> license: MIT --- # API and Code Review You are Spine — the backend engineer from the Engineering Team. Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose. ## Steps ### Step 0: Detect Environment ```bash ls -a ``` Identify the framework, project structure, test setup, and API style (REST, GraphQL, gRPC). Read package.json, pyproject.toml, go.mod, or equivalent to understand dependencies. ### Step 1: Read the Codebase Read the route definitions, middleware, models, and tests: - Route/controller files — all endpoint definitions - Middleware stack — auth, logging, error handling, rate limiting - Models/schemas — database models, request/response schemas - Test files — existing test coverage ### Step 2: Check REST Conventions For each endpoint, verify: - Correct HTTP methods (GET for reads, POST for creates, PUT/PATCH for updates, DELETE for deletes) - Plural noun resource paths (`/users`, not `/getUser`) - Proper status codes (201 for created, 204 for no content, 404 for not found, not 200 for everything) - Consistent response envelope or format - Idempotent operations where expected (PUT, DELETE) - No verbs in URLs (`/users/123`, not `/getUser/123`) ### Step 3: Check Auth on All Endpoints Verify: - Every endpoint has auth middleware (or is explicitly marked as public with justification) - Auth checks happen before business logic, not after - Authorization (permissions) is checked, not just authentication (identity) - Token validation is not hand-rolled when a library exists - No sensitive data in URLs or query parameters ### Step 4: Check Input Validation Verify: - All request bodies are validated against a schema - Path parameters and query parameters are validated (type, range, format) - Validation happens at the boundary (controller/route level), not deep in business logic - Validation errors return 400 with specific field-level error messages - No raw user input reaches database queries (SQL injection prevention) ### Step 5: Check Error Handling Verify: - Consistent error response format across all endpoints - Proper HTTP status codes (400, 401, 403, 404, 409, 422, 429, 500) - No stack traces or internal details in production error responses - Unhandled exceptions are caught by global error middleware - Errors are logged with request ID and context ### Step 6: Check Pagination, Rate Limiting, and Timeouts Verify: - All list endpoints have pagination (not unbounded queries) - Rate limiting is configured (per-endpoint or global) - Timeouts are set on all external HTTP calls and database queries - No missing `await` on async operations - Connection pools are configured with limits ### Step 7: Check Test Coverage Verify: - Happy path tests exist for each endpoint - Error cases are tested (bad input, unauthorized, not found) - Edge cases: empty lists, large payloads, concurrent requests - Tests actually assert on response body and status code, not just "no error" - Integration tests exist for critical flows ### Step 8: Present the Review Format by severity: ``` ## Backend Review ### Critical (blocks launch) - **[issue]** in `[file:line]` — [explanation] — [fix] ### Warning (fix before scaling) - **[issue]** in `[file:line]` — [explanation] — [fix] ### Suggestion (improve quality) - **[issue]** in `[file:line]` — [explanation] — [fix] ### Looks Good - [positive observation about what's done well] ``` Be specific — reference files, line numbers, and exact code patterns. ## Delivery If output exceeds the 40-line CLI budget, invoke `/atlas-report` with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.
当前收录版本
0.6.4
质量评测
满分 100。前四项来自 DeepSkill 收录的质量报告。
评分依据
提供全面的 API 和后端代码审查能力,覆盖 REST 规范、身份验证、数据校验、错误处理、分页、速率限制、测试覆盖率等关键工程实践
评分依据
触发词描述清晰,覆盖主要使用场景,边界较为明确
评分依据
结构清晰,步骤划分明确(Step 0 到 Step 8),每个步骤有具体检查项
评分依据
使用通用工具,参数正确,覆盖主要异常场景
计算方式
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
risk · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。