Handles periodic housekeeping tasks: clears stale state files, purges plugin cache, removes orphaned git worktrees, and manages session lifecycle commands.
Ships in harness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Periodic housekeeping skill for Harness projects. Handles stale state file removal, plugin cache purging, and orphaned worktree cleanup.
| Subcommand | What It Does |
|---|---|
--clear-state | Remove stale files from .claude/state/ |
--purge-cache | Clear the plugin cache from ~/.claude/plugins/cache/ |
--clean-worktrees | Remove git worktrees with no associated branch |
--all | Run all of the above in sequence |
Run /maintenance when any of the following apply:
.claude/state/ contains loop-active.json but no loop is running.claude/state/contracts/git worktree list shows entries for branches that have been deletedScans .claude/state/ and removes files that are safe to delete:
loop-active.json — only if no Breezing/harness-work loop is currently running*.sprint-contract.json) for tasks marked cc:Done in Plans.mdreview-result.json files older than 7 daysWill not touch: Active loop state, pending fix proposals, or the contracts/ directory itself.
Removes the plugin cache directory at ~/.claude/plugins/cache/. The cache is rebuilt
automatically on next plugin load. Use after a major Harness version upgrade if stale
cached files are causing unexpected behavior.
Lists all git worktrees (git worktree list) and removes entries where the associated
branch no longer exists in the repository.
Safe: uses git worktree remove --force only on worktrees confirmed to have no live branch.
--purge-cache) require explicit confirmationSee ${CLAUDE_SKILL_DIR}/references/cleanup.md
for step-by-step execution procedures for each subcommand.
Consolidates session-related subcommands: listing, inbox checks, and broadcasting.
| User Input | Behavior |
|---|---|
session list | Show all active Claude Code sessions in the current project |
session inbox | Check for incoming messages from other sessions |
session broadcast "message" | Send a message to all active sessions |
session listShows all active Claude Code sessions in the current project.
Active Sessions
| Session ID | Status | Last Activity |
|------------|--------|---------------|
| abc123 | active | 2 min ago |
| def456 | idle | 15 min ago |
session inboxChecks for incoming messages from other sessions.
Session Inbox
| From | Time | Message |
|--------|---------|---------------------|
| abc123 | 5m ago | "Ready for review" |
session broadcast "message"Sends a message to all active sessions.
For memory optimization, session lifecycle details, and state transitions, see:
harness-plan archive — Archive completed phases from Plans.md (not the same as maintenance)harness-work — Implementation; run maintenance before long breezing sessionsWhat SKILL.md sets; muted values are Claude Code's defaults
clear state, purge cache, clean worktrees, housekeeping, maintenance, cleanup, list sessions, inbox check, broadcast message, session lifecycle
sonnet/harness:maintenance [--clear-state|--purge-cache|--clean-worktrees|--all|session list|session inbox|session broadcast]from harness
npx claudepluginhub tim-hub/powerball-harness --plugin harness6 skills in this plugin
/harness-planPlans and tracks tasks in .claude/harness/plans.json. Use when creating plans, adding tasks, updating markers, checking progress, or brainstorming an idea into tasks./harness-ralph-loopRuns iterate-until-pass loops with ralph-worker agents in a worktree. Use when running [ralph]-marked tasks or looping until verify passes./harness-reviewMulti-angle code and plan review with security, scope, and UI profiles. Use when reviewing code, plans, PRs, or running pre-merge quality gates./harness-setupInitializes and configures Harness in a project — CI, memory, duo workflow, Codex. Use when setting up a new project or adding Harness configuration./harness-workExecutes plans.json tasks — solo, parallel, or breezing team mode. Use when implementing tasks or running the work loop.Other plugins' skills for the same job