Agent skill

Cleanup

by wannabespace in wannabespace/conar

Review the current branch's diff against its base (tamery, else main), then shrink it — delete code that carries no logic, split files that hold more than one subject, make new code look like the…

AGPL-3.0Auto-check passedDatabases

Install Cleanup

skills CLI
$ npx skills add wannabespace/conar --skill cleanup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wannabespace/conar cleanup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wannabespace/conar.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/cleanup .claude/skills/cleanup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cleanup
GitHub stars
1.5k
Token cost
~2.4k tokens
SKILL.md length
1,330 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Review the current branch's diff against its base (tamery, else main), then shrink it — delete code that carries no logic, split files that hold more than one subject, make new code look like the…

  • Works in 10 steps: Get the diff → Delete → One subject per file → …
  • Says the branch got messy
  • SKILL.md covers 1. Get the diff, 2. Delete, 3. One subject per file and 4. Match the house shape, plus 6 more sections
  • Calls git, pnpm and gh

What it does

Cleanup is an agent skill from wannabespace/conar. Review the current branch's diff against its base (tamery, else main), then shrink it — delete code that carries no logic, split files that hold more than one subject, make new code look like the code around it, replace per-page styling with kit props, strip every comment that is not a warning, fix bugs the pass surfaces, and re-check keyboard flow and DX. Use before opening or updating a PR, or when the user says the branch got messy.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Debugging. The repository describes itself as: AI-powered tool for working with Postgres, MySQL, MSSQL and Clickhouse. The licence is AGPL-3.0.

When your agent uses it

  • Says the branch got messy
  • Tasks that involve Debugging

Example prompts

  • “/cleanup”

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. Get the diff
  2. Delete
  3. One subject per file
  4. Match the house shape
  5. De-customize the UI
  6. Comments
  7. Fix what the pass surfaces
  8. DX and keyboard
  9. Verify
  10. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 53c9289. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • pnpm
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, pnpm and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cleanup loads about 2.4k tokens when it runs. Until then it costs about 112 tokens; SKILL.md has 1,330 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~112
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from wannabespace/conar at commit 53c9289, republished under its AGPL-3.0 licence (© wannabespace). 1,330 words, ~2,444 tokens.

