# Maintenance

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

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/maxwell2732/claudecode-research-harness-workflow/tree/main/skills/maintenance
- **Repository:** https://github.com/maxwell2732/claudecode-research-harness-workflow
- **GitHub stars:** 42
- **License:** MIT
- **Skill name:** maintenance
- **Collection:** https://github.com/maxwell2732/claudecode-research-harness-workflow
- **Categories:** [productivity](https://ai-powered.com/categories/productivity)
- **Listing updated:** 2026-12-03

## About

This skill tidies up files that grow over long sessions in a Claude Code project. It covers four targets: archiving completed tasks in Plans.md, splitting session-log.md by month, deleting old files in the logs folder, and trimming the agent trace and harness usage state files. A single run can cover all four, and a dry-run option lists what would change without touching anything.

Before destructive steps such as archiving or deleting lines, the skill asks the agent to confirm that important decisions from Plans.md and the session log have already been promoted to the shared decisions and patterns files, and suggests running the memory sync first if not. Tasks still marked as in progress are left in place. Files over 200 lines get a timestamped backup before editing, and the archive destination is a fixed folder under the memory directory.

It is designed to be triggered by a warning from a post-tool cleanup hook when files exceed line thresholds, or run as routine housekeeping. The workflow is driven by a reference document that holds the per-target thresholds and steps. CLAUDE.md is only reported on, never edited automatically.

## 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/maxwell2732/claudecode-research-harness-workflow/tree/HEAD/skills/maintenance)
- [Asks for: Read, Write, Edit, Grep, Glob, Bash](https://github.com/maxwell2732/claudecode-research-harness-workflow/blob/HEAD/skills/maintenance/SKILL.md)
- [License: MIT](https://github.com/maxwell2732/claudecode-research-harness-workflow/tree/HEAD/skills/maintenance)

## Features

- **Plans.md task archiving:** Moves completed tasks out of Plans.md into an archive folder while leaving in-progress items alone.
- **Monthly session log split:** Splits a long session-log.md into monthly files to keep the active log short.
- **Old log cleanup:** Removes aged files from the Claude logs folder, with a day threshold that can be set in the request.
- **State file trimming:** Shrinks the agent trace and harness usage state files when they become bloated.
- **Safety checks and backups:** Confirms memory sync before destructive edits and backs up larger files first.
- **Dry-run preview:** Reports what would be archived or deleted without making any changes.

## 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
- Trim a bloated agent trace file
- Run a full cleanup of project housekeeping files

## Install

### Claude Code

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

```sh
/plugin marketplace add maxwell2732/claudecode-research-harness-workflow
/plugin install claudecode-research-harness-workflow@claudecode-research-harness-workflow
```

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/maxwell2732/claudecode-research-harness-workflow.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/maintenance &&
cp -R "$tmp/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/maxwell2732/claudecode-research-harness-workflow.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/maintenance &&
cp -R "$tmp/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/maxwell2732/claudecode-research-harness-workflow.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/maintenance &&
cp -R "$tmp/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/maxwell2732/claudecode-research-harness-workflow.git --path 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/maxwell2732/claudecode-research-harness-workflow.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/maintenance &&
cp -R "$tmp/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/maxwell2732/claudecode-research-harness-workflow.git
```

Then copy `claudecode-research-harness-workflow/skills/maintenance` into your agent's skills folder as `maintenance`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Maintenance trigger?

It triggers on the maintenance command and on words such as cleanup, archive, organize or split session-log. It is also suggested when a cleanup hook warns that Plans.md, session-log.md or CLAUDE.md has grown too long.

### Does Maintenance change my files without asking?

Destructive steps such as archiving or deleting lines require a prior memory sync check, and a --dry-run option lists changes without executing them. Files over 200 lines are backed up first. CLAUDE.md is only flagged, never edited automatically.

### Where do archived tasks go?

Archived content is moved to a fixed archive folder inside the memory directory. Moving it elsewhere requires confirmation from the user.

### Which tools does Maintenance use?

The skill is allowed to use Read, Write, Edit, Grep, Glob and Bash.

### 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 claudecode-research-harness-workflow plugin, which includes it: /plugin marketplace add maxwell2732/claudecode-research-harness-workflow, then /plugin install claudecode-research-harness-workflow@claudecode-research-harness-workflow.

### 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 Maintenance, Harness sync, Vault cleanup auditor, Setup matt pocock skills and Retro.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Maintenance](https://ai-powered.com/skills/maintenance-chachamaru127-2): Maintenance is an open-source agent skill for developer tools.
- [Harness sync](https://ai-powered.com/skills/harness-sync-maxwell2732): Harness sync is an open-source agent skill for developer tools.
- [Vault cleanup auditor](https://ai-powered.com/skills/vault-cleanup-auditor): Vault cleanup auditor is an open-source agent skill for security.
- [Setup matt pocock skills](https://ai-powered.com/skills/setup-matt-pocock-skills): Setup matt pocock skills is an open-source agent skill for developer tools.
- [Retro](https://ai-powered.com/skills/retro-mattpocock): Retro is an open-source agent skill for developer tools.
- [Weekly](https://ai-powered.com/skills/weekly): Weekly is an open-source agent skill for productivity.
- [Consolidate](https://ai-powered.com/skills/consolidate-onebrain-ai): Consolidate is an open-source agent skill for knowledge and memory.
- [Decomposition](https://ai-powered.com/skills/decomposition): Decomposition is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/maintenance-maxwell2732
