kubb: Command for Claude Code

.claude/commands/deslop.md

deslop is a command for Claude Code from kubb-labs/kubb. It costs 12 tokens per session (208 once invoked), scanned A, original, MIT.

A command that removes unnecessary or inconsistent code from the current branch's changes while keeping behaviour the same. Code slop means clutter or low-quality patterns that do not add useful behaviour.

In plain words
What is it for?
Use it to simplify comments, error handling, type workarounds, and deeply nested code, then format and lint the project.
Why use it?
It helps clean up AI-generated or overly defensive edits before review without changing the intended result.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

This is kubb-labs/kubb's own configuration. It tells Claude Code how to work on kubb itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kubb configures →

About the project

Kubb is a modular code-generation framework that turns OpenAPI descriptions into type-safe TypeScript code, Zod schemas, and TanStack Query integrations. It is used by TypeScript developers to generate client code and related interfaces from API specifications. The catalogue contains extensions such as skills, commands, hooks, agents, and a plugin that support Kubb workflows.

kubb-labs/kubb · 1,792 stars · on GitHub · kubb.dev

Reuse

Borrowing it

Nothing to install: this file belongs to kubb-labs/kubb. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kubb-labs/kubb/main/.claude/commands/deslop.md
Clone the repo
git clone --depth 1 https://github.com/kubb-labs/kubb

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deslop

README.md
[![agentmods](https://agentmods.dev/badge/commands/kubb-labs/kubb/deslop.svg)](https://agentmods.dev/commands/kubb-labs/kubb/deslop)
Your own site
<a href="https://agentmods.dev/commands/kubb-labs/kubb/deslop"><img src="https://agentmods.dev/badge/commands/kubb-labs/kubb/deslop.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 208 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.00208
Opus 5 $0.00006 $0.00104
Sonnet 5 $0.00002 $0.00042
Haiku 4.5 $0.00001 $0.00021

Measured 7d ago against content hash 5d8486e270b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

deslop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/deslop.md · 21 lines

What it actually says

!git diff --stat HEAD

Remove AI-generated code slop from the changes on this branch.

  1. Review the branch's changes: the diff against the default branch, narrowed to $ARGUMENTS when a path or glob is given.
  2. Strip the AI tells: unnecessary or inconsistent comments, defensive checks and try/catch on trusted code paths, any casts that only dodge a type error, and deep nesting that early returns would flatten.
  3. Keep behavior unchanged unless fixing a clear bug. Make minimal, surgical edits and do not weaken types, lint rules, or tests.
  4. Run pnpm format && pnpm lint:fix and report a 1-3 sentence summary.

Follow the deslop skill for the full checklist. For prose and user-facing markdown, use the humanizer skill instead.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 21 lines · 12 tokens per session scan A 5d8486e270b2

Subscribe to this mod's changes

deslop is a command published in the GitHub repository kubb-labs/kubb (1,792 stars, last pushed today), licensed MIT. It adds 12 tokens to every session and 208 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.