Deslop logo

Deslop

Community
mikecann
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.

Overview

Publishermikecann
Repositoryagent-skills
Skill namedeslop
Stars
22
Forks
1
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by mikecann on GitHub. Read the source before you install it.

Installation

Install the Deslop AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/mikecann/agent-skills/tree/main/skills/deslop
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mikecann/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/deslop .claude/skills/deslop
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Deslop in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Deslop on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Deslop is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Deslop

Take code that was just written and make it feel tighter, simpler, and more deliberate.

Read 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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Deslop AI skill do?

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.

Why use Deslop on TypingMind?

Because you install it once and use it with any model. Deslop is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Deslop in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mikecann/agent-skills/tree/main/skills/deslop. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Deslop?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Deslop?

As many as you like. As long as a model supports skills, you can use Deslop with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Deslop AI skill free?

Yes. It is published on GitHub by mikecann under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