skills/deslop/SKILL.md
Use when cleaning up AI-generated code, removing unnecessary comments, defensive checks, redundant type assertions, or style inconsistencies introduced by AI coding assistants. Also use when the user says deslop, clean up AI code, or remove slop. NEVER use for refactoring human-written code, changing application logic, or code review (use clean-code).
npx skillsauth add sharkitect-solutions/sharkitect-claude-toolkit deslopInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| File | Purpose | When to Load | |---|---|---| | SKILL.md | Deslop procedure, AI slop pattern catalog (18 patterns), language-specific slop, slop vs intentional decision guide | Always (auto-loaded) | | framework-specific-patterns.md | React/Next.js, Express, Django, Rails slop patterns, framework-specific style conflicts, App Router gotchas | When deslopping code in a specific framework | | codebase-style-calibration.md | Style detection procedure, config file authority, ambiguity resolution, multi-file calibration, confidence levels | When deslopping an unfamiliar codebase or when style conventions are unclear | | batch-deslop-workflow.md | Large diff triage (20+ files), file categorization, slop density scoring, reporting formats, multi-commit handling | When deslopping large branches or producing structured deslop reports |
| This Skill Handles | Defer To | |---|---| | Removing AI-generated code artifacts (comments, defensive checks, type noise) | clean-code (refactoring human-written code) | | Detecting and removing debug artifacts (console.log, print statements) | systematic-debugging (investigating bugs) | | Calibrating to local codebase style before removing | frontend-design (establishing new design conventions) | | Framework-specific AI slop patterns | error-resolver (fixing actual runtime errors) | | Batch deslop of large diffs with structured reporting | git-commit-helper (commit message writing) | | Slop vs intentional decision guide | senior-backend (architecture decisions) |
git remote show origin to confirm the default branch (main, master, develop). If ambiguous, ask the user before proceeding.git diff <base>...HEAD -- the three-dot form shows all commits on this branch relative to where it diverged from base.| Pattern | Example | Why It's Slop | Fix |
|---|---|---|---|
| Obvious comments | // Increment the counter above count++ | States what the code already says | Delete |
| Section-divider comments | // ===== Helper Functions ===== | AI file organization noise | Delete |
| Unnecessary defensive try/catch | try { return arr[0] } catch(e) {} on a guaranteed non-empty array | Adds noise on trusted/validated paths | Delete |
| any cast to bypass types | (value as any).foo | Masks a real type issue | Fix the type or use a proper assertion |
| Inline Python imports | import json inside a function body | Violates project convention | Move to top-of-file import block |
| Redundant null check on non-nullable | if (name !== null && name !== undefined) on a required string param | TypeScript already knows it's non-null | Remove guard or tighten the type |
| Unused catch parameter | catch (error) { throw new Error('failed') } | error is ignored entirely | catch { throw ... } or log error |
| console.log left behind | console.log('processing item', item) | Debug artifact | Delete |
| Unnecessary async/await | async function getId() { return await Promise.resolve(42) } | Wraps a sync value for no reason | Remove async/await |
| Over-verbose variable names | const userInputValidationResult = validate(input) | Name length exceeds utility | const validationResult or just valid |
| Unnecessary intermediate variable | const result = compute(); return result; | One line would do | return compute(); |
| Over-destructuring | const { a, b, c, d, e } = obj then only a is used | Imports more than needed | const { a } = obj |
| Gratuitous ternary | const x = flag ? true : false | Just assign the boolean | const x = flag |
| Unnecessary string interpolation | const msg = `Hello world` with no variables | Template literal with no substitution | const msg = 'Hello world' |
| Explicit return undefined | return undefined; at end of void function | JS/TS returns undefined implicitly | Delete |
| Unnecessary block around single statement | if (cond) { doThing(); } when codebase uses braceless style | Inconsistent with file style | Match local convention |
| Excessive inferred type annotations | const count: number = 0 | TypeScript infers number from 0 | const count = 0 |
| Wrapping existing util in a new function | function isValid(x) { return validate(x); } | Thin wrapper with no added logic | Call validate() directly |
| Language | Common AI Slop Patterns |
|---|---|
| Python | Inline imports; if x is not None: on values already guarded upstream; pass in non-empty blocks; redundant __all__ on private modules; f-strings with no interpolation; return None at end of function |
| TypeScript / JavaScript | as any; explicit : void return annotations; Promise.resolve() wrapping sync values; console.log artifacts; undefined checks on non-optional params; unnecessary else after return |
| React | Wrapping a single JSX element in a Fragment with no sibling need; key={index} on static lists; prop drilling a value one level (should be passed directly); empty useEffect dependency arrays on effects with deps |
| Go | Error shadowing with blank identifier _ =; fmt.Println debug artifacts; unnecessary pointer indirection; wrapping stdlib errors without adding context |
Do NOT remove something that looks like slop if any of these apply:
as unknown as T at a serialization boundary is often correct. Only remove any casts that exist solely to suppress a type error with no explanation.| Dimension | Why This Skill Handles It | |---|---| | Scope precision | Operates on the branch diff only -- never touches pre-existing human code outside the changed lines | | Style calibration | Reads surrounding file context before flagging anything, so local conventions override generic rules | | Pattern completeness | Catalog covers 18 patterns across obvious and subtle AI artifacts, reducing false negatives | | Language awareness | Per-language table captures idioms that generic rules miss (Python inline imports, React fragment noise) | | False-positive protection | Decision Guide prevents removing intentional defensive code or local convention misidentified as slop | | Reporting discipline | 1-3 sentence summary keeps the author informed without generating a wall of explanation |
development
When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ad copy,' 'ad creative,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' or 'audience targeting.' This skill covers campaign strategy, ad creation, audience targeting, and optimization.
testing
--- name: using-sharkitect-methodology description: Use when starting any conversation in a Sharkitect workspace OR before any task involving NEW pricing, positioning, proposal, strategy, plan-execution, or schema-design work — mandates invocation of Sharkitect-specific methodology skills (pricing-strategy, marketing-strategy-pmm, smb-cfo, hq-revenue-ops, executing-plans, brainstorming) under the same anti-rationalization discipline as using-superpowers. Documentation has failed 4 times across H
testing
Use when user says 'end session', 'wrap up', 'stop for the day', 'done for today', 'close out', 'save session', 'wrapping up', or invokes /end-session. Runs the full 9-step end-of-session protocol: resource audit, MEMORY.md update, lessons capture, plan status, pending items, workspace checklist, .tmp/ audit, git commit+push, Supabase brain sync, session brief, summary. Final step schedules a detached self-kill of the current session ONLY (3s delay) so the window closes cleanly. Other claude.exe processes (active workspaces) are NOT touched -- orphan cleanup is handled separately by Claude-Orphan-Cleanup-Hourly with proper age safeguards. Do NOT use for: mid-session quick saves (use session-checkpoint), skill syncing (use sync-skills.py), brain memory queries (use supabase-sync.py pull), document freshness reviews (use document-lifecycle), resource gap detection (use resource-auditor).
testing
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, passive voice, negative parallelisms, and filler phrases.