clean — Claude Code prompt for robot control
The clean Claude Code prompt controls a robot arm through motion and observation commands. It guides instruction execution and checks results between actions.
MIT ★ 488 updated 2026-11-15
.claude/commands/clean.mdWhat clean does
The prompt organizes work with move, hold, capture_scene, and finish: inspect observations, issue physical actions, then check their results. A fresh camera view can be requested without advancing control steps. Image files are read from observation.cameras[name].image_path; original calibration data is available through observation.artifact_ref.
After a motion, inspect arm state, gripper feedback, and the stop reason. An uncertain physical request must not be repeated, and an image publication error does not reverse an acknowledged motion. The agent receives no depth data. Before finish, verify object positions and orientations; if the instruction calls for returning the arms, check their initial positions and orientations too.
What it helps with
- sequence arm motion and gripper actions
- request a camera view without advancing control
- check whether an object remains held
- verify task conditions before finishing
Example prompts for the agent
- Use
cleanto carry out this instruction and verify the result before finishing. - Move the arm as instructed, inspect gripper feedback, then continue only after checking the state.
- Capture another scene view and finish only after verifying the required conditions.
How to install clean
Manually: put the files in place
.claude/commands/clean.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about clean
How do I install clean in Claude Code?
Save the prompt file at .claude/commands/clean.md.
What does clean do?
It structures robot-arm control, image capture, and result checks before the task is marked complete.
Which commands does clean use?
It uses move, hold, capture_scene, and finish for motion, maintaining state, taking a view, and ending the task.
Source text
clean.md · MIT
Use move, hold, capture_scene and finish to complete the instruction. Physical calls share one exclusive episode queue; order calls by intended submission sequence. Inspect completed feedback before dependent actions. move applies arm motion and any requested gripper opening together. For an in-place opening change, use the current measured position and orientation, converted to the pose format required by the schema, and set the opening inside the corresponding targets entry. Where gripper_opening_m is exposed, zero requests full closure with the native preload; a positive gap requests that opening. Omit opening to retain the accepted drive command during transport; copying the measured gap changes that command. Use separate calls for ordered stages such as close-then-lift or open-then-retreat. Check opening feedback and visible object retention or release before the dependent motion. hold retains measured arm poses and existing gripper commands while consuming control steps; use it for justified settling or continued opening, then inspect the result. Initial input and completed actions include RGB images and measured robot state. Use capture_scene for fresh or additional camera views without advancing control steps, including after image publication failure. Omit cameras for all views. Read observation.artifact_ref for the stored snapshot JSON; it preserves original image calibration. Read each RGB file directly from observation.cameras[name].image_path, including when older inline images have left context. artifact_ref is JSON, not an image; artifact IDs inside it are not file paths. observation.image_cameras gives the attachment order. Do not use dummy motion or hold calls just to obtain observations. Camera matrices belong to the named image and observation.state_version, not a future view. Displayed physical values and matrices use at most five decimal places; use the stored originals for precise geometry. state.arms[name].pose uses the same world six-value pose convention as move inputs. intrinsic_K maps optical coordinates to image pixels; T_world_from_optical maps optical coordinates to world metres. Disabled or unsupported calibration must not be treated as measured geometry. Depth is not provided to the agent. Retain initial arm poses and original object goals separately from current estimates, including in continuation summaries after context compaction. Tool completion and pose arrival do not establish object attachment or task success. Read targets_reached, per-arm opening feedback and stop_reason; a stall does not identify contact or its cause. max_steps limits this move call, not the whole episode. Use state.native_steps, state.ended and remaining_steps to judge episode progress. Continue toward a target only when feedback and observed clearance justify it; after ineffective actions, reassess the grasp, approach, route or arm instead of repeating unchanged commands. artifact_error does not undo acknowledged motion; do not replay a physical action to fetch an image. An execution_uncertain result does not mean zero execution. Do not repeat an uncertain physical request. Keep working while requirements remain unmet and interaction is permitted. Difficulty, partial completion or an estimated shortage of steps does not by itself end the task. Stop at verified completion, native termination, an enforced resource limit, an explicit environment failure preventing interaction, or an operator stop. Native termination does not establish task success. Before finish, verify the required object positions, orientations, support and process conditions using observations and still-valid evidence. If the task requires returning arms, check both their initial positions and orientations. Correct observed mismatches within the remaining budget. Submit finish with status="success" only when all requirements are verified, and summarize the evidence; the environment owns the official outcome.
© Open-RUA · MIT · Open-RUA/uni-robot-agent