deslop
Runs a second-pass cleanup over AI-written code using the repo's style guide in style.md. Prefers parallel subagents to simplify recently modified files without changing behavior. Use when the user says "deslop", "clean this up", "make this less AI", "apply my style guide", "second pass", or asks to simplify generated code after implementation.
What this skill does
# Deslop
Take code that was just written and make it feel tighter, simpler, and more deliberate.
Read [style.md](style.md) first. That file is the source of truth for the style rules.
## Process
1. Identify the target files.
- Start with files modified in this session.
- Use `git diff` if available, otherwise use recent edits or the user's explicit file list.
- Do not touch unrelated files.
2. Read each target file before editing it.
3. Use parallel subagents for the cleanup pass.
- If there are multiple files, split them across subagents.
- If there is one large file, it is still fine to use one subagent for an isolated second pass.
- Give each subagent the exact file list it owns.
- If the scope is only one to three small files, a single pass is fine. Do not add subagent overhead just to satisfy the rule mechanically.
4. Tell each subagent to:
- read `skills/deslop/style.md`
- simplify only its assigned files
- preserve behavior exactly
- skip any change that adds churn without making the code clearer
- report a short summary of what changed and what was intentionally skipped
5. Review the subagent output, apply the changes, then do a final sanity pass yourself.
6. Summarise the cleanup in concrete terms.
- Example: "flattened 3 nested conditionals, renamed 2 booleans, replaced 1 non-null assertion"
## Constraints
- Never change behavior. This is a style pass, not a refactor.
- If a style rule conflicts with preserving behavior, preserving behavior wins.
- Prefer small, local edits over wide rewrites.
- If the code only becomes meaningfully cleaner after a deeper architectural refactor, stop and say so instead of forcing deslop beyond its scope.
- Skip generated files, vendor code, build output, and lockfiles.
- Skip tests unless the user asked to include them.
- Skip any rule when applying it would make the code harder to read.
- Preserve exported and public APIs unless the user explicitly asked for API changes.
- Preserve exported TypeScript signatures unless the user explicitly asked for typing or API changes.
- If the code is already clean, say that instead of forcing changes.
## What To Look For First
- Guard clauses instead of nested conditionals
- `if` plus early return instead of `else`
- `const` instead of `let` when there is no reassignment
- narrowing or direct removal instead of `!` non-null assertions
- `Boolean(value)` or explicit comparisons instead of `!!value`
- clearer boolean names like `isOpen`, `hasItems`, `canRetry`
- shorter functions with one clear job
- smaller orchestration functions with extracted helpers
- query/data gathering separated from action/side effects
- function names that describe side effects honestly
- overloaded hooks or components split with small pure helpers
- object parameters instead of long positional argument lists
- exhaustive handling for discriminated unions
- React render branches flattened with early returns
- inline JSX handlers when the logic is only used once
- keep handlers hoisted when they are reused in multiple places
## Bad vs good
```ts
// Bad: nested control flow and unnecessary else
function getLabel(user?: User) {
if (user) {
if (user.name) {
return user.name;
} else {
return "Anonymous";
}
} else {
return "Anonymous";
}
}
// Good: early returns, flat flow
function getLabel(user?: User) {
if (!user?.name) return "Anonymous";
return user.name;
}
```
```tsx
// Bad: hoisted one-off handler and && render
const handleClick = () => doSave();
return hasError && <ErrorBanner onRetry={handleClick} />;
// Good: inline simple handler and explicit null branch
return hasError ? <ErrorBanner onRetry={() => doSave()} /> : null;
```
## Checklist
- [ ] `style.md` was read first
- [ ] only relevant files were touched
- [ ] cleanup used subagents where it helped
- [ ] behavior was preserved
- [ ] skipped changes were intentional
- [ ] final summary explains what changed
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.