Download SKILL.mdSave it as .claude/skills/cleanup/SKILL.md (or your agent's skills folder).
name
cleanup
description
Review the current branch's diff against its base (tamery, else main), then shrink it — delete code that carries no logic, split files that hold more than one subject, make new code look like the code around it, replace per-page styling with kit props, strip every comment that is not a warning, fix bugs the pass surfaces, and re-check keyboard flow and DX. Use before opening or updating a PR, or when the user says the branch got messy.

Cleanup

Shrink a branch's diff without changing what it does. Fewer lines, fewer overrides, fewer comments, one subject per file — every change here is behaviour-preserving unless it fixes a real bug found on the way.

Read first: .agents/rules/code-style.md, .agents/rules/ui.md, and the tamery-ui skill's hard rules. They define what "clean" means here; this skill is the pass that enforces them.

1. Get the diff

sh
git fetch -q origin tamery main
BASE=$(for b in $(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo tamery main); do m=$(git merge-base HEAD origin/$b) && echo "$(git rev-list --count $m..HEAD) $m"; done | sort -n | head -1 | cut -d' ' -f2)
git diff --stat $BASE           # keep for the report
git diff $BASE                  # committed + uncommitted work
git status --short              # untracked files are part of the review

The base is the PR's base, else whichever of tamery/main the branch is nearer to. Read every changed file whole, not only the hunks — a hunk hides the helper above it that is now unused.

2. Delete

In rough order of payoff:

  • Dead code the branch created: unused exports, props never passed, state never read, helpers with one caller (inline them). grep each new symbol repo-wide before keeping it.
  • Imagined states: a guard or try/catch the surrounding module would not write, protecting a state that cannot occur; compatibility shims, aliases, retries and fallbacks — the app is unreleased, so none are owed; casts that launder types (as any, as unknown as T, ! where narrowing works); intermediate variables that name nothing.
  • Reinvention: a div stack that is a registry component, a hand-rolled effect where a library option exists, a loop where a built-in reads better. Kit search: pnpm dlx shadcn@latest search @shadcn -q <term>.
  • Hand-written code for a well-known format or algorithm (CSV/TSV, diff, glob, semver, date math, …): check npm for a small, maintained, zero-dependency package. Adding a dependency is the user's call, so put it in the report under "left alone and why" with the package name; don't keep it silently.
  • Speculative shape: an abstraction with one implementation, an option nobody sets, a wrapper that forwards. Collapse it.
  • Duplicate logic added next to an existing helper — reuse the helper (a hand-rolled n > 1 ? 's' : '' is plural() from ~/lib/plural; a query key rebuilt by slicing another helper's queryOptions(...).queryKey is the exported *QueryKey builder). Two dialect branches of one createQuery that are character-for-character identical are one statement written twice. The same inline object type in two files is one named type exported by the file that owns it.
  • No-op code: a prop set to the kit's default (side="top" on TooltipContent, variant="outline" on AlertDialogCancel — read the component's default before keeping it); an onClick re-checking the condition that already sets disabled; branches that all return the same value; a merge/spread over an object every caller passes whole; a caller spelling out undefined/false fields that are only read truthily; recomputing a value already in scope.
  • Unused lint escapes: pnpm exec oxlint -c oxlint.config.ts --report-unused-disable-directives $(git diff --name-only --diff-filter=d $BASE -- '*.ts' '*.tsx') lists every oxlint-disable in the changed files that suppresses nothing — delete them; a moved or rewritten line often leaves its directive behind.
  • Orphan files: a patch nothing lists in pnpm-workspace.yaml, an asset nothing imports, a fixture no test reads. Check the registry a file needs to be in, not just imports.

Do not delete a behaviour a rule file or the tamery-ui skill describes on purpose — an unused option is speculation, an unused behaviour someone wrote down is a decision. Speculation goes; a decision gets asked about. Either way, the doc describing what you deleted is updated in the same pass.

3. One subject per file

Deleting never finds a file that does too much, so ask it of every changed file separately, whatever its length: list its subjects. A subject is a component, a hook with its own refs or effects, one branch of a layout switch, or an adapter that unpacks one object into another's parameters. Anything past the first moves out:

  • A layout branch whose sibling already has its own file (DocumentList beside an inline <Grid> setup) gets its own file, shaped like the sibling.
  • A cluster of refs, an effect and an imperative handle serving one job is a use<Job> hook in its own file, together with the types it exports.
  • An adapter that spreads an object into callbacks for a single callee means the callee should take the object; fold the adapter into it.
  • After a split, grep what the old file returned or exported. A value only the moved code used (a lookup map returned beside the real result) is now dead.

Lines a split adds do not count against the shorter diff. Repoint importers at the new file; never re-export from the old one.

4. Match the house shape

New code should be indistinguishable from the code beside it — and read as written by a person, not compressed. Plain branches beat a clever one-liner (String(v ?? 'null') || 'empty', const [only] = cond ? list : [], a line opening with ;(); an if chain over one field's values is a lookup record; a class ternary repeating its shared classes is cn(shared, cond ? a : b); several useStates always set together are one object state.

Pick the majority spelling and use it everywhere rather than leaving two conventions in one folder: one hook for one job, one import path, one prop-type style across sibling files. Kit variants live in <component>.utils.ts as cva, not as a record inside the .tsx.

Look at what the repo actually does before "fixing" a file to a rule — useMemo/useCallback are banned, but react-hooks(exhaustive-deps) outranks that: if the linter demands a stable identity, the memo stays.

Show full SKILL.md (463 more words)Show less

5. De-customize the UI

Check every changed .tsx against the tamery-ui hard rules. Rule 11 (a className on a kit component is a missing prop) is the one this pass finds most: surface classes on a kit component (padding, radius, background, border, font size, height) move into a size/variant in packages/ui, and the call site keeps layout only. Changed chrome is mirrored in the boot shell and skeletons (AGENTS.md → stand-ins).

6. Comments

Apply AGENTS.md → "A comment is a warning or it does not exist". The test for each comment: without it, would the next reader misunderstand what this code does, or break it? If not, delete it. A comment needed only to explain what code does is a naming problem — rename or extract until the code says it, then delete the comment.

7. Fix what the pass surfaces

A pass over the whole diff finds real defects — a wrong dependency, a missed error path, a stale query key, an await that isn't. Fix them here and say so in the report. Verify against official docs rather than memory when a library's behaviour is the question.

8. DX and keyboard

Every surface the branch added meets hard rules 12 (keyboard flow, the Escape ladder) and 13 (⌘ reveals its shortcuts).

9. Verify

sh
pnpm run fix         # autofix lint + format
pnpm run check       # must be clean
pnpm run check-types # after router changes: cd apps/api && pnpm tsc first
pnpm test            # if the branch touches tested code

Then run the app and exercise the changed screens (monorepo.md → Opening the running app in a browser). Behaviour-preserving means verified, not assumed; when the browser is unavailable, say which checks did run instead of implying the screens were seen.

Traps this pass keeps hitting:

  • A default parameter is part of the behaviour. Re-signing a tiny factory (createItem(value = '') → createItem()) silently empties every .map(createItem) call site. Re-read each caller after touching a signature.
  • Inlining has a lint limit. Folding a helper into its caller can push the caller past eslint(complexity) — then the helper stays.
  • Merging seitu subscriptions is not free. useSubscription deep-compares selector results, so folding separate subscriptions into one pick changes which references an effect's deps see — leave subscriptions that feed effect deps separate.
  • Lint vetoes some obvious rewrites. no-nested-ternary is on (a three-way value is an if chain); prefer-array-index-of rejects findIndex((x) => x === v), so an indexOf(… as HTMLElement) cast stays; hook-use-state rejects destructuring an object state in the useState line — take [thing, setThing] and destructure on the next line.
  • A "simpler" rewrite that needs new types, consts or lint escapes to stand up is not simpler. Measure it against the original and revert if it lost. The point is a shorter diff, not a different one; a split by subject (step 3) is the one exception.

10. Report

git diff --stat before vs after, then four lists: deleted, split, bugs fixed, left alone and why. Anything intentionally kept that looks like cruft gets a line, so the next pass does not re-litigate it.

© wannabespace, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/cleanup of wannabespace/conar.

Open the folder on GitHubat commit 53c9289

Compare with similar skills

Cleanup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cleanup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cleanup this skillwannabespace/conar1.5k—~2.4kAutomated safety check: PassAGPL-3.0
Hybrid Cloud Outboxesgetsentry/sentry46k—~4.8kAutomated safety check: PassCustom licence
Slow Database InterviewerPrepLabsAI/InterviewMentor112—~2.6kAutomated safety check: PassMIT
Relational Query ProcessorFoundationDB/fdb-record-layer675—~1kAutomated safety check: PassApache-2.0
Auth Store Debugvercel-labs/vercel-openclaw-archived117—~465Automated safety check: PassMIT
Qv Registry Autobase Patternstetherto/qvac683—~441Automated safety check: PassApache-2.0

Similar skills

  • Hybrid Cloud Outboxes

    getsentry/sentry

    Official

    Guide for creating and maintaining outbox-based eventually consistent operations in Sentry.

    46k GitHub stars~4.8k tokensUpdated today
    DatabasesAuto-check passed
  • Slow Database Interviewer

    PrepLabsAI/InterviewMentor

    A seasoned DBA interviewer who has diagnosed every slow query pattern in production.

    112 GitHub stars~2.6k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Relational Query Processor

    FoundationDB/fdb-record-layer

    Specialized skill for working in the fdb-relational-core SQL processing layer — parser, plan generator, and Cascades planner.

    675 GitHub stars~1k tokensUpdated today
    DatabasesAuto-check passed
  • Auth Store Debug

    vercel-labs/vercel-openclaw-archived

    Official

    Auth and store debugging for vercel-openclaw: admin-secret mode, Sign in with Vercel, session cookies, CSRF, LOCALREADONLY, Redis vs memory store, keyspace namespacing, and metadata shape migrations.

    117 GitHub stars~465 tokensUpdated 4 mo ago
    DatabasesAuto-check passed
  • Reference material for Autobase, HyperDB, and multi-writer patterns in the QVAC registry server.

    683 GitHub stars~441 tokensUpdated today
    DatabasesAuto-check passed
  • Hunt Exceptional Conditions

    elementalsouls/Claude-BugHunter

    Hunt mishandling of exceptional conditions — feed an endpoint malformed/unexpected input (wrong type, broken JSON, oversized field, null byte) and make it fail OPEN or leak internals: a verbose…

    4.8k GitHub stars~786 tokensUpdated yesterday
    DatabasesAuto-check passed

More from wannabespace/conar

  • PR Triage

    wannabespace/conar

    Speed up a GitHub PR review — sort every changed file into trivial / skim / review, mark the trivial ones as viewed on GitHub, and hand back a reading order for the rest.

    1.5k GitHub stars~811 tokensUpdated today
    Auto-check passed
  • User Behavior QA

    wannabespace/conar

    Test the running app through its visible browser UI as a real user.

    1.5k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Tamery UI

    wannabespace/conar

    Tamery's UI design system and hard rules — native macOS look, three-level color system, typography tokens, motion recipes, and the kit's known gotchas.

    1.5k GitHub stars~1.5k tokensUpdated today
    Auto-check passed

Questions about Cleanup

What does Cleanup do?

Review the current branch's diff against its base (tamery, else main), then shrink it — delete code that carries no logic, split files that hold more than one subject, make new code look like the…. Cleanup is an agent skill from wannabespace/conar. Review the current branch's diff against its base (tamery, else main), then shrink it — delete code that carries no logic, split files that hold more than one subject, make new code look like the code around it, replace per-page styling with kit props, strip every comment that is not a warning, fix bugs the pass surfaces, and re-check keyboard flow and DX.

When should I use Cleanup?

Cleanup fits situations like: says the branch got messy; tasks that involve Debugging.

How do I install Cleanup in Claude Code?

Run `npx skills add wannabespace/conar --skill cleanup -a claude-code`. Or copy the skill folder (.agents/skills/cleanup in wannabespace/conar) into .claude/skills/cleanup in your project. Claude Code loads it when a task matches its description.

How do I install Cleanup in Codex?

Run `npx skills add wannabespace/conar --skill cleanup -a codex`. Or copy the skill folder (.agents/skills/cleanup in wannabespace/conar) into .agents/skills/cleanup in your project. Codex loads it when a task matches its description.

Can I use Cleanup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wannabespace/conar --skill cleanup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cleanup, .gemini/skills/cleanup, .github/skills/cleanup and .opencode/skills/cleanup in your project.

What does Cleanup need to run?

Going by SKILL.md and its folder, Cleanup needs the command-line tools its instructions call (git, pnpm and gh).

Does Cleanup access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Cleanup safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cleanup use?

Cleanup is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cleanup use?

About 2.4k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cleanup?

Skills that share tags, products or a category with Cleanup: Hybrid Cloud Outboxes (getsentry/sentry, 46k stars), Slow Database Interviewer (PrepLabsAI/InterviewMentor, 112 stars), Relational Query Processor (FoundationDB/fdb-record-layer, 675 stars) and Auth Store Debug (vercel-labs/vercel-openclaw-archived, 117 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cleanup?

wannabespace (a GitHub organization) maintains it in wannabespace/conar, which has 1,452 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 9, 2026.

Source: wannabespace/conar on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.