jmagly/aiwg/test-sync
Claude Code and agent skill by jmagly/aiwg
- community
Checking that the SKILL.md file is still in the repository.
Detect orphaned tests, obsolete assertions, and test-code misalignment. Use for test suite maintenance, cleanup, and traceability validation.
Install
npx vskill@latest install jmagly/aiwg/test-syncSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Test Sync Skill
Purpose
Maintain alignment between test files and source code. Detect orphaned tests (code deleted but tests remain), missing tests, and implementation-coupled tests. Based on UTRefactor research showing automated test maintenance can achieve 89% smell reduction.
Research Foundation
| Concept | Source | Reference | |
|---|---|---|---|
| Test Refactoring | UTRefactor (ACM 2024) | 89% smell reduction | |
| Test Smells | Meszaros (2007) | "xUnit Test Patterns" | |
| Test-Code Traceability | IEEE TSE | Test maintenance research |
When This Skill Applies
- After major refactoring
- During test suite health audits
- When tests fail for deleted code
- Before releases (cleanup validation)
- When test count seems disconnected from codebase
Trigger Phrases
| Natural Language | Action | |
|---|---|---|
| "Find orphaned tests" | Detect tests for deleted code | |
| "Sync tests with code" | Full alignment analysis | |
| "Are my tests up to date?" | Test-code sync check | |
| "Clean up test suite" | Find removable tests | |
| "Test coverage gaps" | Find missing tests |
Sync Analysis Types
1. Orphaned Test Detection
Tests that reference deleted or renamed code:
2. Missing Test Detection
Source files without corresponding tests:
3. Implementation-Coupled Test Detection
Tests that test implementation details rather than behavior:
4. Test-Code Mapping
Verify traceability between tests and source:
Output Format
rm test/auth/legacy-login.test.ts
// Remove this test block: describe('formatCurrency', () => { ... });
// Scaffold describe('PaymentProcessor', () => { describe('processPayment', () => { it('should process valid payment'); it('should reject insufficient funds'); it('should handle network errors'); });
describe('refundPayment', () => { it('should refund valid transaction'); it('should reject invalid transaction'); }); });
it('should validate email', () => { expect(service._validateEmail('test@test.com')).toBe(true); });
it('should reject user with invalid email', () => { expect(() => service.createUser({ email: 'invalid' })) .toThrow('Invalid email'); });
- name: Test Sync Check
run: | npx test-sync --project . --strict # Fails if orphaned tests or missing critical tests
Cleanup Actions
Safe Deletions (Automated)
Manual Review Required
- Tests for code moved to different module
- Tests that may cover shared utilities
- Tests with unclear naming
Integration Points
- Works with
/check-traceabilitycommand - Reports to Test Architect
- Feeds into test health metrics
- Part of
/project-health-check
Script Reference
test_sync.py
Run sync analysis:
cleanup_orphans.py
Remove orphaned tests:
References
- @$AIWG_ROOT/agentic/code/addons/testing-quality/README.md — Testing quality addon overview
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/README.md — SDLC framework context for test traceability
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/human-authorization.md — Authorization before deleting test files
- @$AIWG_ROOT/docs/cli-reference.md — CLI reference for check-traceability command
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagentic/code/addons/testing-quality/skills/test-sync/SKILL.md
Popularity
- Repository stars
- 96
- Repository forks
- 12
- Repository npm downloads, 7 days
- 2,424
- 7-day trend score
- 41
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 19 Mar 2026, 8 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jmagly/aiwg/test-sync)