# Maintenance

> Maintenance is an open-source agent skill for developer tools. Archives finished Plans.md tasks and trims bloated session logs, old logs and state files. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/Chachamaru127/claude-code-harness/tree/main/opencode/skills/maintenance
- **Repository:** https://github.com/chachamaru127/claude-code-harness
- **GitHub stars:** 3,232
- **License:** MIT
- **Skill name:** maintenance
- **Collection:** https://github.com/Chachamaru127/claude-code-harness
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/Chachamaru127/claude-code-harness/tree/HEAD/opencode/skills/maintenance)
- [License: MIT](https://github.com/Chachamaru127/claude-code-harness/tree/HEAD/opencode/skills/maintenance)

## Features

- **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

## Install

### Claude Code

This skill ships in the `harness` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add Chachamaru127/claude-code-harness
/plugin install harness@claude-code-harness-marketplace
```

Or copy only this skill to `~/.claude/skills/maintenance`:

```sh
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.

### Codex

Copy the skill folder to `~/.agents/skills/maintenance` to use it in every repository:

```sh
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.

### Cursor

Copy the skill folder to `~/.cursor/skills/maintenance` to use it in every project:

```sh
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.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/Chachamaru127/claude-code-harness.git --path opencode/skills/maintenance
```

Or copy the folder to `~/.gemini/skills/maintenance` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/maintenance`:

```sh
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.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/Chachamaru127/claude-code-harness.git
```

Then 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.

## 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.

## Alternatives

- [Config gc](https://ai-powered.com/skills/config-gc): Config gc is an open-source agent skill for developer tools.
- [Project retrofit](https://ai-powered.com/skills/project-retrofit): Project retrofit is an open-source agent skill for developer tools.
- [Harness sync](https://ai-powered.com/skills/harness-sync-chachamaru127): Harness sync is an open-source agent skill for developer tools.
- [Spec compact](https://ai-powered.com/skills/spec-compact): Spec compact is an open-source agent skill for developer tools.
- [Ck](https://ai-powered.com/skills/ck): Ck is an open-source agent skill for developer tools.
- [Elephant](https://ai-powered.com/skills/elephant): Elephant is an open-source agent skill for developer tools.
- [Code simplifier](https://ai-powered.com/skills/code-simplifier): Code simplifier is an open-source agent skill for developer tools.
- [Agentic os](https://ai-powered.com/skills/agentic-os-smartworldarafath): Agentic os is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/maintenance-chachamaru127-2
