unslop-tests
БесплатноБез исполняемых скриптовНе проверенCuts AI tells from test code: tests that pass without proving anything, tautological assertions, mock-only tests, hardcoded waits, coverage theater, vague…
от jaktestowac★ 124 звезды на GitHubОб этом скилле
Unslop Tests
Cut AI tells from test code.
A generated test suite reads well, runs green, and often proves nothing. That combination is the whole problem: the suite looks like coverage, gets reviewed like coverage, and fails to notice the bug it was written for. This skill names the tells so they can be caught by sight, then proves the important ones by running code.
Style slop wastes a reader's time. Test slop hides defects. Treat it accordingly.
Process
- Read the test code in scope.
- Scan for the patterns below. Tag each finding with its tier.
- Fix. Preserve what the test was trying to prove; if it was trying to prove nothing, say so instead of polishing it.
- Prove every Tier 1 finding by running code. Break the behavior, watch the test, paste the output.
- Self-audit: "which of these tests would still pass if I deleted the feature?" Fix what survives.
Scope
Use the files or diff the caller gives you. Otherwise use the working diff against the base branch, default main, including uncommitted changes.
When auditing a whole suite rather than a diff, say how much of it you actually read. A sampled audit reported as a full one is its own kind of slop.
Severity tiers
Not all tells are equal. Rank every finding.
- Tier 1 - the test is a lie. It passes while the behavior is broken, or it hides a real defect. Blocks the change. Must be proven by execution, not by reading.
- Tier 2 - the test will fail for the wrong reason. It passes today and breaks on an unrelated refactor, a slow CI machine, or a different timezone. Fix now or file it.
- Tier 3 - the test is unreadable. It works, but its failure output tells nobody what broke. Fix while you are in the file.
Report tiers in that order. A page of naming nits above one silently passing test buries the thing that matters.
Patterns to detect and fix
Examples use neutral test / expect pseudocode. ./resources/framework-spellings.md has how each tell is spelled in Vitest, Jest, Playwright, and Mocha.
Assertions that prove nothing
- Tautological assertion (T1). The expected value is computed the way the code computes it, so the test cannot disagree with the code.
expect(total(items)).toBe(items.reduce((s, i) => s + i.price, 0)). Use a literal from an independent source: the spec, a worked example, a number a human calculated. If you cannot write the literal without running the code, you do not yet know what the function should return. - Assertion that cannot fail (T1).
expect(result).toBeDefined(),toBeTruthy(),not.toBeNull(),expect(list.length).toBeGreaterThanOrEqual(0),expect(true).toBe(true). These pass for almost any return value. Assert the value. - Type check standing in for a behavior check (T1).
expect(typeof id).toBe('string'),expect(Array.isArray(rows)).toBe(true). The type system already promises this. Assert what the string is and what is in the array. - Snapshot as the only assertion (T1). A large snapshot committed without being read passes forever, then turns red across twenty files on one unrelated change. Assert the field that carries the behavior. Keep snapshots for output whose exact shape is the contract, and keep them small enough that a reviewer reads the diff.
- "It throws" without saying which error (T2).
expect(fn).toThrow()also passes whenfnthrows because the function name is misspelled. Assert the error type and the load-bearing part of the message. - try/catch that can pass silently (T1). An assertion inside
catchwith nothing forcing thetryto throw. The day the call stops throwing, the test goes green. Assert on the rejection directly, or declare the expected assertion count. - Unawaited async (T1). A missing
awaiton the act or on a promise-returning assertion. The test function returns, the runner reports a pass, and the assertion runs after nobody is listening. - Coverage theater (T1). The code is called, nothing meaningful is asserted, a percentage moves. Delete it or give it something to prove.
- Assertion on an unchecked step (T2). A setup call whose failure is ignored, so the real failure surfaces three lines later as a confusing message about undefined.
Scope and structure
- God test (T2). One test logs in, searches, checks out, and opens the receipt. The first failure hides everything after it, and the name cannot say what broke. Split by behavior, or keep one long path deliberately and say why.
- Multi-assert sprawl (T3). Five unrelated behaviors in one test, so a failure says nothing specific. If the name needs "and", split the test.
- Loop-hidden cases (T3).
for (const c of cases) expect(fn(c.in)).toBe(c.out). The failure never says which input broke. Use the runner's parameterized API so each row reports as its own test. - Conditional in a test (T2).
if (result.items.length) expect(...). A branch that can skip the assertion is a test that can pass by accid
Установить unslop-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл unslop-tests?
Cuts AI tells from test code: tests that pass without proving anything, tautological assertions, mock-only tests, hardcoded waits, coverage theater, vague names, swallowed errors, retries used as fixes. Use whenever test code is written, changed, or reviewed, including tests produced as a side effect of a feature task, and when the request mentions "review these tests", "are these tests any good", "this test always passes", "this suite is flaky", or "clean up these tests". Must always apply to test code.
Как установить скилл unslop-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл unslop-tests запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic