skill-integration-tester
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Integration Tester
技能集成测试器
Overview
概述
Validate multi-skill workflows defined in CLAUDE.md (Daily Market Monitoring,
Weekly Strategy Review, Earnings Momentum Trading, etc.) by executing each step
in sequence. Check inter-skill data contracts for JSON schema compatibility
between output of step N and input of step N+1, verify file naming conventions,
and report broken handoffs. Supports dry-run mode with synthetic fixtures.
按顺序执行每个步骤,验证CLAUDE.md中定义的多技能工作流(如每日市场监控、每周策略复盘、盈利动量交易等)。检查技能间数据契约,确保第N步输出与第N+1步输入的JSON schema兼容,验证文件命名规范,并上报存在问题的交接流程。支持使用模拟测试数据的dry-run模式。
When to Use
适用场景
- After adding or modifying a multi-skill workflow in CLAUDE.md
- After changing a skill's output format (JSON schema, file naming)
- Before releasing new skills to verify pipeline compatibility
- When debugging broken handoffs between consecutive workflow steps
- As a CI pre-check for pull requests touching skill scripts
- 在CLAUDE.md中新增或修改多技能工作流后
- 更改技能的输出格式(JSON schema、文件命名)后
- 发布新技能前验证流水线兼容性
- 调试工作流相邻步骤之间的交接故障时
- 作为涉及技能脚本的拉取请求的CI预检查项
Prerequisites
前置要求
- Python 3.9+
- No API keys required
- No third-party Python packages required (uses only standard library)
- Python 3.9+
- 无需API密钥
- 无需第三方Python包(仅使用标准库)
Workflow
使用流程
Step 1: Run Integration Validation
步骤1:运行集成验证
Execute the validation script against the project's CLAUDE.md:
bash
python3 skills/skill-integration-tester/scripts/validate_workflows.py \
--output-dir reports/This parses all blocks from the Multi-Skill Workflows
section, resolves each step's display name to a skill directory, and validates
existence, contracts, and naming.
**Workflow Name:**针对项目的CLAUDE.md执行验证脚本:
bash
python3 skills/skill-integration-tester/scripts/validate_workflows.py \
--output-dir reports/此操作会解析多技能工作流板块下所有代码块,将每个步骤的显示名称映射到对应的技能目录,验证技能存在性、契约和命名规范。
**Workflow Name:**Step 2: Validate a Specific Workflow
步骤2:验证指定工作流
Target a single workflow by name substring:
bash
python3 skills/skill-integration-tester/scripts/validate_workflows.py \
--workflow "Earnings Momentum" \
--output-dir reports/通过名称子串定位单个工作流:
bash
python3 skills/skill-integration-tester/scripts/validate_workflows.py \
--workflow "Earnings Momentum" \
--output-dir reports/Step 3: Dry-Run with Synthetic Fixtures
步骤3:使用模拟数据试运行
Create synthetic fixture JSON files for each skill's expected output and
validate contract compatibility without real data:
bash
python3 skills/skill-integration-tester/scripts/validate_workflows.py \
--dry-run \
--output-dir reports/Fixture files are written to with flag set.
reports/fixtures/_fixture为每个技能的预期输出创建模拟JSON文件,无需真实数据即可验证契约兼容性:
bash
python3 skills/skill-integration-tester/scripts/validate_workflows.py \
--dry-run \
--output-dir reports/模拟文件会写入目录,且带有标识。
reports/fixtures/_fixtureStep 4: Review Results
步骤4:查看结果
Open the generated Markdown report for a human-readable summary, or parse
the JSON report for programmatic consumption. Each workflow shows:
- Step-by-step skill existence checks
- Handoff contract validation (PASS / FAIL / N/A)
- File naming convention violations
- Overall workflow status (valid / broken / warning)
打开生成的Markdown报告查看易读的汇总信息,或解析JSON报告供程序使用。每个工作流会展示:
- 逐步骤的技能存在性检查结果
- 交接契约验证结果(PASS / FAIL / N/A)
- 文件命名规范违规项
- 工作流整体状态(valid / broken / warning)
Step 5: Fix Broken Handoffs
步骤5:修复故障交接
For each handoff, verify that:
FAIL- The producer skill's output contains all required fields
- The consumer skill's input parameter accepts the producer's output format
- File naming patterns are consistent between producer output and consumer input
对于每一个「FAIL」的交接,请验证:
- 生产端技能的输出包含所有必填字段
- 消费端技能的输入参数可接受生产端的输出格式
- 生产端输出和消费端输入的文件命名模式一致
Output Format
输出格式
JSON Report
JSON报告
json
{
"schema_version": "1.0",
"generated_at": "2026-03-01T12:00:00+00:00",
"dry_run": false,
"summary": {
"total_workflows": 8,
"valid": 6,
"broken": 1,
"warnings": 1
},
"workflows": [
{
"workflow": "Daily Market Monitoring",
"step_count": 4,
"status": "valid",
"steps": [...],
"handoffs": [...],
"naming_violations": []
}
]
}json
{
"schema_version": "1.0",
"generated_at": "2026-03-01T12:00:00+00:00",
"dry_run": false,
"summary": {
"total_workflows": 8,
"valid": 6,
"broken": 1,
"warnings": 1
},
"workflows": [
{
"workflow": "Daily Market Monitoring",
"step_count": 4,
"status": "valid",
"steps": [...],
"handoffs": [...],
"naming_violations": []
}
]
}Markdown Report
Markdown报告
Structured report with per-workflow sections showing step validation,
handoff status, and naming violations.
Reports are saved to with filenames
.
reports/integration_test_YYYY-MM-DD_HHMMSS.{json,md}结构化报告,包含每个工作流的步骤验证、交接状态和命名违规情况板块。
报告保存至目录,文件名为。
reports/integration_test_YYYY-MM-DD_HHMMSS.{json,md}Resources
相关资源
- -- Main validation script
scripts/validate_workflows.py - -- Contract definitions and handoff patterns
references/workflow_contracts.md
- -- 核心验证脚本
scripts/validate_workflows.py - -- 契约定义与交接模式说明
references/workflow_contracts.md
Key Principles
核心原则
- No API keys required -- all validation is local and offline
- Non-destructive -- reads SKILL.md and CLAUDE.md only, never modifies skills
- Deterministic -- same inputs always produce same validation results
- 无需API密钥 -- 所有验证均为本地离线执行
- 无破坏性 -- 仅读取SKILL.md和CLAUDE.md,绝不会修改技能内容
- 结果确定 -- 相同输入始终产出相同的验证结果