/test-case-reduction:reducefrom test-case-reduction
Guide the user through setting up and running test-case reduction with shrinkray. Use when the user has a file that triggers a bug and wants to minimize it.
Ships in test-case-reduction. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are helping the user set up and run a test-case reduction. They have a file that triggers some bug or exhibits some property, and they want to minimize it to a small, understandable example.
Ask about:
write-interestingness-test skill).Preprocessing eliminates header dependencies and gives the reducer much more freedom:
gcc -E -P file.c > file.i
# or
clang -E -P file.c > file.i
Then reduce file.i instead of file.c.
Use -P to suppress #line directives (they bloat the file and confuse some reducer passes).
If possible, consolidate into a single file. For C/C++, preprocessing handles this. For other languages, manually inline imports if feasible.
For truly multi-file cases, shrinkray's directory mode works:
shrinkray test.sh ./test-directory/
Consider manual pre-reduction: remove sections that are obviously irrelevant (dead code, unrelated functions, unused imports) before starting the reducer.
If the user doesn't have one, help them write one. The test must:
See the write-interestingness-test skill for detailed guidance.
Always verify the test before running the reducer:
# Should exit 0
./test.sh original_file; echo "Exit: $?"
# Should exit non-zero (test with empty/trivial input)
echo "" | ./test.sh /dev/stdin; echo "Exit: $?"
shrinkray ./test.sh file_to_reduce
Key options to consider:
--timeout N — Override auto-calibrated timeout (useful if the bug is timing-sensitive)--parallelism N — Limit parallelism (useful if the test has side effects)--input-type {stdin,arg,basename,all} — How the test receives input (default: all)--formatter none — Disable auto-formatting (if the formatter interferes)--volume debug — Verbose output for troubleshooting--seed N — Set random seed for reproducibilitydebug-reduction skill.After reduction completes:
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/debug-reductionDiagnose problems with shrinkray test-case reduction — unexpected results, reduction getting stuck, slippage to wrong bugs, or interestingness test issues. Use when reduction output is surprising or reduction is not making progress./write-interestingness-testHelp write an interestingness test for shrinkray (test-case reducer). Use when the user needs to reduce a test case, write or fix an interestingness test, or is working with test-case reduction.Generated from the plugin's indexed repository (drmaciver/test-case-reduction-skill) — no native marketplace selected
npx claudepluginhub p/drmaciver-test-case-reductionOther plugins' skills for the same job