code-cleanup

Orchestrates code formatting and comment verification, then delegates git pushes to a peer agent.

2|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/witwave-ai/witwave --skill code-cleanup-witwave-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: code-cleanup
Source: https://github.com/witwave-ai/witwave/tree/main/.agents/self/nova/.claude/skills/code-cleanup
Command: npx skills add https://github.com/witwave-ai/witwave --skill code-cleanup-witwave-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running routine code hygiene across a multi-language repository requires coordinating formatters, semantic comment checks, per-language commits, and publishing — a multi-step process that is easy to do inconsistently or to leave half-finished. This Skill provides a single entry point that sequences the whole sweep and enforces a clean division of labor between agents. ## Core Features & Use Cases - Tiered orchestration: Runs Tier 1 (code-format) for mechanical reformatting with one commit per language, then Tier 2 (code-verify) for read-only comment-vs-code mismatch checks logged to memory. - Safe pre-flight gates: Verifies the source tree exists and is clean before touching anything, pins git identity, and captures the pre-cleanup SHA for accurate reporting. - Explicit push delegation: Hands the publish step to the iris agent via call-peer, with load-bearing status semantics (completed-and-pushed, completed-locally-push-failed, completed-no-commits, stood-down) so downstream schedulers can trust the outcome. - Use Case: After a major refactor, tell the agent to do a code-hygiene sweep; it reformats each language, commits the fixes, logs comment mismatches, and has iris push the batch to origin. ## Quick Start Ask the agent to run a code cleanup sweep on the repository and report what was reformatted, verified, and pushed.

Frequently Asked Questions about code-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run an automated code cleanup across multiple languages?▼

Invoke the code-cleanup skill, which runs code-format for per-language reformatting and lint auto-fixes, then code-verify for comment-vs-code checks. Each language's fixes are committed separately and the batch is delegated to a peer agent for pushing.

How does the skill handle pushing commits to the remote repository?▼

The skill never pushes directly. It delegates the push to the iris agent via a call-peer request containing the commit range and subjects, then reports iris's success or verbatim failure in its final status.

What happens if the working tree has uncommitted changes before cleanup?▼

The skill stops immediately and logs the finding to deferred-findings memory. It refuses to stash or reset a dirty tree, since uncommitted changes may belong to another agent or a previous run.

Does code-cleanup also write missing code comments or documentation?▼

No. Authoring missing comments is handled by the separate code-document skill, which runs on its own cadence with its own grounding discipline. code-cleanup only covers formatting and comment verification.

What happens if the push delegation to the peer agent fails?▼

The skill returns a completed-locally-push-failed status with the verbatim error from iris or the call-peer layer. Local commits remain in the workspace, and the next cleanup run re-detects them and retries the delegation.