test
关于
This skill runs automated tests to validate plugin integrity across 14 categories including config, skills, templates, and workflow. Use it before creating PRs or after making changes to ensure plugin health. It provides both comprehensive testing and a quick option for fast validation via pytest.
快速安装
Claude Code
推荐npx skills add bitwize-music-studio/claude-ai-music-skills -a claude-code/plugin add https://github.com/bitwize-music-studio/claude-ai-music-skillsgit clone https://github.com/bitwize-music-studio/claude-ai-music-skills.git ~/.claude/skills/test在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
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:
~/.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:
~/.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.
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:
# 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 validationtest_templates.py- Template existence and structuretest_references.py- Reference doc existencetest_links.py- Internal markdown linkstest_terminology.py- Deprecated terms checktest_consistency.py- Version sync, skill countstest_config.py- Config file validationtest_state.py- State cache tool validationtest_genres.py- Genre directory cross-referencetest_integration.py- Cross-skill prerequisite chains
Adding New Tests
When bugs are found:
- Identify which category the test belongs to
- Add a test that would have caught the bug
- Run
/test [category]to verify test fails - Fix the bug
- Run
/test [category]to verify test passes - Commit both the fix and the new test
Rule: Every bug fix should add a regression test.
EXECUTION TIPS
- Use Grep with
output_mode: contentand-nfor 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
GitHub 仓库
相关推荐技能
content-collections
元Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。
polymarket
元这个Claude Skill为开发者提供完整的Polymarket预测市场开发支持,涵盖API调用、交易执行和市场数据分析。关键特性包括实时WebSocket数据流,可监控实时交易、订单和市场动态。开发者可用它构建预测市场应用、实施交易策略并集成实时市场预测功能。
creating-opencode-plugins
元该Skill帮助开发者创建OpenCode插件,用于接入命令、文件、LSP等25+种事件。它提供了插件结构、事件API规范和JavaScript/TypeScript实现模式,适合需要拦截操作、扩展功能或自定义事件处理的场景。开发者可通过它快速构建响应式模块来增强OpenCode AI助手的能力。
sglang
元SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。
