test
Runs automated tests to validate plugin integrity across 14 categories. Use before creating PRs, after making changes to skills or templates, or to verify plugin health.
What this skill does
## Your Task
**Input**: $ARGUMENTS
Run automated tests to validate plugin integrity. Execute each test methodically and report results clearly.
**Default**: Run all tests if no argument provided.
---
# Plugin Test Suite
You are the plugin's automated test runner. Execute each test, track pass/fail, and report actionable results.
## Quick Automated Tests (`/test quick`)
For fast automated validation, run the pytest suite:
```bash
~/.bitwize-music/venv/bin/python3 -m pytest ${CLAUDE_PLUGIN_ROOT}/tests/ -v
```
This covers:
- **plugin tests** (`tests/plugin/`) - Frontmatter, templates, references, links, terminology, consistency, config, state, genres, integration
- **unit tests** (`tests/unit/`) - State parsers/indexer, shared utilities, mastering functions
Run specific categories:
```bash
~/.bitwize-music/venv/bin/python3 -m pytest ${CLAUDE_PLUGIN_ROOT}/tests/plugin/test_skills.py -v # Skills only
~/.bitwize-music/venv/bin/python3 -m pytest ${CLAUDE_PLUGIN_ROOT}/tests/plugin/ -v # All plugin tests
~/.bitwize-music/venv/bin/python3 -m pytest ${CLAUDE_PLUGIN_ROOT}/tests/unit/ -v # All unit tests
~/.bitwize-music/venv/bin/python3 -m pytest ${CLAUDE_PLUGIN_ROOT}/tests/ -m "not slow" -v # Skip slow tests
```
Pytest catches common issues fast. For deep behavioral tests, use the full test suite below.
## Output Format
```
════════════════════════════════════════
CATEGORY: Test Category Name
════════════════════════════════════════
[PASS] Test name
[FAIL] Test name
→ Problem: what's wrong
→ File: path/to/file:line
→ Fix: specific fix instruction
────────────────────────────────────────
Category: X passed, Y failed
────────────────────────────────────────
```
At the end:
```
════════════════════════════════════════
FINAL RESULTS
════════════════════════════════════════
config: X passed, Y failed
skills: X passed, Y failed
templates: X passed, Y failed
...
────────────────────────────────────────
TOTAL: X passed, Y failed, Z skipped
════════════════════════════════════════
```
---
# TEST CATEGORIES
All test definitions are in [test-definitions.md](test-definitions.md).
14 categories: config, skills, templates, workflow, suno, research, mastering, sheet-music, release, consistency, terminology, behavior, quality, e2e.
Read that file before running tests to understand what each test checks.
---
# RUNNING TESTS
## Commands
| Command | Description |
|---------|-------------|
| `/test` or `/test all` | Run all tests |
| `/test quick` | Run Python test runner (fast automated checks) |
| `/test config` | Configuration system tests |
| `/test skills` | Skill definitions and docs |
| `/test templates` | Template file tests |
| `/test workflow` | Album workflow documentation |
| `/test suno` | Suno integration tests |
| `/test research` | Research workflow tests |
| `/test mastering` | Mastering workflow tests |
| `/test sheet-music` | Sheet music generation tests |
| `/test release` | Release workflow tests |
| `/test consistency` | Cross-reference checks |
| `/test terminology` | Consistent language tests |
| `/test behavior` | Scenario-based tests |
| `/test quality` | Code quality checks |
| `/test e2e` | End-to-end integration test |
## Quick Tests via Pytest
For rapid validation during development, use pytest directly:
```bash
# Run all tests
~/.bitwize-music/venv/bin/python3 -m pytest ${CLAUDE_PLUGIN_ROOT}/tests/ -v
# Run specific test modules
~/.bitwize-music/venv/bin/python3 -m pytest ${CLAUDE_PLUGIN_ROOT}/tests/plugin/test_skills.py ${CLAUDE_PLUGIN_ROOT}/tests/plugin/test_templates.py -v
# Verbose with short tracebacks
~/.bitwize-music/venv/bin/python3 -m pytest ${CLAUDE_PLUGIN_ROOT}/tests/ -v --tb=short
# Quiet mode (for CI/logs)
~/.bitwize-music/venv/bin/python3 -m pytest ${CLAUDE_PLUGIN_ROOT}/tests/ -q --tb=line
```
Test modules in `tests/plugin/`:
- `test_skills.py` - Frontmatter, required fields, model validation
- `test_templates.py` - Template existence and structure
- `test_references.py` - Reference doc existence
- `test_links.py` - Internal markdown links
- `test_terminology.py` - Deprecated terms check
- `test_consistency.py` - Version sync, skill counts
- `test_config.py` - Config file validation
- `test_state.py` - State cache tool validation
- `test_genres.py` - Genre directory cross-reference
- `test_integration.py` - Cross-skill prerequisite chains
## Adding New Tests
When bugs are found:
1. Identify which category the test belongs to
2. Add a test that would have caught the bug
3. Run `/test [category]` to verify test fails
4. Fix the bug
5. Run `/test [category]` to verify test passes
6. Commit both the fix and the new test
**Rule:** Every bug fix should add a regression test.
---
# EXECUTION TIPS
- Use Grep with `output_mode: content` and `-n` for line numbers
- Use Glob to find files by pattern
- Use Read to check file contents
- Use Bash sparingly (YAML/JSON validation)
- Report exact file:line for failures
- Provide specific, actionable fix instructions
- Group related tests for readability
- Skip tests gracefully if prerequisites missing
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.