api
免费RESTful API design patterns and best practices. Use when creating endpoints, designing APIs, or implementing routes.
中文简介正在准备中。当前显示原文说明。
Testing strategies and methodologies including TDD and E2E testing. Use when writing tests, implementing TDD workflow, or setting up E2E test infrastructure.
中文简介正在准备中。当前显示原文说明。
安装前可以查看交给 AI 代理的指令内容。
关联 Agent:
tdd-guide(测试驱动开发)、code-reviewer(可测试性评估)、build-error-resolver(修复后测试验证)
本技能提供测试策略选择指南,整合 TDD(测试驱动开发)和 E2E(端到端测试)最佳实践。
┌─────────┐
│ E2E │ 少量:验证核心流程
├─────────┤
│集成测试 │ 中等:验证组件交互
├─────────┤
│单元测试 │ 大量:验证独立单元
└─────────┘
| 场景 | 推荐策略 | 参阅文件 |
|---|---|---|
| 新功能开发 | TDD(测试先行) | tdd.md |
| Bug 修复 | 先写失败测试,再修复 | tdd.md |
| 核心用户流程验证 | E2E 测试 | e2e.md |
| 重构现有代码 | 先补测试,再重构 | tdd.md |
| UI 交互验证 | E2E + 视觉回归 | e2e.md |
| 代码类型 | 单元测试 | E2E 测试 |
|---|---|---|
| 核心业务逻辑 | 100% | 关键流程 |
| 普通业务代码 | 80%+ | 可选 |
| 工具函数 | 80%+ | 不需要 |
| UI 组件 | 70%+ | 关键交互 |
RED → GREEN → REFACTOR → REPEAT
RED: 写一个失败的测试
GREEN: 写最少的代码使测试通过
REFACTOR: 改进代码,保持测试绿色
REPEAT: 下一个场景
详细指南参阅 tdd.md
tests/
├── e2e/ # E2E 测试目录
│ ├── auth/ # 认证流程
│ └── core/ # 核心功能
├── pages/ # Page Object Model
└── playwright.config.ts
详细指南参阅 e2e.md
# 单元测试
npm test
npm test -- --coverage
# E2E 测试
npx playwright test
npx playwright test --headed # 可视化
npx playwright test --debug # 调试模式
记住:测试不是可选项。它是支持自信重构、快速开发和生产可靠性的安全网。
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
RESTful API design patterns and best practices. Use when creating endpoints, designing APIs, or implementing routes.
中文简介正在准备中。当前显示原文说明。
Architecture design skill: ADR records, system design checklists, scalability assessment, architecture patterns. Use for complex system design and architecture decisions.
中文简介正在准备中。当前显示原文说明。
Backend development patterns for services, error handling, logging, caching. Use when building backend services, APIs, or microservices.
中文简介正在准备中。当前显示原文说明。
Strategic compaction skill: suggests context compression at logical breakpoints. Use to suggest compaction at logical intervals during development sessions.
中文简介正在准备中。当前显示原文说明。
Database design, query optimization, migrations, and indexing. Use when designing schemas, writing queries, or managing migrations.
中文简介正在准备中。当前显示原文说明。
Systematic debugging methods, log analysis, and performance diagnostics. Use when debugging issues, analyzing errors, or troubleshooting incidents.
中文简介正在准备中。当前显示原文说明。