anti-slop-fix
Anti-Slop Fix
Runs the anti-slop audit and automatically applies fixes to detected issues.
Workflow
Step 1 — Run the audit
Execute the full anti-slop analysis workflow (Steps 1-5 from the anti-slop skill) on the provided file paths or globs. Read ../anti-slop/references/slop-code-patterns.md for the pattern catalog.
Store the results internally — do NOT output the full report yet.
Step 2 — Classify fixability
For each issue found, classify it:
-
Auto-fixable — the fix is mechanical and safe:
- Deleting unnecessary comments (Cat 1a, 1b, 1c, 1d, 1e)
- Removing redundant else-after-return (Cat 3c)
- Removing
=== true/=== falsecomparisons (Cat 7b) - Removing unnecessary
async/awaiton return (Cat 7c) - Removing unused imports (Cat 5a)
- Removing unreachable code (Cat 5c)
- Replacing ternary with
??(Cat 7a) - Removing
return condition ? true : false→return condition(Cat 7b)
-
Semi-auto — likely safe but needs a sanity check:
- Inlining single-use helper functions (Cat 2a)
- Removing fallback values on non-nullable types (Cat 3e)
- Shortening verbose error messages (Cat 3d)
- Removing type assertions on already-typed values (Cat 6c)
- Renaming "enhanced/optimized" variables (Cat 4a)
-
Manual only — too risky to auto-fix, report these instead:
- Fixing
as anycasts — requires understanding the correct type (Cat 6a) - Removing
@ts-ignore— need to verify the fix compiles (Cat 6b) - Deleting exported-but-unused symbols — other repos may depend on them (Cat 5d)
- Cross-file refactors (inlining across files)
- Fixing
Step 3 — Apply auto-fixes
Process fixes bottom-up within each file (highest line number first) to preserve line numbers for subsequent edits.
For each auto-fixable issue:
- Use the Edit tool to apply the fix
- Record what was changed
Do NOT apply semi-auto fixes without telling the user. List them separately.
Step 4 — Apply semi-auto fixes (with disclosure)
For each semi-auto issue:
- Briefly state what will change and why
- Apply the fix
- If the fix is wrong or unclear, skip it and move it to "manual review"
Step 5 — Output summary
## Anti-Slop Fix Report
**Files processed:** N
**Issues found:** N
**Auto-fixed:** N
**Semi-auto fixed:** N
**Manual review needed:** N
---
### Changes Applied
#### `path/to/file.ts`
- L12: Deleted comment restating code (`// set the name`)
- L45-52: Inlined `formatDate()` — was called once at L78
- L89: Replaced `isActive === true` with `isActive`
#### `path/to/other-file.ts`
- L3: Removed unused imports: `useCallback`, `useMemo`
- L67: Removed redundant `else` after `return`
---
### Manual Review Needed
| File | Line | Issue | Why manual |
|------|------|-------|------------|
| `api.ts` | 34 | `as any` cast | Need to determine correct response type |
| `types.ts` | 12 | `UserDTO` exported but unused | May be consumed by external packages |
---
### Verify
Run your linter and tests to confirm nothing broke:
\`\`\`bash
npm run lint && npm test
\`\`\`
If there were no issues to fix:
## Anti-Slop Fix Report
**Files processed:** N
**Issues found:** 0
Clean. Nothing to fix.
More from b4r7x/agent-skills
react-design-patterns
Use when choosing a React component pattern — custom hooks, control props, compound components, headless components, render props, container/presentational, or other architectural patterns. Includes 13 patterns with decision guide and 2025 popularity ranking.
26human-commit
Generates human-like git commit messages based on staged or unstaged changes. Reads git diff, analyzes what changed, and outputs 3 natural commit message options that sound like they were written by a developer — not AI. This skill should be used when the user wants a commit message, asks "what should I write for commit", "generate commit message", "human like commit", "wiadomość do commita", or just asks for help committing.
24humanize-readme
Rewrites a README.md to remove AI slop — buzzwords, generic openers, fake enthusiasm, and formulaic structure — replacing it with direct, honest, human-sounding writing. This skill should be used when the user wants to humanize a README, remove AI-generated writing patterns, make documentation sound less like ChatGPT wrote it, or asks to "fix the README", "humanize readme", "remove AI slop", "make it sound human".
24improve-prompt
Transforms a rough, unpolished prompt idea into a precise, structured AI coding prompt. Automatically researches the current project context (stack, file structure, conventions, git history) before generating. This skill should be used when the user provides a vague or "dirty" prompt idea and asks to refine, improve, or rewrite it — e.g. "improve this prompt", "refine my prompt", "ulepszony prompt", "dopracuj prompt", or simply describes what they want done in rough terms.
23react-anti-patterns
Use when reviewing React code — especially AI-generated code — to catch common anti-patterns. Covers 18 anti-patterns with detection difficulty, including stale closures, state mutation, useEffect abuse, and boolean explosion.
21deep-plan
Takes a rough, unpolished prompt idea and autonomously turns it into an implementation plan. Researches the project deeply, asks clarifying questions, generates a precise internal prompt, then executes it to produce a structured plan with todos. Designed for plan mode. Use when the user gives a vague feature request, rough idea, or "dirty" prompt and wants a ready-to-execute implementation plan — e.g. "plan this", "deep plan", "turn this into a plan", "zaplanuj to", "zrób plan".
19