원클릭으로
test-audit
Test coverage analysis to ensure adequate testing, Storybook coverage, and test quality.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Test coverage analysis to ensure adequate testing, Storybook coverage, and test quality.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | test-audit |
| description | Test coverage analysis to ensure adequate testing, Storybook coverage, and test quality. |
Analyze test coverage in your codebase to ensure:
Rule: Maintain at least 60% test coverage baseline for business logic.
Analyzes:
Coverage Calculation:
.test.ts(x) or .spec.ts(x) filesExample:
Coverage Summary
--------------------------------------------------------------------------------
Total source files: 150
Test files: 95 (63%)
Story files: 45 (30%)
Tested files: 105
Untested files: 45
Coverage estimate: ~70%
✅ Test coverage is 70% (>= 60% threshold)
Recommendations:
.test.ts(x) files for business logicCheck: check_test_coverage.mjs
Rule: Maintain at least 40% story coverage for UI components.
Analyzes:
Detection:
components/ or ui/ directories.stories.ts(x) files to componentsExample:
Story Coverage Summary
--------------------------------------------------------------------------------
Total components: 60
Story files: 28
Components without stories: 32
Story coverage: ~47%
✅ Story coverage is 47% (>= 40% threshold)
Benefits of Storybook:
Recommendations:
.stories.ts(x) for reusable UI componentsCheck: check_story_coverage.mjs
Rule: Test files should not contain TODO/FIXME/HACK comments.
Why: Incomplete tests indicate gaps in coverage and technical debt.
Detects:
Violations:
// ❌ WRONG - TODO in test file
test('should handle edge case', () => {
// TODO: Implement this test
});
// ❌ WRONG - FIXME indicates broken test
test('should update user', () => {
// FIXME: This test is flaky
});
// ✅ CORRECT - Complete tests only
test('should handle edge case', () => {
const result = handleEdgeCase(input);
expect(result).toBe(expected);
});
// ✅ CORRECT - Use test.skip for intentionally skipped tests
test.skip('should handle future feature', () => {
// Test for future implementation
});
Impact:
Recommendations:
Check: check_test_todos.mjs
node ./.claude/skills/test-audit/scripts/run_all_checks.mjs
# Test coverage check
node ./.claude/skills/test-audit/scripts/check_test_coverage.mjs
# Storybook coverage check
node ./.claude/skills/test-audit/scripts/check_story_coverage.mjs
# Test TODOs check
node ./.claude/skills/test-audit/scripts/check_test_todos.mjs
To save a comprehensive markdown report of all checks:
node ./.claude/skills/test-audit/scripts/generate_report.mjs
Output: reports/{YYYY-MM-DD_HH-MM}/test-audit-report.md
Report includes:
Environment variable:
# Custom report directory
export REPORT_DIR="reports/my-custom-timestamp"
node ./.claude/skills/test-audit/scripts/generate_report.mjs
Usage patterns:
# Option 1: Console output only (default)
node ./.claude/skills/test-audit/scripts/run_all_checks.mjs
# Option 2: Console output + Save report
node ./.claude/skills/test-audit/scripts/generate_report.mjs
# Option 3: Specific check only
node ./.claude/skills/test-audit/scripts/check_test_coverage.mjs
Report structure:
reports/
└── 2025-11-01_14-30/ # Includes hours and minutes for multiple runs per day
├── test-audit-report.md # This skill's report
├── security-audit-report.md # Security audit (separate)
├── code-audit-report.md # Code quality audit (separate)
├── arch-audit-report.md # Architecture audit (separate)
└── ... # Other reports
Each check produces:
Example output:
Test Coverage Check
================================================================================
Coverage Summary
--------------------------------------------------------------------------------
Total source files: 150
Test files: 95 (63%)
Story files: 45 (30%)
Tested files: 105
Untested files: 45
Coverage estimate: ~70%
✅ Test coverage is 70% (>= 60% threshold)
================================================================================
Summary: Coverage at 70%
reports/{timestamp}/test-audit-report.md (only when generating reports)reports/ directoryComprehensive static code analysis to enforce architectural patterns, conventions, and code quality standards.
Architecture dependency analysis to ensure proper feature isolation and composition root pattern.
Comprehensive documentation generation through automated codebase analysis, pattern detection, and diagram creation.
Dependency health analysis to detect outdated packages and unused dependencies.
Safe minor dependency updates with validation (lint/test/build) and automatic rollback on failure.
Security vulnerability analysis to detect hardcoded secrets, dangerous patterns, and unsafe code practices.