test-sync_skill

This skill helps maintain test-suite alignment by detecting orphaned tests, missing tests, and implementation-coupled tests to streamline cleanup and
  • TypeScript

92

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill jmagly/aiwg --skill test-sync

  • SKILL.md8.1 KB

Overview

This skill detects orphaned tests, obsolete assertions, and test-to-code misalignment to keep TypeScript test suites healthy. It focuses on finding tests that reference deleted or moved code, identifying missing tests for testable source files, and flagging tests that are overly coupled to implementation details. Use it to maintain traceability, reduce test smells, and simplify test-suite cleanup before releases.

How this skill works

The analyzer scans project test and src directories to infer tested modules from imports and file paths, then checks whether those source files still exist. It extracts public functions to identify missing tests and applies pattern-based heuristics to detect implementation-coupled assertions (private method calls, internal-state access, over-mocking). Results are returned as a mapping of test files to inferred source, alignment status, and categorized findings (orphaned, missing, coupled).

When to use it

  • After large refactors or file renames
  • During test-suite health audits or sprint cleanup
  • When tests fail due to deleted or moved code
  • Before releases to remove stale tests and reduce noise
  • When test counts or coverage don’t reflect recent code changes

Best practices

  • Run the sync check in CI or pre-commit with a dry-run option before automated deletion
  • Treat findings as signals for human review—automated deletes only for clear orphaned files
  • Prioritize fixes by risk (critical production paths first) and add missing tests for public APIs
  • Refactor implementation-coupled tests to assert observable behavior, not private state
  • Record traceability in test metadata to simplify future mappings

Example use cases

  • Find and safely remove tests whose source files were deleted in a refactor
  • List source files that lack tests and scaffold suggested test files and test cases
  • Detect tests that call private helpers or assert internal structure, recommending behavior-driven rewrites
  • Build a test-to-source map for reporting and gating in CI pipelines
  • Run periodic test-sync audits and feed results into test health dashboards

FAQ

It can suggest and optionally remove clear orphaned test files, but automated deletion should be gated behind a dry-run and human review step.

How does it detect implementation-coupled tests?

It uses regex-based patterns to find private method access, internal-state references, deep mocking, and brittle assertions, then flags tests likely to break on safe refactors.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
test-sync skill by jmagly/aiwg | VeilStrat