archive-increments

Intelligent increment archiving expert that analyzes age, status, and activity to recommend archiving. Use when workspace has too many increments, cleaning up completed work, or organizing the _archive folder. Follows the 10-10-10 rule for workspace organization.

16 stars

Best use case

archive-increments is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Intelligent increment archiving expert that analyzes age, status, and activity to recommend archiving. Use when workspace has too many increments, cleaning up completed work, or organizing the _archive folder. Follows the 10-10-10 rule for workspace organization.

Teams using archive-increments should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/archive-increments/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/cli-automation/archive-increments/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/archive-increments/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How archive-increments Compares

Feature / Agentarchive-incrementsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Intelligent increment archiving expert that analyzes age, status, and activity to recommend archiving. Use when workspace has too many increments, cleaning up completed work, or organizing the _archive folder. Follows the 10-10-10 rule for workspace organization.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Increment Archive Manager

Expert at keeping the `.specweave/increments/` folder clean and organized through intelligent archiving.

## Core Knowledge

### Archiving Philosophy

**The 10-10-10 Rule**:
- **10 Active**: Keep last 10 increments readily accessible
- **10 Days**: Archive increments inactive for >10 days
- **10 Seconds**: Archive operation should take <10 seconds

### Archive Structure

```
.specweave/increments/
├── 0023-0032 (Active)          ← Last 10 increments
├── _archive/                   ← Completed/old increments
│   ├── 0001-0022              ← Historical increments
│   └── 0029                   ← Abandoned experiments
└── _abandoned/                 ← Failed/obsolete increments
```

### Smart Detection Rules

#### Never Archive
- **Active increments** (status: active)
- **Paused increments** (status: paused) - may resume
- **Recent increments** (last 10 by default)
- **Increments with open GitHub/JIRA/ADO issues**
- **Increments with uncommitted changes**

#### Always Archive
- **Completed >60 days ago**
- **No activity >30 days** (and status: completed)
- **Superseded increments** (replaced by newer version)
- **Failed experiments** (after confirmation)

#### Smart Grouping
- **Release groups**: Archive all v0.7.x after v0.8.0 ships
- **Feature groups**: Archive related increments together
- **Time-based**: Quarter/month-based archiving

## Usage Patterns

### Keep Workspace Clean
```bash
# Interactive archiving - prompts for confirmation
/sw:archive-increments

# Keep only last 5 increments
/sw:archive-increments --keep-last 5

# Archive all completed increments
/sw:archive-increments --archive-completed
```

### Prepare for Release
```bash
# Archive all pre-release increments
/sw:archive-increments --pattern "v0.7"

# Archive by date range
/sw:archive-increments --older-than 30d
```

### Restore from Archive
```bash
# List archived increments
/sw:archive-increments --list-archived

# Restore specific increment
/sw:archive-increments --restore 0015
```

## Configuration

### Default Settings
```json
{
  "archiving": {
    "keepLast": 10,              // Keep last 10 increments
    "autoArchive": false,        // Manual by default
    "archiveAfterDays": 60,      // Archive after 60 days
    "preserveActive": true,      // Never archive active
    "archiveCompleted": false    // Manual control
  }
}
```

### Aggressive Cleanup
```json
{
  "archiving": {
    "keepLast": 5,               // Minimal workspace
    "autoArchive": true,         // Auto-archive on completion
    "archiveAfterDays": 14,      // Archive after 2 weeks
    "archiveCompleted": true     // Auto-archive completed
  }
}
```

## Archive Statistics

### Current State Analysis
When asked about archiving, I analyze:
- Number of active increments
- Age of oldest active increment
- Total size of increments folder
- Number of completed increments
- External sync status

### Recommendations
Based on analysis, I suggest:
- **Overcrowded** (>20 active): Archive all but last 10
- **Stale** (many >30 days old): Archive by age
- **Post-release**: Archive previous version increments
- **Large size** (>100MB): Archive largest completed increments

## Safety Features

### Pre-Archive Checks
1. **Metadata validation**: Check increment status
2. **External sync**: Verify no open issues
3. **Git status**: Check for uncommitted changes
4. **Dependencies**: Check if referenced by active increments
5. **User confirmation**: Show what will be archived

### Archive Operations
- **Atomic moves**: Use fs.move with overwrite protection
- **Preserve structure**: Maintain full increment structure
- **Update references**: Fix links in living docs
- **Reversible**: Easy restore from archive
- **Audit trail**: Log all archive operations

## Smart Suggestions

### When to Archive
- **After major release**: Archive all pre-release increments
- **Quarterly cleanup**: Archive increments >3 months old
- **Before new project phase**: Archive previous phase work
- **Low disk space**: Archive largest completed increments

### Archive Patterns
- **By version**: `--pattern "v0.7"` (all v0.7.x increments)
- **By feature**: `--pattern "auth|login"` (auth-related)
- **By date**: `--older-than 30d` (time-based)
- **By status**: `--archive-completed` (all completed)

## Integration Points

### Status Line
- Shows "23-32 (10 active, 22 archived)" format
- Warns when >15 active increments
- Suggests archiving when appropriate

### Increment Commands
- `/sw:done` can trigger auto-archive
- `/sw:status` shows archive statistics
- `/sw:next` considers archived increments

### Living Docs
- Archive preserves living docs references
- Restore updates living docs links
- Archive included in docs statistics

## Best Practices

1. **Regular Cleanup**: Archive monthly or after releases
2. **Keep Recent**: Always keep last 5-10 increments
3. **Preserve Active**: Never force-archive active work
4. **Group Related**: Archive feature groups together
5. **Document Reasons**: Add archive notes for context

## Quick Reference

```bash
# Archive old increments
/sw:archive-increments --older-than 30d

# Keep workspace minimal
/sw:archive-increments --keep-last 5

# Archive after release
/sw:archive-increments --pattern "pre-release"

# Restore for reference
/sw:archive-increments --restore 0015

# Check archive stats
/sw:archive-increments --stats
```
## Project-Specific Learnings

**Before starting work, check for project-specific learnings:**

```bash
# Check if skill memory exists for this skill
cat .specweave/skill-memories/archive-increments.md 2>/dev/null || echo "No project learnings yet"
```

Project learnings are automatically captured by the reflection system when corrections or patterns are identified during development. These learnings help you understand project-specific conventions and past decisions.

Related Skills

github-archive

16
from diegosouzapw/awesome-omni-skill

Investigate GitHub security incidents using tamper-proof GitHub Archive data via BigQuery. Use when verifying repository activity claims, recovering deleted PRs/branches/tags/repos, attributing actions to actors, or reconstructing attack timelines. Provides immutable forensic evidence of all public GitHub events since 2011.

archive

16
from diegosouzapw/awesome-omni-skill

Archive completed task/spec work to ./.gtd/archive/

archive-work

16
from diegosouzapw/awesome-omni-skill

Archive completed scratchpads and session logs to project history. Invoke when user says "archive this work", "clean up scratchpad", "archive scratchpad", or after PR is merged.

archive-ticket

16
from diegosouzapw/awesome-omni-skill

Archive completed tickets by moving them to .archived/

archive-project

16
from diegosouzapw/awesome-omni-skill

Archive a completed project by creating an AI-generated summary in Knowledge/, storing the git commit hash for reference, and deleting the original project file. Use when user says a project is "done", "complete", "finished", or wants to "archive" it.

archive-plan

16
from diegosouzapw/awesome-omni-skill

Archive completed plan documents by moving them to the plans/archived folder. Use when a plan has been fully implemented, all to-do items are completed, or when the user requests to archive a plan.

archive-reprocessing

16
from diegosouzapw/awesome-omni-skill

Flexible, version-tracked reprocessing system for archive transformations using design patterns (Strategy, Template Method, Observer). Activate when working with tools/scripts/lib/, reprocessing scripts, transform versions, archive transformations, metadata transformers, or incremental processing workflows.

archive-workflow

16
from diegosouzapw/awesome-omni-skill

Archives completed FABER workflow state and artifacts to cloud storage for historical tracking and analysis

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

obsidian-daily

16
from diegosouzapw/awesome-omni-skill

Manage Obsidian Daily Notes via obsidian-cli. Create and open daily notes, append entries (journals, logs, tasks, links), read past notes by date, and search vault content. Handles relative dates like "yesterday", "last Friday", "3 days ago".

obsidian-additions

16
from diegosouzapw/awesome-omni-skill

Create supplementary materials attached to existing notes: experiments, meetings, reports, logs, conspectuses, practice sessions, annotations, AI outputs, links collections. Two-step process: (1) create aggregator space, (2) create concrete addition in base/additions/. INVOKE when user wants to attach any supplementary material to an existing note. Triggers: "addition", "create addition", "experiment", "meeting notes", "report", "conspectus", "log", "practice", "annotations", "links", "link collection", "аддишн", "конспект", "встреча", "отчёт", "эксперимент", "практика", "аннотации", "ссылки", "добавь к заметке".

observe

16
from diegosouzapw/awesome-omni-skill

Query and manage Observe using the Observe CLI. Use when the user wants to run OPAL queries, list datasets, manage objects, or interact with their Observe tenant from the command line.