with one click
api-contract-governance
用于治理统一响应体、分页协议、错误码、前后端 API 消费和运行态接口验证。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
用于治理统一响应体、分页协议、错误码、前后端 API 消费和运行态接口验证。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
用于新增或修改 Sourcelin Uniapp 移动端页面、组件、API、状态、pages.json、manifest 和跨端兼容能力。
用于执行 Sourcelin 跨端架构重构、目录整理、页面拆分、模块边界治理、规则和文档同步。
用于新增或修改 Sourcelin 后端 Controller、Service、Mapper、DTO/VO、异常处理、公共能力和微服务接口。
用于新增或修改 Sourcelin Vue3 管理后台页面、接口封装、表格分页、权限逻辑、模块化组件和 Element Plus 交互。
用于新增或修改 Sourcelin 博客前台 Vue3 页面、组件、模块 API、composable、路由、状态和设计系统接入。
Use when modifying Sourcelin UI Platform modules, shared components, routing, style boundaries, architecture documents, rules, or skills.
| name | api-contract-governance |
| description | 用于治理统一响应体、分页协议、错误码、前后端 API 消费和运行态接口验证。 |
新增或改造后端 REST 接口。
前端接入或修改 API 消费。
修复响应体、分页、错误码或登录态接口验证失败。
对齐 Controller、前端 API 类型和页面消费字段。
待治理接口路径、Controller、前端 API 文件或接口失败列表。
当前统一响应体、分页、错误码和登录态验证要求。
API 契约一致的后端和前端改动。
更新后的接口说明或验证记录。
后端编译、单测、前端类型检查或 HTTP 验证结果。
读取 rules/api-contract.md、rules/testing-and-validation.md。
扫描 Controller 是否存在手动 ApiResponse、对外 R<T>、AjaxResult、TableDataInfo、旧分页参数。
扫描前端是否读取 msg/rows/records/list、判断 code === 200 或使用旧字段 fallback。
后端按业务对象、ListResult<T>、PageResult<T>、IdResponse、Void 修复。
前端按 request 解包后的业务数据和标准分页字段修复。
涉及运行态验证时,使用本地临时登录态执行真实 HTTP 请求,不把账号、密码、token、cookie 写入仓库。
按影响范围执行 Maven、npm 或 pnpm 验证;失败先修复再继续。
rules/api-contract.md
rules/testing-and-validation.md
rules/coding-conventions.md
禁止保留旧字段兼容层。
禁止将 code === 200 作为成功判断。
禁止用 items ?? list 或同类 fallback 掩盖后端问题。
禁止把账号、密码、token、cookie 写入仓库。
禁止把 Feign R<T> 暴露给前端 REST。