返回技能列表

test

bitwize-music-studio
更新于 2 days ago
7 次查看
209
37
209
在 GitHub 上查看
testingautomation

关于

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-skills
Git 克隆备选方式
git 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

CommandDescription
/test or /test allRun all tests
/test quickRun Python test runner (fast automated checks)
/test configConfiguration system tests
/test skillsSkill definitions and docs
/test templatesTemplate file tests
/test workflowAlbum workflow documentation
/test sunoSuno integration tests
/test researchResearch workflow tests
/test masteringMastering workflow tests
/test sheet-musicSheet music generation tests
/test releaseRelease workflow tests
/test consistencyCross-reference checks
/test terminologyConsistent language tests
/test behaviorScenario-based tests
/test qualityCode quality checks
/test e2eEnd-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 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

GitHub 仓库

bitwize-music-studio/claude-ai-music-skills
路径: skills/test
0
ai-musicai-music-toolsaudio-masteringclaudeclaude-codeclaude-code-plugin

相关推荐技能

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是理想选择。

查看技能