test-sync

Detect orphaned tests and test-code misalignment between test suites and source code.

175|26|Updated Aug 14, 2025
One-click install
npx skills add https://github.com/jmagly/ai-writing-guide --skill test-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-sync
Source: https://github.com/jmagly/ai-writing-guide/tree/main/.factory/skills/test-sync
Command: npx skills add https://github.com/jmagly/ai-writing-guide --skill test-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Maintains alignment between tests and source code by detecting orphaned tests, missing coverage, and implementation coupling.

Core Features & Use Cases

  • Orphaned test detection: Find tests for deleted/renamed code.
  • Missing coverage detection: Identify sources without tests.
  • Implementation-coupled tests: Detect tests that depend on implementation specifics.

Quick Start

Use after major refactors to ensure tests reflect current code structure.

Frequently Asked Questions about test-sync

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

FAQPage Schema
How do I detect orphaned tests after refactoring code?

Orphaned test detection identifies tests written for code that no longer exists or has been renamed. Run test-sync after major refactors to find tests referencing deleted functions, classes, or modules, then remove or update them to maintain suite health and prevent misleading coverage reports.

What's the best way to find missing test coverage in my codebase?

Missing coverage detection scans your source code to identify functions, classes, and modules without corresponding tests. test-sync maps source code to test suites and flags gaps, helping you prioritize what to test and ensuring critical paths have traceability before deployment.

How do I know if my tests are too tightly coupled to implementation?

Implementation-coupled tests fail when internal code changes even if external behavior stays the same. test-sync flags tests that depend on specific implementation details, helping you refactor them to test behavior instead and making your suite more resilient to refactors.

When should I run a test suite health audit?

Run test-sync after major refactors, during routine health audits, or when tests fail for deleted or renamed code. It generates a structured report with risk indicators and remediation steps, guiding cleanup, coverage rebaselining, and validation of test-to-code traceability.

Can test-sync work with any test framework or language?

test-sync analyzes test-to-source mappings and structural alignment independent of framework specifics. It works across codebases using different test frameworks and languages by examining test names, imports, and code references to detect orphaned tests and coverage gaps.

What output does test-sync provide after analysis?

test-sync outputs a structured report containing test-to-code mappings, risk indicators for orphaned and missing tests, implementation-coupling flags, and actionable remediation recommendations to guide cleanup and coverage decisions.