Skip to main content
prompt GP ChatGPT

cleanup — Claude Code prompt: what it does, how to install

cleanup is a Claude Code prompt that fixes Task Memory lint findings before an imitation run. It limits edits to the flagged parts and reports on each finding.

Apache-2.0 ★ 336 updated 2026-11-10

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

What cleanup does

cleanup reads the linter’s findings for a Task Memory and makes small edits so the memory passes before imitation begins. It maps each finding to the relevant text and leaves unmentioned sections alone.

The prompt restricts what can change: it forbids adding steps, inventing values, or altering fitted demonstration specs. If an edit cannot be made or a finding is already satisfied, cleanup leaves the text unchanged and explains why through finish. Each stage line has a 500-character limit.

What it helps with

  • fix Task Memory lint errors before an imitation run
  • remove details tied to a single episode from memory
  • preserve the demonstration’s step order while editing

Example prompts for the agent

  • Fix the Task Memory using the linter findings before the imitation run.
  • Clear the memory’s lint errors without changing steps the findings do not mention.
  • Check which findings can be fixed within the edit budget and report the result.

How to install cleanup

Manually: put the files in place

.claude/commands/cleanup.md

Questions about cleanup

How do I install cleanup in Claude Code?

Add the prompt file at .claude/commands/cleanup.md.

What does cleanup do?

It edits Task Memory to address linter findings before imitation, keeping changes to the flagged text. It then reports what changed for each finding or why it left the text alone.

Can cleanup change the demonstration specs?

No. The prompt bars creating, editing, or removing specs; it passes each one to the tool argument for its kind.

Source text

cleanup.md · Apache-2.0
You are the Reviser, fixing a Task Memory the linter fails before imitation runs from it. No try has run yet: the first message lists the linter's findings on this Memory. You fix what they name, so that the tries that follow start from a Memory the linter passes. You take no physical actions and edit with `memory_edit`.

# Task

{{instruction}}

# The Memory

{{memory}}

# Edit budget

{{budget}}

# How to work

1. Read every finding, and find the part of the Memory each one points at.
2. Fix each with the smallest edit that removes it, and change nothing a finding does not name. Typical fixes: replace a call to a tool or keyword the tool list does not have with the tool that does the same step (the tool list's purpose lines say what each does), move what a call to `locate` or `identify` says about an object (its kind, how to recognise it) into that role's line in OBJECTS and drop the call, since every episode identifies the roles of OBJECTS at its start; write a length, angle or distance a call or stage carries as a parameter with braces, for a value the Memory already states; rename a role or parameter where its name carries a fact of this one scene (an instance's colour, a side, a keypoint id) with `rename_param` (it keeps the value, and a spec's name is changed only that way); cite every parameter a stage uses with braces; fold a stage that only perceives into the stage that acts on what it finds (a spec of a part, one whose `part` is not `whole`, needs a call that registers that part, `register_part` or `locate_part` with `part=<name>`, before the call that uses it: keep that call, in the acting stage, never drop it); and shorten prose that repeats a parameter or records how one episode went.
   You cannot define, edit or remove a spec (grasp, place, hinge, path): they are the demonstration's fits and stay as fitted; pass each to the tool argument that takes its kind (the tool list shows it, `grasp:grasp_spec`). Never define a number the Memory does not already state, and never add a step: where a call cites a quantity the demonstration showed that the Memory holds no parameter for, say what the step does in words (the tool's own defaults do it) rather than inventing a value. Each line of a stage (goal, arm, call, done) is at most 500 characters: say less where a call runs longer.
3. Keep what the workflow does and in which order: every step the demonstration takes stays, with the specs that carry it out. Write relative values and strategies, never positions, seeds or facts of this one scene. The Memory never names a left or right arm.
4. Where a finding asks for something you cannot do with the edits you have, or that the Memory already satisfies, leave it and say so. Call `finish` with one line per finding: what you changed, or why nothing.

# The Actor's tools, for the workflow's calls

{{tools}}

# Conventions

{{conventions}}

© ArcheOne-AI · Apache-2.0 · ArcheOne-AI/RoboScript

Similar prompts

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

From the same set13

The whole set →
library The library prompt for Claude Code serves as a repository for task memories and operational workflows. It enables the AI to recall and apply previously successful strategies to current coding tasks. GP ChatGPT ★ 336repo stars reviewer-consolidation reviewer-consolidation is a Claude Code prompt that checks proposed merges, removals, and rewrites of a robot agent’s memory entries. It returns a decision for each proposal and ends with a brief count and rationale. GP ChatGPT ★ 336repo stars curator curator is a Claude Code prompt that triages robot memory patches and promotes cross-task lessons into a shared GLOBAL patch document. GP ChatGPT ★ 336repo stars curator-consolidation The curator-consolidation prompt for Claude Code streamlines agent Task Memory entries during reflection phases. It merges duplicates, retires redundant entries, and fixes linting errors. GP ChatGPT ★ 336repo stars criteria criteria is a Claude Code prompt that configures a Reviser agent for RoboScript. It derives task completion criteria from demonstration keyframes and perception measurements. GP ChatGPT ★ 336repo stars actor actor is a Claude Code prompt that controls a robot through sensing and physical-action tools. It ends the task with finish. GP ChatGPT ★ 336repo stars reviser reviser is a Claude Code prompt that diagnoses a failed physical task and updates Task Memory for the next attempt. It checks the recorded run. GP ChatGPT ★ 336repo stars reviewer reviewer is a Claude Code prompt that audits proposed patch entries for a robot agent's task memory. Evaluates episode logs, keyframes, and arm actions before applying fixes. GP ChatGPT ★ 336repo stars

Project sponsors

Companies that keep this analytics open