/hone-skills:hone:test-naming-auditfrom hone-skills
Checks that test method and function names read as complete sentences describing behavior. Flags cryptic names like test1, testFoo, or abbreviated names that do not describe what is being tested. Designed to run on every PR. Do NOT use for test coverage, test structure, or non-test code.
Ships in hone-skills. 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.
Scans test files across the codebase and evaluates whether each test method/function name communicates the behavior being verified. A good test name reads as a complete sentence: it states what is being tested, under what conditions, and what the expected outcome is.
Flags tests whose names are:
test1, test2, testA, testIt, foo_test.testParse, testLogin, testSave
that omit conditions and expectations.testUsrAuth, test_inv_req where abbreviations hurt
readability.testCallsApi, testUsesCache).testParse1, testParse2).Reports each finding with the test name, file:line, the issue category, and a suggested improvement pattern.
hone:intent-clarity-audit or
hone:naming-specificity-audit instead.*_test.*, *.test.*, *.spec.*, test_*.*, *Test.*, *Spec.*).standard (flag clearly bad names) or strict (also flag
names that are acceptable but could be more descriptive). Default: standard.Find test files. Walk the repository tree and identify test files using common naming conventions:
*_test.go, *.test.ts, *.test.js, *.spec.ts, *.spec.js,
test_*.py, *_test.py, *_test.rb, *Test.java, *Test.kt,
*Spec.java, *Spec.kt, *_spec.rb, *Tests.swift, *_tests.rs.test/, tests/, __tests__/, spec/.
Apply user exclusions.Extract test names. For each test file, identify individual test definitions using language-appropriate patterns:
it("..."), test("..."), describe("...") blocks
with it/test inside.def test_* methods, @pytest.mark.parametrize names.func Test*(t *testing.T).@Test annotated methods, JUnit 5 @DisplayName.it "...", describe, context blocks.#[test] fn test_*.func test*().
Record the test name and file:line.Evaluate each test name. Apply these checks in order:
a. Cryptic check: Flag if the name matches patterns like test\d+,
testA, testIt, test_it, or is a single generic word after the test
prefix.
b. Too-short check: Flag if the name (excluding framework prefix/wrapper)
contains fewer than 3 words (using camelCase, snake_case, or string
splitting for it("...") style names).
c. Abbreviation check: Flag if the name contains tokens of 3 or fewer
characters that are not common words (the, for, and, is, to,
it, a, an, of, in, on, or, no, not, be, by,
if, at, do, up).
d. Implementation-focus check: Flag if the name references
implementation verbs (calls, uses, invokes, creates, mocks,
stubs, spies) without describing the behavior.
e. Numbered check: Flag if the name ends with a numeric suffix that distinguishes it from an otherwise identical sibling name.
f. Sentence check (strict mode only): Flag if the name, when expanded from camelCase/snake_case, does not form a readable sentence with a subject, condition, and expectation pattern (e.g., "returns error when input is empty").
Classify severity.
Suggest improvements. For each finding, suggest a name pattern (not a specific rename) showing the expected structure:
should <expected behavior> when <condition><method under test> returns <expected> when <condition><scenario> results in <outcome>Produce the report per Output Requirements.
Produce a Markdown report:
# Test Naming Audit
**Repo**: <repo name>
**Scope**: <N> test files, <M> test cases | **Findings**: <count>
## Findings
| # | Test Name | File | Line | Issue | Severity | Suggested Pattern |
|---|-----------|------|------|-------|----------|-------------------|
| 1 | `test1` | tests/auth.test.ts | 14 | Cryptic name | High | `should reject expired tokens` |
| 2 | `testParse` | parser_test.go | 42 | Too short — missing conditions | Medium | `TestParse_ReturnsErrorForMalformedInput` |
## Summary
- **By issue**: 3 cryptic, 5 too-short, 2 numbered, 1 abbreviated
- **By severity**: 5 high, 3 medium, 3 low
- **Hotspot files**: auth.test.ts (4 findings), parser_test.go (3 findings)
- **Overall**: <X>% of test names meet the sentence-style standard
describe/context block names — only leaf test cases.@DisplayName or equivalent display-name
annotations if the display name itself reads as a sentence.TestFoo_Bar_Baz style
is fine if each segment adds meaning.What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (ckorhonen/hone-skills) — no native marketplace selected
npx claudepluginhub p/ckorhonen-hone-skills8 skills in this plugin
/hone:automation-opportunitiesFinds manual processes that could be automated: manual deploy steps in READMEs, setup instructions that could be scripts, repetitive git workflows, manual testing procedures, and undocumented tribal knowledge. Also checks for artifacts not in source control. Use monthly to surface automation ROI. Do NOT use for code quality or style audits./hone:broken-windows-huntDetects entropy signals in a codebase: stale TODOs, disabled tests, lint suppressions, commented-out code, dead imports, empty catch blocks, and deprecated API usage. Designed for daily runs to catch quality erosion early. Do NOT use for feature work, refactoring planning, or security audits./hone:duplication-huntFinds duplicated code patterns across the codebase including exact copies and structural duplication (same logic with different variable names). Ranks by frequency and suggests extraction candidates. Designed for weekly runs. Do NOT use for method length, naming, or style concerns./hone:intent-clarity-auditFinds code that obscures its intent: unclear variable names, nested ternaries, boolean parameters without names, overly clever one-liners, and comments that restate code instead of explaining why. Focuses on recently changed files. Do NOT use for method length, duplication, or test naming concerns./hone:magic-number-huntSurfaces magic numbers, unexplained string literals, hardcoded URLs, configuration values buried in code, and other "magical" values that should be named constants or config entries. Use when you want a weekly sweep for unnamed literals. Do NOT use for style or formatting audits./hone:method-brevity-auditScans a codebase for methods and functions that exceed configurable length thresholds. Reports a ranked list of the longest methods with file:line, language, and surrounding complexity signals. Designed for scheduled weekly runs. Do NOT use for style formatting, indentation, or naming concerns.