test-audit

Audit JavaScript/TypeScript test suites for T1-T4 violations using AST analysis and mock detection.

2|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/ashaykubal/essential-agents-skills --skill test-audit-ashaykubal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-audit
Source: https://github.com/ashaykubal/essential-agents-skills/tree/main/skills/test-audit
Command: npx skills add https://github.com/ashaykubal/essential-agents-skills --skill test-audit-ashaykubal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automatically audits your test suites to identify quality issues, over-mocking, and potential effectiveness gaps, ensuring your tests provide reliable assurance.

Core Features & Use Cases

  • AST-based Analysis: Uses Abstract Syntax Tree (AST) parsing for precise line counting and deterministic violation detection (T1-T4).
  • Mock Detection: Identifies over-mocking and unjustified mocks in unit, integration, and E2E tests.
  • Test Effectiveness Scoring: Calculates a percentage score for each test file based on assertion coverage.
  • Automated Rewrites: Triggers automatic test rewrites when quality gates fail, improving test quality.
  • Use Case: Before merging a pull request, run /test-audit on your test files to catch T1 violations (mock hides failures) or T3+ violations (broken integration chains), ensuring your tests are robust and trustworthy.

Quick Start

Run /test-audit to audit the tests in the current directory.

Frequently Asked Questions about test-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect over-mocking and disabled tests in Jest or Vitest?

Test auditing detects over-mocking and disabled tests in Jest or Vitest by applying AST analysis and mock detection to evaluate test effectiveness and flag T1-T4 violations.

What is AST analysis for detecting test effectiveness gaps?

AST analysis parses test files into an abstract syntax tree to deterministically count lines, detect unjustified mocks, and identify incomplete verification gaps in your test suite.

How do I audit my JavaScript test suite before merging a pull request?

Run a test audit on your JavaScript or TypeScript test files to catch T1 violations like hidden failures and broken integration chains, ensuring your tests remain robust before merging.

Does test auditing work with both unit and integration tests?

Test auditing works with unit, integration, and E2E tests by identifying over-mocking, unjustified mocks, and incomplete verification across JavaScript and TypeScript test files.

Why does my test suite pass but fail to catch actual code regressions?

Your test suite likely contains T1 violations where mocking hides failures or T3 violations breaking integration chains, which AST-based test auditing can identify and help rewrite.

What is the best way to score test effectiveness based on assertion coverage?

Test effectiveness scoring calculates a percentage score for each test file by analyzing assertion coverage and verifying that mocks do not unjustifiably hide integration failures.