Home / AI Integration / Claude Code Skill
Claude Code Skill¶
The ProTest skill for Claude Code teaches the AI assistant how to use ProTest's CLI to generate covering arrays directly from your codebase.
The Claude Code ecosystem evolves quickly
File layouts, frontmatter fields, and invocation rules can change between releases. If these instructions don't work, check the official docs at code.claude.com/docs/en/custom-skills or just ask Claude Code directly: "How do I install a skill in this version?"
What It Does¶
When installed, the skill enables Claude Code to:
- Identify parameters and values from your code or context
- Recognize constraints (invalid combinations)
- Create
.cahttmodel files - Run ProTest's CLI to generate covering arrays
- Present results as actionable test cases
Installation¶
Step 1 — Download the file: protest-covering-arrays.md
Step 2 — Pick how you want Claude to use it. The same file works as either a slash command or a skill — only the location and filename differ.
| Slash command | Skill | |
|---|---|---|
| Invocation | You type /protest-covering-arrays manually |
Claude auto-invokes when your prompt matches covering-array work |
| Place file at | .claude/commands/protest-covering-arrays.md (project-level) or ~/.claude/commands/protest-covering-arrays.md (user-level, all projects) |
.claude/skills/protest-covering-arrays/SKILL.md (project-level) or ~/.claude/skills/protest-covering-arrays/SKILL.md (user-level, all projects) |
| Rename file to | Keep as protest-covering-arrays.md |
SKILL.md (all caps) inside a folder named protest-covering-arrays |
Which to choose? Use the slash command if you want explicit, manual invocation. Use the skill if you want Claude to reach for ProTest automatically whenever it sees a testing problem that fits.
Copy and Paste Alternative¶
If you'd rather not download, create the file yourself at the location above with the following content:
Click to expand skill file content
---
name: protest-covering-arrays
description: Use when you need to systematically test combinations of parameters,
feature flags, configuration options, or input variations where interactions
between settings could cause failures
---
# ProTest -- Covering Array Generator
Generate minimal test matrices that cover all t-way parameter interactions.
A covering array guarantees every pair (or triple, etc.) of parameter values
appears in at least one test case, using far fewer cases than exhaustive testing.
Research shows nearly all software failures are caused by interactions between
2-6 parameters.
## When to Use
- Testing combinations of configuration options, feature flags, or input parameters
- 3+ parameters with multiple values each where exhaustive testing is impractical
- You want pairwise (2-way) or higher-order coverage guarantees
## How to Run
The CLI executable is `protest.exe`. Run it with:
protest generate -i model.cahtt -o results.csv
## Workflow
1. Identify parameters and their possible values from code or context
2. Identify constraints -- invalid combinations
3. Create a .cahtt model file (see format below)
4. Run: protest generate -i model.cahtt -o results.csv
5. Read results.csv -- each row is a test case
## Model File Format (.cahtt)
{
"Version": 1,
"GlobalOrder": 2,
"Parameters": [
{
"Name": "OS",
"Values": [
{ "Name": "Windows", "Weight": 1, "IsNegative": false },
{ "Name": "Linux", "Weight": 1, "IsNegative": false }
]
}
],
"ConstraintText": "IF [OS] = \"Windows\" THEN [Browser] <> \"Safari\";",
"Seeds": [],
"SubModels": []
}
## CLI Quick Reference
| Flag | Default | Purpose |
|------|---------|---------|
| -i, --input | required | Model file (.cahtt or .pict) |
| -o, --output | required | Output file; repeatable |
| --engine | from model | pict or sipo |
| --strength | from model (2) | T-way coverage strength |
| --trials | 1000/10000 | Parallel trials (best result kept) |
| --max-time | no limit | Seconds before stopping |
Usage Examples¶
Once installed, you can use the skill in Claude Code:
Analyze Feature Flags¶
"I have these feature flags in my app: darkMode (on/off), newCheckout (on/off), betaAPI (v1/v2/v3), cacheStrategy (memory/redis/none). Generate a covering array for testing."
Test API Parameters¶
"Look at the endpoint in
src/api/search.tsand generate a covering array for all the query parameter combinations."
Configuration Testing¶
"Generate test cases for the database connection options in
config/database.yml."
Requirements¶
- ProTest CLI must be installed and accessible (see Installation)
- Claude Code must have permission to run the CLI command