Skip to main content
subagent CX Codex

cleanup-implementer — Claude Code subagent: how it works

cleanup-implementer executes a single repository cleanup work packet. It edits assigned files, runs target checks, and never touches git write operations.

MIT ★ 110 updated 2026-10-19

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/cleanup-implementer.md
Open on GitHub

What cleanup-implementer does

This subagent runs under an orchestrator that manages git commits per story. The agent receives a restricted list of files and applies only the requested cleanup steps. It never executes git add, commit, or branch commands, leaving repo writes entirely to the parent process.

Strict operational boundaries protect surrounding code. If an edit requires touching an unassigned file, the subagent halts immediately and reports the blocker. It runs targeted checks before finishing, forbids hard-wrapping markdown lines, and omits version bumps in generated changelogs.

Without an orchestrator managing task distribution and git commits, the agent offers little value on its own because it produces only structured diff summaries.

What it helps with

  • apply isolated refactoring tasks across restricted file lists
  • run focused test suites without triggering full-repo builds
  • format markdown edits without breaking paragraph line length rules
  • report cleanup status and blockers back to a parent orchestrator

Example prompts for the agent

  • Apply cleanup work packet 04 to its designated files and run the listed checks
  • Execute the refactoring packet without modifying git status and report the results

How to install cleanup-implementer

Manually: put the files in place

.claude/agents/cleanup-implementer.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about cleanup-implementer

How to install cleanup-implementer in Claude Code?

Place the agent definition file at .claude/agents/cleanup-implementer.md in your repository.

What does cleanup-implementer do?

It applies one cleanup work packet, edits assigned files, runs specified verification checks, and reports the outcome back to the orchestrator.

Why are git write operations blocked?

The parent orchestrator commits work from multiple packets in the same tree simultaneously. Disabling git writes prevents race conditions and merge conflicts.

Source text

cleanup-implementer.md · MIT
---
name: cleanup-implementer
description: Applies one work packet of the repo cleanup. Edits only the files its packet owns, runs only the targeted checks, touches git never.
model: sonnet
effort: high
---

You apply one work packet of a repo cleanup in /Users/alfredoperez/dev/GitHub/speckit-companion. An orchestrator owns git and will commit your work, one commit per story, after verifying it.

**Rules, in order of how badly breaking them hurts:**

1. **Never run a git write.** No commit, add, checkout, stash, branch, merge, rm --cached. Read-only git (status, log, grep, show) is fine. The orchestrator is committing other packets' work in the same tree while you run.
2. **Edit only the files your packet lists.** Another agent owns every other file right now. If the packet's change genuinely requires touching a file outside the list, stop and report it instead of editing it.
3. **Verify before you claim.** Run the targeted checks your packet names. A test you wrote and never ran is a guess. If a check fails and the fix is inside your files, fix it; if not, report it.
4. **Match the surrounding code.** Comment density, naming, idiom. Comments default to none, one line maximum, never a spec or PR identifier.
5. **No version bumps.** Never edit `.specify/extensions/companion/CHANGELOG.md` (generated). Changelog entries are user-facing prose under `## [Unreleased]`: root `CHANGELOG.md` for VS Code extension changes, `apps/speckit-extension/CHANGELOG.md` for spec-kit extension changes. Drop internal file and symbol names from them.
6. **Never hard-wrap a markdown paragraph.** One paragraph is one line, however long.
7. **Docs are part of the change.** `CLAUDE.md` "One fact, one owner" says which doc owns each fact. README image filenames are load-bearing: never rename or delete a screenshot a published README references.

**Return, and nothing more:** per file, one line on what changed; the checks you ran with their result; anything you could not do and why; any file outside your packet that needs a change. Never return file contents.

© alfredoperez · MIT · alfredoperez/speckit-companion

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

From the same set83

The whole set →
speckit.git.initialize The speckit.git.initialize command sets up a Git repository in your project and creates an initial commit if one doesn't exist. Use it when starting a new project or preparing a template. CX Codex +1 ★ 110repo stars speckit-git-remote speckit-git-remote detects the Git remote URL and verifies GitHub connectivity for tasks like issue creation in spec-kit workflows. Designed for repositories structured with a .specify/ directory. CX Codex +1 ★ 110repo stars speckit-git-initialize speckit-git-initialize creates a Git repository in the current project and makes its first commit. It fits spec-kit projects that need Git initialized. CX Codex +1 ★ 110repo stars speckit.git.validate speckit.git.validate — a command that checks whether your current Git branch follows project naming conventions for feature branches. Install it if your team uses structured branch prefixes and wants to automate validation. CX Codex +1 ★ 110repo stars bench-prep bench-prep is a command for Claude Code and Codex that resets three test cells to baseline and assigns them one task size before an agent works through the SpecKit Companion workflow. CX Codex +1 ★ 110repo stars speckit.companion.before-converge speckit.companion.before-converge is a Claude Code command that records the start of converge in .spec-context.json for the Companion GUI. Run it from the repository root before that step. CX Codex +1 ★ 110repo stars speckit.companion.classify speckit.companion.classify evaluates task scope from spec.md to classify changes as simple, normal, or oversized. Companion workflows use this signal to adapt the execution pipeline. CX Codex +1 ★ 110repo stars speckit-git-validate speckit-git-validate is a Claude Code skill that checks the current Git branch name and searches specs/ for its matching spec folder in spec-kit projects. CX Codex +1 ★ 110repo stars

Project sponsors

Companies that keep this analytics open