
Maintenance
Archives finished Plans.md tasks and trims bloated session logs, old logs and state files
Maintenance is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 3.2K
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Maintenance
Maintenance is a single-purpose skill for tidying up files that have grown cluttered in a Claude Code project. It covers five sub-commands: archiving completed tasks in Plans.md, splitting session-log.md by month, deleting stale files in the logs folder, trimming agent-trace and usage state files, or running all four in sequence. A dry-run flag lists what would change without touching anything, and free-text instructions such as which archives to keep or which day threshold to use are read before the work starts.
Before any destructive step such as moving archives or deleting lines, the skill checks that important decisions have already been promoted to the shared memory files, and suggests running the memory sync first if not. Tasks marked as work in progress are left alone, archives go to a fixed folder under the memory directory, and files over 200 lines are backed up before editing. CLAUDE.md is only reported, never edited automatically.
The skill is triggered by a hook that warns when Plans.md, session-log.md or CLAUDE.md exceed their line limits. It reads a separate reference file for per-target steps and thresholds, and reports line counts and deletion counts before and after each run.
When your agent uses it
File cleanup and archiving. Tidies up bloated Plans.md, session-log.md, old logs, and state files. Trigger: /maintenance, cleanup, archive, organize, split session-log. Do NOT load for: implementation, review, release, new feature development.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (13 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the harness plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add Chachamaru127/claude-code-harness
/plugin install harness@claude-code-harness-marketplaceOr copy only this skill to ~/.claude/skills/maintenance:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/maintenance &&
cp -R "$tmp/opencode/skills/maintenance" ~/.claude/skills/maintenance &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/maintenance inside it instead.
Copy the skill folder to ~/.agents/skills/maintenance to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/maintenance &&
cp -R "$tmp/opencode/skills/maintenance" ~/.agents/skills/maintenance &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/maintenance inside it instead.
Copy the skill folder to ~/.cursor/skills/maintenance to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/maintenance &&
cp -R "$tmp/opencode/skills/maintenance" ~/.cursor/skills/maintenance &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/maintenance inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/Chachamaru127/claude-code-harness.git --path opencode/skills/maintenanceOr copy the folder to ~/.gemini/skills/maintenance yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/maintenance:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/maintenance &&
cp -R "$tmp/opencode/skills/maintenance" ~/.copilot/skills/maintenance &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/maintenance inside it instead.
Get the folder:
git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.gitThen copy claude-code-harness/opencode/skills/maintenance into your agent's skills folder as maintenance. Agents that support SKILL.md read one folder per skill.
What it does
- Plans.md task archiving
- Moves completed tasks out of Plans.md into an archive folder while leaving in-progress items in place.
- Session log splitting
- Splits a long session-log.md into monthly files to keep the active log short.
- Old log cleanup
- Removes log files older than a chosen number of days from the logs folder.
- State file trimming
- Shrinks growing agent trace and harness usage state files.
- Dry-run preview
- Lists the planned changes for any sub-command without executing them.
- Safety checks before deletion
- Confirms memory sync and creates backups before destructive edits.
Good for
- Archive completed tasks from a bloated Plans.md
- Split a long session log into monthly files
- Delete log files older than 30 days
- Preview what a full cleanup would change before running it
- Trim a large agent trace file
Maintenance FAQ
When does the skill trigger?
It triggers on the /maintenance command and on words such as cleanup, archive, organize, or split session-log. It is meant to be skipped for implementation, review, release and new feature work.
Does Maintenance edit CLAUDE.md automatically?
No. For CLAUDE.md it only reports when the file is too long and suggests how to split it.
Will Maintenance touch tasks that are still in progress?
No. Tasks marked as work in progress or as requested by a PM or Cursor user are excluded from archiving.
Where do archived items go?
They are moved to the .claude/memory/archive/ folder. Moving them somewhere else requires asking the user first.
What does Maintenance need to run?
It is a markdown skill with instructions and a reference file, with no scripts of its own. It is designed around Claude Code project files and hooks.
How do I install Maintenance in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/maintenance to use it in all your projects, or to .claude/skills/maintenance in one project. Or install the harness plugin, which includes it: /plugin marketplace add Chachamaru127/claude-code-harness, then /plugin install harness@claude-code-harness-marketplace.
Does Maintenance run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Maintenance?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Maintenance?
The closest alternatives to Maintenance are Config gc, Project retrofit, Harness sync, Spec compact and Ck.
Where this comes from
- Description: from the skill's own SKILL.md.
More from Chachamaru127/claude-code-harness

Guards upstream Claude and Codex update reviews against docs-only feature additions
- Open source
- 3.2K GitHub stars
- Developer tools

Lets an agent drive a browser via the agent-browser CLI for UI checks and forms
- Open source
- 3.2K GitHub stars
- Browser automation

Diagnoses failing CI pipelines and proposes fixes for build and test errors
- Open source
- 3.2K GitHub stars
- Developer tools

Gets a read-only second opinion from Cursor's Composer agent on questions and designs
- Open source
- 3.2K GitHub stars
- Developer tools

Hands one write task to Cursor Composer in an isolated worktree, then reviews
- Open source
- 3.2K GitHub stars
- Developer tools

Gets an advisory second-opinion review of a diff from Cursor Composer, read-only
- Open source
- 3.2K GitHub stars
- Developer tools




