界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
开发与工程 · SKILL.md

test-coverage

test-coverage

【开发与工程】Imported from everything-codex command test-coverage

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: test-coverage description: Imported from everything-codex command test-coverage version: 0.1.0 source: fork checksum: b2e84d15a3239c5b0f88271ce20f62d30f12eec1da3b9e62d766b271def7a07d updated_at: 2026-02-11T09:29:16+08:00 intent: testing layer: quality

Test Coverage

Native Subagent Protocol (Codex)

Codex supports native subagents. Delegate with spawn_agent, coordinate with send_input, collect via wait_agent, and clean up with close_agent.

Execution preference:

  1. Use native subagents first for independent workstreams (parallel when possible).
  2. Merge results in main thread and run final verification.
  3. Fallback only when delegation is blocked: use the [ANALYST]/[ARCHITECT]/[EXECUTOR]/[REVIEWER] structure in a single response.

Minimal orchestration pattern:

spawn_agent -> send_input (optional) -> wait_agent -> close_agent

Analyze test coverage and generate missing tests:

  1. Run tests with coverage: npm test --coverage or pnpm test --coverage

  2. Analyze coverage report (coverage/coverage-summary.json)

  3. Identify files below 80% coverage threshold

  4. For each under-covered file:

    • Analyze untested code paths
    • Generate unit tests for functions
    • Generate integration tests for APIs
    • Generate E2E tests for critical flows
  5. Verify new tests pass

  6. Show before/after coverage metrics

  7. Ensure project reaches 80%+ overall coverage

Focus on:

  • Happy path scenarios
  • Error handling
  • Edge cases (null, undefined, empty)
  • Boundary conditions
我的收藏