# Defrag

Weekly vault defragmentation.

- Repository: https://github.com/gnekt/My-Brain-Is-Full-Crew (3924 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-06-27
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add gnekt/My-Brain-Is-Full-Crew --skill defrag -g -a claude-code -y`
Codex: `npx skills add gnekt/My-Brain-Is-Full-Crew --skill defrag -g -a codex -y`
Cursor: `npx skills add gnekt/My-Brain-Is-Full-Crew --skill defrag -g -a cursor -y`
Gemini CLI: `npx skills add gnekt/My-Brain-Is-Full-Crew --skill defrag -g -a gemini-cli -y`

## Description

Weekly vault defragmentation. Runs a 5-phase structural audit: inbox hygiene, area completeness, project archival, MOC refresh, tag consistency, structure evolution, and generates a report. Triggers: EN: "defragment the vault", "reorganize the vault", "structural maintenance", "vault defrag", "weekly defrag". IT: "deframmenta il vault", "riorganizza il vault", "manutenzione strutturale", "defrag settimanale". FR: "defragmenter le vault", "reorganiser le vault". ES: "desfragmentar el vault", "reorganizar el vault". DE: "Vault defragmentieren", "Vault reorganisieren". PT: "desfragmentar o vault", "reorganizar o vault".

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

## Vault Path Resolution

Read `Meta/vault-map.md` (always this literal path) to resolve folder paths. Parse the YAML frontmatter: each key is a role, each value is the actual folder path. Substitute **only** the vault-role tokens listed in the table below, do NOT substitute other `{{...}}` patterns (like `{{date}}`, `{{Name}}`, `{{YYYY}}`, `{{ISO timestamp}}`, `{{today}}`, `{{Area Name}}`, etc.), which are template placeholders.

If vault-map.md is absent: warn the user once, "No vault-map.md found, using default paths", then use these defaults:

| Token | Default |
|-------|---------|
| `{{inbox}}` | `00-Inbox` |
| `{{projects}}` | `01-Projects` |
| `{{areas}}` | `02-Areas` |
| `{{resources}}` | `03-Resources` |
| `{{archive}}` | `04-Archive` |
| `{{templates}}` | `Templates` |
| `{{moc}}` | `MOC` |
| `{{meta}}` | `Meta` |

If vault-map.md is present but a role is missing: warn the user, "vault-map.md does not define [role]. What folder should I use?", and wait for their answer before proceeding.

---

# Weekly Vault Defragmentation

You are executing the Architect's weekly vault defragmentation workflow. This is a structural operation, not a quality audit (that is the Librarian's job). You scan the vault's organizational skeleton, fix structural gaps, evolve the layout, and produce a comprehensive report.

## Golden Rule: Language

**Always respond to the user in their language.** Match the language the user writes in. This skill file is written in English for universality, but your output adapts to the user.

---

## Post-it Protocol

### At the START of execution

Read `{{meta}}/states/architect.md` (if it exists). If it contains an active defrag flow, **resume from the recorded phase**, do NOT restart from Phase 1.

### At the END of execution

Write (or overwrite) `{{meta}}/states/architect.md` with:

```markdown
---
agent: architect
last-run: "{{ISO timestamp}}"
---

## Post-it

The rest: https://github.com/gnekt/My-Brain-Is-Full-Crew/blob/HEAD/skills/defrag/SKILL.md
