Skip to content
Back to skills

Archive

ASecurity

Archive an inactive project, client, partner, or internal project from sources/ into archives/. Confirms inactivity, physically moves the folder (git mv preserves history), updates the incoming references (other projects that point to the archived one), regenerates the static indexes, and runs Basic Memory reindex. Policy: physical move WITHOUT a redundant status. Use when a project is marked `status: done` or `status: cancelled` for 6+ months, or on an explicit decision to archive.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 28, 2026
ai-agentsbashgit

Works with

  • cli

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned November 28, 2026

npx -y skills add philippe-desplats/second-brain --skill archive --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Archive?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Archive
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/philippe-desplats-archive/badge)](https://www.skillsdirectory.com/skills/philippe-desplats-archive)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: archive
description: "Archive an inactive project, client, partner, or internal project from sources/ into archives/. Confirms inactivity, physically moves the folder (git mv preserves history), updates the incoming references (other projects that point to the archived one), regenerates the static indexes, and runs Basic Memory reindex. Policy: physical move WITHOUT a redundant status. Use when a project is marked `status: done` or `status: cancelled` for 6+ months, or on an explicit decision to archive."
allowed-tools: Bash Read Write Edit Glob Grep AskUserQuestion TaskCreate TaskUpdate
---

## Arguments

`/archive <slug-or-path> [-t client|partner|internal|personal] [-f force] [-a auto] [--dry-run]`

Flags, input and examples are detailed below.

Questions to the owner follow `AGENTS.md`, Asking the owner.

<objective>
Move an inactive project from `sources/{type}/{slug}/` into `archives/{type}/{slug}/`, without breaking references. Policy: physical move without a redundant status. The indexes filter automatically, since both the Bases views and the generation script scope on `sources/` and ignore the archives.

Out of scope: archiving `.claude/`, `basic-memory/`, `atlas/`, `knowledge/` (non-project zones). Out of scope: archiving an isolated note (use an `archive/` subfolder within the project for obsolete internal artifacts).
</objective>

<quick_start>

```bash
/archive legacy-migration                      # archive sources/internal/legacy-migration/
/archive globex -t client                      # force the type, archive sources/clients/globex/
/archive hooli/partner-portal -t partner       # archive a specific project of a partner
/archive legacy-migration --dry-run            # simulate, show what would happen
/archive legacy-migration -a                   # auto, skip confirmations
/archive legacy-migration -f                   # force, ignore the 6-month inactivity check
```

</quick_start>

<flags>

| Flag | Long | Description |
|------|------|-------------|
| `-t` | `--type` | Entity type: `client|partner|internal|personal`. Auto-deduced if absent |
| `-f` | `--force` | Skip the "inactive for 6 months" check, archive directly |
| `-a` | `--auto` | Skip user confirmations |
| `--dry-run` | no value | Show what would be done without executing |

</flags>

<workflow>
1. **Init** -> Parse args, resolve the source path, deduce the type
2. **Confirm** -> Present the state (last activity, incoming refs), ask for validation
3. **Move** -> git mv into archives/, update the parent AGENTS.md if applicable
4. **Reindex** -> Regenerate the static indexes, run Basic Memory reindex
</workflow>

<step_files>

| Step | File | Purpose |
|------|------|---------|
| 00 | `steps/step-00-init.md` | Parse args, resolve `{source_path}`, `{target_path}`, `{type}` |
| 01 | `steps/step-01-confirm.md` | Audit last activity, incoming references, user confirmation |
| 02 | `steps/step-02-move.md` | git mv, update the parent AGENTS.md, update references |
| 03 | `steps/step-03-reindex.md` | generate_indexes.py + bm reindex + check_double_frontmatter |

</step_files>

<state_variables>

| Variable | Type | Set by |
|----------|------|--------|
| `{slug}` | string | step-00 |
| `{type}` | enum (`client\|partner\|internal\|personal`) | step-00 |
| `{source_path}` | string | step-00 (sources/{type}/{slug}/ or sources/{type}/{slug}/{project}/) |
| `{target_path}` | string | step-00 (archives/{type}/{slug}/) |
| `{is_project_scope}` | boolean | step-00 (true if slug = "X/Y", we archive only project Y) |
| `{last_activity_date}` | date | step-01 |
| `{months_inactive}` | number | step-01 |
| `{incoming_refs}` | list | step-01 (other files that point to the path) |
| `{dry_run}` | boolean | step-00 |
| `{auto_mode}` | boolean | step-00 |
| `{force_mode}` | boolean | step-00 |

</state_variables>

<execution_rules>
- **Always git mv** (not cp+rm), to preserve history
- **Always --dry-run first** if the user is unsure (borderline case)
- **6 months of inactivity** = default check, override with `-f`
- **Incoming refs**: if > 5 other notes point to this path, alert explicitly
- **Parent AGENTS.md**: if archiving a client project (not the whole client), update its AGENTS.md to mention the archiving
- **No auto update of wiki-links**: Obsidian wiki-links update automatically on rename. In CLI, older textual paths (non-wikilinks) may keep pointing to `sources/...` historically; git history lets you retrieve them
- **`bm reindex`** mandatory after writing (if Basic Memory is installed)
- **Refuse if target already exists**: `archives/{type}/{slug}/` already exists -> ask the user (merge, overwrite, abandon)
</execution_rules>

<entry_point>
**FIRST ACTION:** Load `steps/step-00-init.md`
</entry_point>

Files in this skill

  • SKILL.md4.7 KB
  • steps/step-00-init.md2.9 KB
  • steps/step-01-confirm.md2.8 KB
  • steps/step-02-move.md3.2 KB
  • steps/step-03-reindex.md3.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.