一键导入
api
Workflow for API development and modification with strict checks from design to deployment
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Workflow for API development and modification with strict checks from design to deployment
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | api |
| description | Workflow for API development and modification with strict checks from design to deployment |
Use this when building new API endpoints or modifying existing ones in core-api/. Covers the full lifecycle from specification through implementation, testing, and generation.
New API:
Existing API Modification:
API Definition (all APIs):
@Doc()getWorkspaceId: true if workspaceId required/dtos with class-validatorcode, message, detailsController: Routing, DTO validation, request/response mapping only. No business logic. New endpoints before /:id routes.
Service: All business logic. Strict typing, async/await. Consistent error handling with custom exceptions. Performance optimizations (pagination, caching, efficient queries).
Entity: Review schema consistency in src/common/entity/*. Proper indexing for frequently queried fields.
User Data Exposure: Responses limited to id, name, image.
DTO Rules: @ApiProperty() for Swagger & codegen. Accept minimum required input. Use DefaultMessageResponseDto for success messages.
Service tests are mandatory (*.service.spec.ts). Cover valid input, invalid input/edge cases, error handling, and performance. Mock all external dependencies. Use valid UUID v4+ via randomUUID.
ESLint and Prettier: 0 errors, 0 warnings.
All tests pass with 80%+ coverage for business logic.
If new API or DTO changes were made, run task console:gen-api to regenerate client types.
Document what was added/changed, list modified files, confirm tests ✅ lint ✅ coverage ✅, mark READY FOR REVIEW.
/users), hierarchical (/users/:userId/orders), consistent params (:userId)class-validator. Success mutations return { "message": "Success" }# Test specific module
npm run test -- <path-to-spec-file>
# Generate console API client types
task console:gen-api
# Lint
npm run lint
Execute security scanning commands on remote worker agents. Use when you need to run CLI tools like nmap, subfinder, httpx, nuclei, or any shell command on worker nodes.
Perform deep analysis of CVEs and security vulnerabilities including CVSS scoring, affected versions, exploit maturity, and remediation steps. Use when the user needs detailed vulnerability intelligence.
Perform web research using CVE databases, security advisories, and threat intelligence sources. Use when the user asks about CVEs, security news, vulnerabilities, patch releases, or any external security information not available in the workspace.
Workflow for committing code with comprehensive validation from linting to deployment
Workflow for creating and submitting bug reports to GitHub
Strict bug fix workflow from root cause analysis to deployment and regression testing