Skill Test
Validate skill files for structural compliance and behavioral correctness. Three modes: static (linter), spec (behavioral), audit (coverage report)
Category: development Source: Donchitos/Claude-Code-Game-StudiosSkill Test for Happycapy Skills Platform
What Is This
Skill Test (skill-test) is a validation utility for the Happycapy Skills platform that ensures your skill definitions are both structurally sound and behaviorally correct. It operates entirely within the platform's native skill, hook, and template mechanisms, requiring no external dependencies or third-party tools. Skill Test supports four distinct operating modes: static (structural linter), spec (behavioral verifier), category (category rubric), and audit (coverage reporter). Each mode performs a different type of validation or reporting, helping maintain the overall quality and reliability of your skill files.
Skill Test is specifically designed to validate files following the .claude/skills/*/SKILL.md convention, which is the standard format for defining skills on the Happycapy platform. The tool is invoked via commands, each corresponding to a particular mode and skill or group of skills.
Why Use It
Maintaining high-quality skill definitions is critical for robust agent behavior, reliable automation, and predictable integrations on the Happycapy Skills platform. Manual review of skill files is time-consuming and error-prone, especially as the number of skills grows. Skill Test provides automated, repeatable validation that saves time and improves accuracy.
By using Skill Test, you can:
- Catch Structural Errors Early: The static linter checks for key fields, syntax, and required metadata, reducing runtime issues.
- Verify Behavioral Correctness: The spec mode runs behavioral assertions defined in each skill's test specification, ensuring that your skill logic functions as intended.
- Ensure Category Compliance: The category mode evaluates a skill against its category's specific rubric, maintaining alignment with platform standards.
- Monitor Skill Coverage: The audit mode generates a comprehensive report of skills, their specifications, and testing status, helping you track overall health and coverage.
This unified approach to validation streamlines the development and maintenance of skills, promoting best practices and minimizing technical debt.
How to Use It
Skill Test is invoked as a user-invocable command within the Happycapy environment. The basic structure of the command is:
/skill-test <mode> [skill-name | all]
Modes and Commands
| Mode | Command Example | Purpose |
|---|---|---|
| static | /skill-test static my-skill |
Lint one skill for structure |
| static | /skill-test static all |
Lint all skills for structure |
| spec | /skill-test spec my-skill |
Run behavioral assertions on a skill |
| category | /skill-test category my-skill |
Apply category rubric to a skill |
| category | /skill-test category all |
Apply rubric to all skills |
| audit | /skill-test audit |
Generate skill coverage report |
Example: Running a Static Lint
/skill-test static my-skill
This command runs seven different structural compliance checks on the my-skill SKILL.md file. Checks may include required fields, formatting, allowed values, and more.
Example: Behavioral Verification
/skill-test spec my-skill
This reads both the skill file and an associated test specification, then evaluates the defined assertions to confirm the skill’s behavior matches expectations.
Example: Category Rubric Check
/skill-test category my-skill
This checks the skill against metrics and standards defined for its category, helping ensure best practices are being followed.
Example: Audit Report
/skill-test audit
This generates a coverage report listing all skills, their agent specifications, and the date of their last test, supporting maintenance and compliance tracking.
When to Use It
Skill Test is valuable at multiple points in the development lifecycle:
- During Development: Use static and spec modes frequently as you build or update skills to catch issues early.
- Before Deployment: Run all modes (static, spec, category) to ensure your skills are compliant and reliable before pushing to production.
- Regular Maintenance: Use the audit mode to monitor skill coverage and testing status, ensuring long-term quality.
- Onboarding New Skills: Validate newly created skills against both structural and behavioral requirements to maintain platform standards.
Important Notes
- No External Dependencies: Skill Test operates entirely within the Happycapy skill/hook/template environment, ensuring compatibility and reliability without relying on external libraries.
- Token Costs: Each mode has a different resource cost. For example, static mode is lightweight (
1,000 tokens per skill), while spec mode is more intensive (5,000 tokens per skill). - Granular Validation: The static mode runs seven distinct structural checks per skill, while spec mode relies on well-defined test specifications. Category mode depends on up-to-date category rubrics.
- Argument Parsing: The first command argument selects the mode, and subsequent arguments specify which skill(s) to validate.
- Skill File Convention: Skill Test is tailored for files in the
.claude/skills/*/SKILL.mdformat. Ensure your skills adhere to this structure for proper validation. - Comprehensive Coverage: The audit report helps teams track which skills are covered by tests, when they were last tested, and which agent specifications are present.
Skill Test is an essential tool for development teams using the Happycapy Skills platform, providing a unified, efficient, and automated approach to skill validation. Regular use will help ensure the structural and behavioral integrity of your skills, supporting a high standard of quality and reliability across your automation workflows.