Sweeps, inbox, sync, archive and weekly upkeep. Use when the user says "sweep my sources", "process inbox", "sync", "run maintenance", "archive sweep", "consolidate memory".
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Maintain?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ajayjohn-maintain)
---
name: maintain
description: 'Sweeps, inbox, sync, archive and weekly upkeep. Use when the user says "sweep my sources", "process inbox", "sync", "run maintenance", "archive sweep", "consolidate memory".'
user-invocable: true
triggers:
- "sweep my sources"
- "run the sweep"
- "check my sources"
- "run maintenance"
- "housekeeping"
- "process inbox"
- "check inbox"
- "sync"
- "check for gaps"
- "archive sweep"
- "clean up workspace"
- "list worktrees"
- "consolidate memory"
- "merge duplicate notes"
- "migrate memory"
help:
purpose: |-
Keep TARS useful over time by sweeping connected sources, processing
intake, detecting context gaps, comparing the workspace with external
systems, proposing archive candidates, and surfacing harness review items.
use_cases:
- "Sweep my sources"
- "Process my inbox"
- "Check for gaps"
- "Run maintenance"
scope: sweep,maintenance,inbox,sync,archive,gaps,weekly,harness,worktrees,consolidate,migrate-memory
---
# Maintain
<!-- tars:preflight -->
**Extension pre-flight (required).** Before this workflow reads sources, calls a provider, or briefs a subagent: call `mcp__tars_vault__resolve_extension` with the skill and mode, then read every id in `load` to the end with `mcp__tars_vault__read_extension` (page with `offset` until `complete` is true) and follow it. Resolve providers with `mcp__tars_vault__resolve_capability` and branch on `resolution` (`resolved`, `unresolved`, `ambiguous`). A subagent brief either includes the loaded extension instructions or states that the main agent makes all provider calls.
<!-- tars:preflight:end -->
Maintenance is the time-and-drift control plane: it keeps the workspace
current without surprising the owner. The outcome of every mode is the same
shape: what was applied (silent tier only), what is staged or held for the
owner, and a status line. Prefer natural-language workflow names in output;
slash commands are shortcuts.
## Modes
| Intent | Mode | Reference |
|---|---|---|
| Collect new mail, messages, recordings, sessions and inbox files; learn and stage proposals | sweep | `references/sweep.md` |
| Process pending files now (the sweep handles them unattended) | inbox | `references/inbox.md` |
| Find missing context: unprocessed meetings, inbox backlog, disuse | gaps | `references/sync.md` |
| Compare the workspace with external systems | sync | `references/sync.md` |
| Propose lifecycle archival | archive | `references/archive.md` |
| Weekly review queue (the `weekly-maintenance` scheduled job) | weekly | `references/weekly.md` |
| Inspect git worktree clutter | worktrees | `references/worktrees.md` |
| Merge notes that cover the same subject | consolidate | `references/consolidate.md` |
| Convert log-style memory notes to the fixed templates | migrate-memory | `references/consolidate.md` |
"Run maintenance" or "housekeeping" with no mode: archive, then sync (calendar
gaps and task drift only), then the inbox count. Attended, offer to process a
non-empty inbox; unattended, report the count and leave the files for the
sweep.
## Attended and unattended
Every mode that can run without a person has two variants. Detect unattended
only as core → "Unattended runs" defines it (a scheduled-run prompt or an
explicit "unattended"); never guess it from silence.
- **Unattended**: ask nothing. Apply silent-tier facts, stage proposals, hold
everything else, and end with status (complete, partial, blocked),
assumptions and open questions.
- **Attended**: do the same work, then show held items and proposals as one
numbered review (`skills/core/references/review-gates.md`). One review per
run, not a question per item.
## Gotchas
- Never delete files. Inbox items move to `inbox/processed/`; archive moves to
`archive/`; merged notes go to `archive/merged/`.
- Never auto-apply archive, task, external-system or harness changes. Memory
follows the autonomy tiers (core → "Review gates and autonomy tiers").
- Facts are applied or held by tier whatever the proposal caps; a cap never
turns a fact into a held item.
- Never mark an unreadable binary as processed: it stays in `inbox/pending/`
with a companion note asking for a text copy.
- Archive is active-set management, not punishment for old files. Pinned
notes, decisions, org context, focus areas and anything an open task or a
recent note links to stay put; `archive_note` enforces the link and task
guardrails server-side.
- Drift with external systems is surfaced, never fixed here: task changes go
through the tasks skill after the owner decides.
- Initiatives are background context; no mode checks or reports on them.
Stale tasks and focus areas belong only in the weekly briefing's "still
relevant?" batch (`freshness`); nothing is closed automatically.
- Scheduling is not maintain's job. Jobs and times live only in the `schedule`
setting, and welcome registers them with `scheduled_jobs`.
- Per-user limits (read budgets, caps, staleness days) are settings read with
`read_setting`, never constants.
- consolidate and migrate-memory take a `snapshot_notes` first, work one
cluster per session, and write nothing without approval. They are
attended-only: unattended, report the candidates and stop.
- Heavy scans belong here, not in SessionStart.