/dag-workflow:anti-slopfrom dag-workflow
Enforces code discipline by scanning for meaningless code, dead weight, type erasure, and module-patching tests after every Edit or Write. Useful for code review and writing clean, behavior-preserving changes.
Ships in dag-workflow. 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.
Every line a change adds must carry evidence or signal. Code is slop when deleting or simplifying it changes no behavior, or when it throws away what the program already knows. Generated code is prone to it because each piece looks reasonable on its own.
scan: below and shows each hit after the tool's result. Test weakening also compares before and after, including deletion-only empty callbacks. It sees shapes, not meaning.test-expectation-change and requirement-substitution ask for requirement and verification evidence. They are not hard violations or proof of cheating. A valid requirement change or equivalent verification can justify the edit; neither candidate forces rollback or automatically fails a verdict.'', 0, false, an empty list) and data read from disk or the host. A fix that would change behavior is not a fix; leave the code and name the pattern.anti-slop allow: <pattern ids> in the CLAUDE.md, AGENTS.md or CONTRIBUTING.md at the root of the folder the edited file belongs to (the session's folder, or the git worktree the session or node works in), or at the root of the folder the session started in, turns those patterns off in the scan too; a rule file the repository does not track still counts in a worktree. Surrounding code that already uses a pattern is not an exemption.debugger, breakpoint(), dbg!, binding.pry, e.printStackTrace()), commented-out code, imports, variables or parameters the change introduced but never uses, and TODO stubs standing in for requested behavior. Remove them. Requested behavior that is not done is a failure to report, not a TODO. scan: debug-leftover, commented-out-code, todo-stubcatch, except: pass, if err != nil {} or rescue; end swallows the error; a handler that only rethrows the same error does nothing. Let the error propagate, or handle it with a decision the caller can observe. Exempt: a comment inside the handler that says why the error is ignored, and a rethrow-only handler placed before a broader one to exclude its errors. scan: swallowed-error, rethrow-only-catchc ? true : false, if (c) return true; return false, True if c else False, x == true. Return or use the condition itself. scan: boolean-ceremonyconst result = f(); return result, where the name adds nothing the call does not say. Return the expression. A specific name that documents the value is fine. scan: pass-through-variable (generic names such as result, data, tmp)// increment the counter above count++, a docstring that repeats the signature. Delete it. Keep comments that give the why: a constraint, a measurement, a rejected alternative.default branch after a closed union is exhausted, a retry around a call that cannot fail transiently. Delete it. If the state can occur, keep the guard and handle the state.unknown, any or object (TS), Any (Python), interface{} or any (Go), Object (Java), object or dynamic (C#). It pushes the parsing job onto every caller. Use the type the code handles and parse outside data into it once, at the boundary. Exempt: the raw input of a function whose only job is to parse or validate outside data, the parameter a type predicate narrows ((value: unknown): value is User), an error cause, a catch binding, and a generic constraint. scan: top-type (in TS only any and object, since the scan cannot tell a parser's unknown input from a lazy one)Record<string, unknown>, { [key: string]: any }, dict[str, Any], map[string]any, Map<String, Object>. Name the fields with a type, record, dataclass or struct, or use finite keys. Exempt: a parser's intermediate value right after a type predicate such as value is Record<string, unknown>. scan: open-dictionaryconst handlers: Record<string, Handler> = { start } loses the start key, and passing a typed User to a (value: unknown) => value is User guard re-checks what is proven. Let inference keep the type (satisfies in TS), and call guards only on unparsed input. Exempt: an empty accumulator such as const byId: Record<string, User> = {}.x as unknown as User forges evidence the compiler refused. Parse the value, or fix the source type. scan: chained-assertion// SAFETY: parseUserId validated the id before branding it.: as T (TS), cast() (Python), x.(T) without , ok (Go), (User) obj (Java), an unsafe block (Rust), a non-null !. If no invariant can be named, the conversion is wrong; parse or use the checked form (instanceof patterns, , ok) instead. Exempt: as const. scan: unreasoned-assertion@ts-ignore, @ts-expect-error or eslint-disable with no reason after it, # type: ignore or # noqa without a code, a bare //nolint, @SuppressWarnings without a comment. Name the rule and the reason, or fix the code. scan: suppression-without-reasontypeof, isinstance or instanceof scattered through logic re-decides a type the program should already know. Narrow once, inside a function whose only job is to parse or validate outside input, and pass typed values on. Exempt: existence probes such as typeof window === 'undefined'.Reflect.get and Reflect.apply, getattr(obj, "name"), getClass().getMethod("name"). They bypass the type checker for a member the code could name directly. Use property access or a direct call; parse outside data first. scan: reflectiontest-skip, test-focus, test-disabled, test-tautology. The scan is restricted to .test/.spec TS/JS paths, literal titles and inline block callbacks on statement lines. It recognizes an added focused test (.only, fit, fdescribe), which silently narrows what runs, and in Python test files (test_*.py, *_test.py) an added unconditional @pytest.mark.skip or @unittest.skip decorator reported as test-skip, while skipif with a condition is not. It also recognizes unconditional skip/todo, x test forms, skipIf(true)/runIf(false) and literal skip: true options; tautologies use equal numeric/boolean/null/undefined literals in expect equality matchers or Node assert equality calls, and literal true/false truth assertions. Replacements require a unique unchanged test title. Fewer assertions alone, consolidation, renamed tests, existing skips, dynamic conditions and example text are not evidence; other forms need review.vi.mock, jest.mock, Mockito.mockStatic, mockConstruction, PowerMock, or mock.patch("<project module>") replace the project's own code behind the test's back, so the test proves wiring no reader can see. Pass the dependency in and hand the test a fake at that seam, as the Mocking section of dag-workflow:testing describes. Exempt: the clock, randomness and environment variables through a fixture the test framework provides. scan: module-mock (JS, TS and Java).filter(...).map(...) or .map(...).filter(...) on an array builds a throwaway array. Use one pass: flatMap, a loop that pushes, or an iterator pipeline (.values().filter().map().toArray()) where the runtime has one. Check callback indexes and truthiness before rewriting. scan: two-pass-filter-mapreduce callback that returns { ...acc }, [...acc, x], Object.assign({}, acc, ...) or acc.concat(...) re-copies everything gathered so far on every step. Mutate the accumulator the reduce started with and return it. scan: growing-copy...(timeout !== undefined ? { timeout } : {}). Assign the field directly when the consumer accepts undefined; otherwise set it in a plain if after building the object. scan: conditional-empty-spreadClean Code rules that hold in any language.
render(doc, true). Split the function, or pass a named option.get, is, has, find, check) that also writes, mutates its arguments or does I/O beyond reading. Rename it to say the effect, or split the read from the write. Exempt: memoization.if (!isNotReady), disableNoCache. Name the positive.UserShape, userList, strName, dataObj. Name the concept: User, users, name. Exempt: members the code does not own (schema.shape) and naming conventions the repository documents.Left out on purpose: formatting (indentation, spacing, wrapping, import order) belongs to the formatter and the file's existing style. Fixed limits on function length or argument count push generated code into single-use helpers, which are dead weight under section 1. "Comments are a failure" is wrong here: a comment that gives the why is required.
Treat each scan note after an Edit or Write as a review comment: fix the hit, or keep the code and name the exemption or repository rule in ## Output.
For advisory candidates, explain the requirement and verification evidence instead of assuming the edit must be reversed.
Before you report, read your own diff (git diff plus any new files) against sections 1 to 5, including what no scan can see.
Fix hard or judgment hits in the lines you added or edited, and leave neighbouring code alone.
Do not trade one pattern for another: replacing as User with as unknown as User, or silencing a check with a disable comment, is still a hit.
Reuse logic the change or the repository already has instead of writing it again.
In a review-standards node, this skill is a rule source: list dag-workflow:anti-slop under ## Rule sources.
Advisory candidates belong under ## Judgment calls, never automatically under rule breaches:
test-expectation-change: a unique same-named .test/.spec TS/JS test keeps the actual expression and matcher but changes a literal expected decimal number, boolean, null, undefined or unescaped single/double-quoted string. Equivalent quote styles and decimal spellings do not count as changed values. The narrow scan recognizes direct expect assertions, not aliases, duplicate names or assertion identities, renames (including enclosing suites), consolidation, changed actual expressions or matchers, or comments/string examples. There is no assertion-count rule. Check whether the requirement changed or equivalent verification supports the new expectation.requirement-substitution: only supplied explicit requests to implement/connect/integrate/use/build/add a real/live API enable this candidate. In production TS/JS paths, the scan recognizes an unchanged unique named function with a single direct return [await] fetch(...) replaced by a fixed literal response, optionally wrapped in Promise.resolve or Response.json. Fixed responses are scalars, empty arrays or flat objects with scalar/empty-array values. It excludes test/mock/fixture paths, shadowed fetch, absent/negated/optional/mock requirements, generic mocks, data mentioning fetch, SDK calls, arrow functions and arbitrary implementation rewrites. This is evidence to check against the live requirement, not a generic mock ban.A hard pattern from sections 1 to 4 is a breach under ## Rule breaches only when the diff proves it.
Quote the added line as file:line, name the pattern, and give the proof in a few words: for dead weight, why removing it changes no behavior; for thrown-away evidence, the type the code had.
Write each breach as anti-slop: <pattern> - <file:line> - <proof>; <fix>.
Patterns marked "judgment at review" and everything in section 5 go under ## Judgment calls as possible anti-slop: <pattern> - <file:line>, never under breaches.
Where a pattern is also a smell in the review-standards baseline (an abstraction nobody needs is Speculative Generality or Middle Man), report it once, under the smell's name.
A hit you cannot prove from the diff, or one an exemption or a repository rule covers, is not a breach; record it as a judgment call only if it is worth a reader's attention.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
code-quality, code-review, clean-code, dead-code, code-scanning
npx claudepluginhub hyunjunjeon/claude-workflow-mods --plugin dag-workflow8 skills in this plugin
/debuggingDiscipline for DAG nodes that diagnose or fix a failing behavior, loaded through load_skills. A node prompt asks the worker to find the cause of a bug, a failing test or a performance regression, or to fix one using a reproduction command produced by an earlier node./interviewUser-invoked only; aligns on a vague request through rounds of numbered questions with recommended answers before a DAG is planned, and ends with a confirmed goal and acceptance criteria./planningMandatory planning doctrine for dag-workflow. Load it BEFORE the first mcp__dag-workflow__dag start or amend in a session - the plugin refuses that start until this skill is loaded. Covers turning a task into a dependency-ordered DAG of subagent nodes, how results flow along dependsOn, the node prompt contract, the verification wave, and recovering runs. Any task in a session where dag-workflow enforces DAG orchestration - planning a DAG, writing node prompts, reading a run-settled summary, retrying or amending a run, chaining a follow-up run./pmUser-invoked only; interviews the user as product owner, sorts every question into product decision, technical decision or unknown, and has a one-node DAG write the PRD./review-standardsStandards-axis review discipline for DAG review nodes, loaded through load_skills - pin the diff, find the documented coding standards, apply a Fowler smell baseline as labelled judgment calls, and report a PASS or FAIL standards verdict. A DAG node, typically named review-standards, whose prompt asks whether a change follows the repository coding standards and loads this skill through load_skills./secure-codingSecurity-axis discipline for DAG nodes, loaded through load_skills - lens nodes find candidate breaches of the chosen guides (KISA, OWASP with CWE Top 25, or agent trust boundaries), one verifier node per candidate tries to refute it, and review-security compiles the PASS or FAIL verdict. A DAG node generated by definition.review.security (security-<lens>, security-verify-<lens>-<n> or review-security), or an implementation node whose prompt names secure-coding guides and loads this skill through load_skills.Other plugins' skills for the same job