Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Updates, generates, and validates tests using git-workspace context and TDD/BDD methodology. Use when code changes require new or updated test coverage.
.claude/skills/athola-test-updates/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 166% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 78% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 126% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 311% | 0% |
detailed test management system that applies TDD/BDD principles to maintain, generate, and enhance tests across codebases. This skill practices what it preaches - it uses TDD principles for its own development and serves as a living example of best practices.
A modular test management system that:
pip install pytest)src/ or similar directorytests/ directory if it doesn't existSkill(sanctum:git-workspace-review) first to understand changesSkill(test-updates) --target <specific-module> for focused updatesbash# Run full test update workflow Skill(test-updates)
Verification: Run pytest -v to verify tests pass.
bash# Update tests for specific paths Skill(test-updates) --target src/sanctum/agents Skill(test-updates) --target tests/test_commit_messages.py
Verification: Run pytest -v to verify tests pass.
bash# Apply TDD to new code Skill(test-updates) --tdd-only --target new_feature.py
Verification: Run pytest -v to verify tests pass.
Human-Readable Output:
bash# Analyze test coverage gaps python plugins/sanctum/scripts/test_analyzer.py --scan src/ # Generate test scaffolding python plugins/sanctum/scripts/test_generator.py \ --source src/my_module.py --style pytest_bdd # Check test quality python plugins/sanctum/scripts/quality_checker.py \ --validate tests/test_my_module.py
Verification: Run pytest -v to verify tests pass.
Programmatic Output (for Claude Code):
bash# Get JSON output for programmatic parsing - test_analyzer python plugins/sanctum/scripts/test_analyzer.py \ --scan src/ --output-json # Returns: # { # "success": true, # "data": { # "source_files": ["src/module.py", ...], # "test_files": ["tests/test_module.py", ...], # "uncovered_files": ["module_without_tests", ...], # "coverage_gaps": [{"file": "...", "reason": "..."}] # } # } # Get JSON output - test_generator python plugins/sanctum/scripts/test_generator.py \ --source src/my_module.py --output-json # Returns: # { # "success": true, # "data": { # "test_file": "path/to/test_my_module.py", # "source_file": "src/my_module.py", # "style": "pytest_bdd", # "fixtures_included": true, # "edge_cases_included": true, # "error_cases_included": true # } # } # Get JSON output - quality_checker python plugins/sanctum/scripts/quality_checker.py \ --validate tests/test_my_module.py --output-json # Returns: # { # "success": true, # "data": { # "static_analysis": {...}, # "dynamic_validation": {...}, # "metrics": {...}, # "quality_score": 85, # "quality_level": "QualityLevel.GOOD", # "recommendations": [...] # } # }
Verification: Run pytest -v to verify tests pass.
Use this skill when you need to:
Perfect for:
test suites - use pensive:test-review
test suites - use pensive:test-review
See modules/test-discovery.md for detection patterns.
modules/bdd-patterns.md)Before writing behavioral tests, identify the design invariants that the code relies on and write tests that would break if those invariants were violated.
What to encode:
never the reverse)
without versioning)
test the properties that justify that choice)
zones)
Example:
pythondef test_plugins_never_import_from_other_plugins(): """Encode the invariant: plugins are independent modules. If this test breaks, someone is coupling plugins directly. Present the 3 options to a human: 1. Preserve: revert the import, keep plugins independent 2. Layer: add a shared interface in leyline instead 3. Revise: merge the plugins (requires ADR) """ for plugin_dir in plugin_dirs: imports = extract_imports(plugin_dir) for imp in imports: assert not imp.startswith("plugins."), ( f"{plugin_dir} imports {imp} — violates plugin independence invariant" )
Why this matters: Tests that encode invariants are load-bearing. When an agent later encounters a feature that clashes with the invariant, the test failure forces a conscious decision rather than a silent drift. Without these tests, bad invariant decisions compound until the codebase is unsalvageable.
When updating existing tests:
If an invariant-encoding test needs to change, do NOT silently update the assertion. Flag it for human review with the three options: preserve the invariant, layer on top, or revise the invariant. This is a judgment call that requires human wisdom: models default to the "average" of training data and get these wrong far too often.
modules/tdd-workflow.mdSee modules/test-generation.md for generation templates.
See modules/quality-validation.md for validation criteria.
The skill applies multiple quality checks:
See modules/bdd-patterns.md for additional patterns.
pythonclass TestGitWorkflow: """BDD-style tests for Git workflow operations.""" def test_commit_workflow_with_staged_changes(self): """ GIVEN a Git repository with staged changes WHEN the user runs the commit workflow THEN it should create a commit with proper message format AND all tests should pass """ # Test implementation following TDD principles pass
Verification: Run pytest -v to verify tests pass.
See modules/test-enhancement.md for enhancement strategies.
Q: Tests are failing after generation A: This is expected! The skill follows TDD principles - generated tests are designed to fail first. Follow the RED-GREEN-REFACTOR cycle:
Q: Quality score is low despite having tests A: Check for these common issues:
assert result is not NoneQ: Generated tests don't match my code structure A: The scripts analyze AST patterns and may need guidance:
--style flag to match your preferred BDD styleQ: Mutation testing takes too long A: Mutation testing is resource-intensive:
--quick-mutation flag for subset testingQ: Can't find tests for my file A: The analyzer uses naming conventions:
my_module.py → Test: test_my_module.py--target to focus on specific directories--verbose flag for more informationpytest -v passes with zero failures after all test updatesare applied to the target files
pytest --cov
the BDD pattern from modules/bdd-patterns.md
quality_checker.py --validate <test_file> --output-jsonreturns quality_score ≥ 80 for each updated test file
review with the three options (preserve/layer/revise) before any assertion is modified
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 3,316 | 6,682 | +102% | 1 | 1 | 0% | 376 | 3,397 | +803% | 0 | 0 | — |
case-02 | fail→fail | 5,125 | 6,406 | +25% | 1 | 1 | 0% | 262 | 3,429 | +1209% | 0 | 0 | — |
case-03 | fail→fail | 7,061 | 6,471 | -8% | 1 | 1 | 0% | 414 | 3,379 | +716% | 0 | 0 | — |
case-04 | fail→pass | 15,886 | 4,469 | -72% | 1 | 1 | 0% | 2,614 | 3,837 | +47% | 0 | 0 | — |
case-05 | fail→fail | 14,754 | 29,586 | +101% | 1 | 1 | 0% | 3,087 | 9,253 | +200% | 0 | 0 | — |
case-06 | pass→pass | 6,004 | 9,638 | +61% | 1 | 1 | 0% | 1,032 | 4,802 | +365% | 0 | 0 | — |
case-07 | fail→pass | 10,177 | 2,955 | -71% | 1 | 1 | 0% | 1,310 | 3,482 | +166% | 0 | 0 | — |
case-08 | fail→pass | 12,009 | 2,742 | -77% | 1 | 1 | 0% | 1,891 | 3,364 | +78% | 0 | 0 | — |
case-09 | fail→pass | 9,549 | 2,442 | -74% | 1 | 1 | 0% | 1,526 | 3,446 | +126% | 0 | 0 | — |
case-10 | fail→pass | 5,151 | 2,751 | -47% | 1 | 1 | 0% | 854 | 3,514 | +311% | 0 | 0 | — |
case-11 | fail→pass | 7,146 | 2,514 | -65% | 1 | 1 | 0% | 1,110 | 3,457 | +211% | 0 | 0 | — |
case-12 | fail→pass | 11,275 | 1,883 | -83% | 1 | 1 | 0% | 1,951 | 3,350 | +72% | 0 | 0 | — |
case-13 | fail→pass | 15,093 | 4,866 | -68% | 1 | 1 | 0% | 1,434 | 3,771 | +163% | 0 | 0 | — |
case-14 | fail→pass | 7,284 | 3,374 | -54% | 1 | 1 | 0% | 1,051 | 3,604 | +243% | 0 | 0 | — |
case-15 | fail→pass | 5,368 | 2,235 | -58% | 1 | 1 | 0% | 843 | 3,344 | +297% | 0 | 0 | — |
case-16 | fail→pass | 11,629 | 1,967 | -83% | 1 | 1 | 0% | 1,815 | 3,366 | +85% | 0 | 0 | — |
case-17 | pass→pass | 3,922 | 2,979 | -24% | 1 | 1 | 0% | 473 | 3,612 | +664% | 0 | 0 | — |
case-18 | pass→pass | 11,172 | 2,056 | -82% | 1 | 1 | 0% | 1,755 | 3,332 | +90% | 0 | 0 | — |
case-19 | pass→pass | 4,867 | 4,490 | -8% | 1 | 1 | 0% | 762 | 3,721 | +388% | 0 | 0 | — |
case-20 | pass→pass | 8,991 | 5,404 | -40% | 1 | 1 | 0% | 1,402 | 3,849 | +175% | 0 | 0 | — |
case-21 | fail→pass | 9,986 | 2,366 | -76% | 1 | 1 | 0% | 1,748 | 3,327 | +90% | 0 | 0 | — |
case-22 | pass→pass | 4,854 | 3,028 | -38% | 1 | 1 | 0% | 702 | 3,491 | +397% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +55 percentage points is the difference between those two pass rates over the 19 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.