test-updates
БесплатноБез исполняемых скриптовНе проверенUpdates, generates, and validates tests using git-workspace context and TDD/BDD methodology. Use when code changes require new or updated test coverage.
Об этом скилле
Test Updates and Maintenance
Overview
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 is a living example of best practices.
Core Philosophy
- RED-GREEN-REFACTOR: Strict adherence to TDD cycle
- Behavior-First: BDD patterns that describe what code should do
- Invariant-Encoding: Tests guard design decisions as well as behavior
- Meta Dogfooding: The skill's own tests demonstrate the principles it teaches
- Quality Gates: detailed validation before considering tests complete
What It Is
A modular test management system that:
- Discovers what needs testing or updating
- Generates tests following TDD principles
- Enhances existing tests with BDD patterns
- Validate test quality through multiple lenses
Quick Start
Quick Checklist for First Time Use
- validate pytest is installed (
pip install pytest) - Have your source code in
src/or similar directory - Create a
tests/directory if it doesn't exist - Run
Skill(sanctum:git-workspace-review)first to understand changes - Start with
Skill(test-updates) --target <specific-module>for focused updates
detailed Test Update
# Run full test update workflow
Skill(test-updates)
Verification: Run pytest -v to verify tests pass.
Targeted Test Updates
# 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.
TDD for New Features
# Apply TDD to new code
Skill(test-updates) --tdd-only --target new_feature.py
Verification: Run pytest -v to verify tests pass.
Using the Scripts Directly
Human-Readable Output:
# 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):
# 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.
When To Use It
Use this skill when you need to:
- Update tests after code changes
- Generate tests for new features
- Improve existing test quality
- validate detailed test coverage
Perfect for:
- Pre-commit test validation
- CI/CD pipeline integration
- Refactoring with test safety
- Onboarding new developers
When NOT To Use
- Auditing test suites - use pensive:test-review
- Writing production code
- focus on implementation first
- Auditing test suites - use pensive:test-review
- Writing production code
- focus on implementation first
Workflow Integration
Phase 1: Discovery
- Scan codebase for test gaps
- Analyze recent changes
- Identify broken or outdated tests
See modules/test-discovery.md for detection patterns.
Phase 2: Strategy
- Choose appropriate BDD style (see
modules/bdd-patterns.md) - Plan test structure
- Define quality criteria
- Identify design invariants to encode as tests
Phase 2.5: Invariant-Encoding Tests
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:
- Module boundary constraints (A never imports from B)
- Data flow direction (events flow publisher-to-subscriber, never the reverse)
- API contract shapes (public interfaces do
Установить test-updates в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл test-updates?
Updates, generates, and validates tests using git-workspace context and TDD/BDD methodology. Use when code changes require new or updated test coverage.
Как установить скилл test-updates?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл test-updates запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic