From claude-crap
Checks whether a production source file has an accompanying characterization test using claude-crap's deterministic resolver. Run before modifying code to verify test coverage exists.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-crap:check-testThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run the `require_test_harness` MCP tool from the claude-crap server against a user-supplied file path and report whether a matching test exists.
Run the require_test_harness MCP tool from the claude-crap server against a user-supplied file path and report whether a matching test exists.
The user supplies a file path as the argument, typed after the skill name:
/claude-crap:check-test src/foo/bar.ts
/claude-crap:check-test pkg/mod.py
/claude-crap:check-test app/src/main/java/com/example/Service.java
Pass $ARGUMENTS verbatim as the filePath argument to the MCP tool. Do not normalize, strip quotes, or resolve the path yourself — the server's workspace guard handles that.
require_test_harness with filePath: "$ARGUMENTS".hasTest: true:
testFile field, formatted as a clickable relative path.isTestFile: true, note that the user's input was itself already a test file — the resolver short-circuited. This usually means the user meant to ask about a different file; suggest they re-run the skill with the production file path.hasTest: false:
candidates array as suggested locations for the new test. These are ordered by the resolver's convention priority: sibling <name>.test.<ext> first, then __tests__/<name>.test.<ext>, then mirror-tree layouts under tests/, test/, and __tests__/ at the workspace root, then the nearest-ancestor flat tests/ directory, then Python test_<name>.py variants. Suggest the highest-priority candidate that matches the project's existing conventions — if you can see other test files in the repo, pick the layout that matches them.status: "error"):
src/foo.ts, not ../other-repo/foo.ts).A one-line verdict ("Test found: src/foo.test.ts" or "No test found") followed by guidance on what to do next. For the "no test" case, the list of candidate paths is the most valuable thing — it tells the user exactly where the plugin's resolver expects the test to live, without them having to read the resolver source.
The Golden Rule in CLAUDE.md forbids writing functional code before a characterization test exists. The require_test_harness tool is the deterministic check for that prerequisite, and it is wired into the PostToolUse hook to catch violations after the fact. But a pre-flight check before starting work on a file is cheaper than fighting the PostToolUse warning later — the user can decide up front whether to write the test first or pick a different file.
The resolver understands seven conventions (sibling, __tests__, mirror tree, nearest-ancestor flat tests/, Python test_ prefix, and two more) so it works across the five languages the plugin supports without requiring the user to configure anything.
hasTest: false, a matching test genuinely does not exist yet.npx claudepluginhub ahernandez-developer/claude-crap --plugin claude-crapGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.