/claude-crap:check-testfrom claude-crap
Checks whether a production source file has an accompanying characterization test using claude-crap's deterministic test-harness resolver. Run at the start of work on source files to verify the CLAUDE.md test prerequisite.
Ships in claude-crap. 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.
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.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub ahernandez-developer/claude-crap --plugin claude-crap4 skills in this plugin
/adoptInteractive onboarding walkthrough for teams introducing claude-crap on an existing codebase. Use this skill whenever the user asks "how do I install claude-crap on my project", "we're adopting claude-crap for our team", "how should I roll claude-crap out", "what strictness mode should I pick", "we have a lot of legacy code, can we ease into this gradually", "our project has a bunch of existing errors, how do I avoid getting blocked", or is otherwise looking for guidance on gradual rollout strategy instead of just dropping a strict quality gate on a messy codebase. The skill asks a short three-question assessment about test coverage, existing findings, and appetite for hard enforcement, recommends one of three strictness modes (advisory / warn / strict), and emits a copy-pasteable .claude-crap.json snippet for the workspace root so the team can commit the policy in a single step./analyzeRun tree-sitter AST analysis on a source file using claude-crap's deterministic engine and report per-function cyclomatic complexity plus physical and logical lines of code. Use this skill whenever the user asks "what's the complexity of this file", "how complex is foo.ts", "show me cyclomatic complexity per function", "analyze this file's structure", "which functions in this file are too complex", "where should I refactor first in this module", or needs to pick candidates for refactoring based on complexity. Also use this skill proactively when a file feels "big" and you want a ranked list of hot-spot functions before proposing a refactor plan — the tree-sitter engine gives exact numbers instead of eyeball estimates. Supports TypeScript, JavaScript, Python, Java, and C#; the language is detected automatically from the file extension. Takes a single file path as the argument after the skill name./scoreRun claude-crap's deterministic project quality gate and display the A..E letter grade across Maintainability, Reliability, Security, and Overall. Use this skill whenever the user asks "how's the code quality", "what's my CRAP index", "is this project shippable", "show me the technical debt ratio", "run the quality gate", "score the project", or wants a one-glance read on whether the current workspace passes its policy ceiling. Also use this skill proactively at the start of a refactoring session or before a release to establish a quality baseline, and after a substantial refactor to verify the grade has not regressed. Do NOT use it for incident debugging or per-file analysis — for a single file, reach for /claude-crap:analyze instead.