/gaia-obsidian:defragfrom gaia-obsidian
Runs a 5-phase structural audit of an Obsidian vault: inbox hygiene, area completeness, project archival, MOC refresh, tag consistency, and structure evolution. Generates a report. Useful for weekly vault maintenance.
Ships in gaia-obsidian. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
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.
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.
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.
Write (or overwrite) {{meta}}/states/architect.md with:
---
agent: architect
last-run: "{{ISO timestamp}}"
---
## Post-it
### Last operation: defrag
### Summary: {{brief summary of what was done}}
### Issues detected: {{any issues that need follow-up, with suggested agents}}
Max 30 lines in the Post-it body. If you need more, summarize.
When the user triggers a defrag, execute all 5 phases in order.
Scan all files in {{inbox}}/ — anything older than 48 hours that is still in Inbox is a failure. Signal the Sorter via ### Suggested next agent to triage it, or file it yourself if the destination is obvious.
Scan {{areas}}/ — for each area:
_index.md? If not, create it.{{moc}}/? If not, create it.Scan {{projects}}/ — are there completed projects that should be archived to {{archive}}/?
Scan {{resources}}/ — are there resources that now belong to a specific area? Move them.
Scan {{moc}}/ — is the Master Index up to date? Are all area MOCs linked? Are there MOCs with no corresponding area (orphan MOCs)?
Scan {{templates}}/ — are there templates that are never used? Are there note types that lack a template?
{{meta}}/tag-taxonomy.md — either add them to the taxonomy or fix them.#ml and #machine-learning) — consolidate.#area/ prefix).{{moc}}/Index.md) links to every area MOC.{{meta}}/user-profile.md — has the user's situation changed? New jobs, new interests, new goals mentioned in recent notes?{{meta}}/vault-structure.md with all changes.Create a defragmentation report at {{meta}}/health-reports/YYYY-MM-DD — Defrag Report.md:
---
type: report
date: "{{today}}"
tags: [report, defrag, maintenance]
---
# Vault Defragmentation Report — {{date}}
## Summary
- Files moved: {{count}}
- Structures created: {{list}}
- Tags fixed: {{count}}
- MOCs updated: {{list}}
- Inbox items triaged: {{count}}
- Projects archived: {{list}}
## Structural Changes
{{Detailed list of what was created, moved, renamed, or archived}}
## Recommendations
{{Suggestions for the user — new areas to consider, templates to create, etc.}}
## Next Defrag
{{Anything to watch for next week}}
Log the defrag in {{meta}}/agent-log.md.
When Phase 4 detects a new area or sub-area is needed, follow these 7 steps:
{{areas}}/ with appropriate sub-folders._index.md with purpose, active projects, sub-areas, key resources, and a link to its MOC.{{moc}}/{{Area Name}}.md with overview, structure, key notes, active projects, and a link back to the Master Index.{{moc}}/Index.md.{{templates}}/.{{meta}}/vault-structure.md — document the new area, its sub-folders, and its purpose.{{meta}}/tag-taxonomy.md — add area-specific tags (e.g., #area/finance, #budget).For the full detailed procedure with templates and examples, see the Architect agent (agents/architect.md, Section 4).
After completing the defrag, analyze your findings and suggest follow-up agents when appropriate. Include a ### Suggested next agent section at the end of your output for each applicable case:
{{resources}}/ should be moved to a newly created area.### Suggested next agent
- **Agent**: sorter
- **Reason**: {{why this agent should run next}}
- **Context**: {{specific details about what needs attention}}
If during defrag you detect a recurring need that no existing agent covers, include:
### Suggested new agent
- **Need**: {{what capability is missing}}
- **Reason**: {{why no existing agent can handle this}}
- **Suggested role**: {{brief description of what the new agent would do}}
Always structure your response as follows:
{{meta}}/health-reports/{{meta}}/states/architect.md{{meta}}/agent-log.mdWhat SKILL.md sets; muted values are Claude Code's defaults
midThree short reads, in order
Generated from the plugin's indexed repository (galeka/gaia-obsidian-vault) — no native marketplace selected
npx claudepluginhub p/galeka-gaia-obsidian21 skills in this plugin
/batch-ingestProcess multiple source documents in a single session: articles, PDFs, notes, URLs, or raw text. Each source becomes a structured vault note; the batch ends with a cross-linking pass that connects all newly created notes to each other and to the existing vault. Triggers: EN: "batch ingest", "ingest all of these", "process these sources", "multiple sources",
"add all these", "ingest batch", "I have several articles", "process all of these",
"add these to the vault", "ingest these files".
ID: "ingest semua ini", "proses semua sumber", "tambahkan semua ke vault". IT: "ingest multiplo", "processa queste fonti", "aggiungi tutto al vault". FR: "ingestion multiple", "traite ces sources", "ajoute tout au vault". ES: "ingestión múltiple", "procesa estas fuentes", "añade todo al vault". DE: "Stapelverarbeitung", "verarbeite diese Quellen", "alles zum Vault hinzufügen". PT: "ingestão em lote", "processa essas fontes", "adiciona tudo ao vault".
/cavemanUltra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra. Use when user says "caveman mode", "bicara singkat", "hemat token", "less tokens", "be brief", "ringkas saja", or invokes /caveman. Also auto-triggers when token efficiency is requested. DOES NOT apply when writing vault note content — see GAIA Vault Content Guardrail below.
/caveman-compressCompress natural language memory/state files into caveman format to save input tokens every session. Preserves all technical substance, code, URLs, paths, and structure. Compressed version overwrites original. Human-readable backup saved as FILE.original.md. Trigger: /caveman-compress FILEPATH or "compress this file", "kompres file ini". SAFE for: agent state files (Meta/states/*.md), DISPATCHER.md process sections. NEVER use on: vault note content, zettel notes, research notes, meeting notes, daily notes.
/contact-syncSync a person to Apple Contacts. Searches by name/email, creates if missing, updates if info is incomplete. Designed to be called by the dispatcher after email interactions (drafting replies, processing emails) or on demand. Triggers: EN: "sync contact", "add to contacts", "save contact", "update contact", "is this person in my contacts". IT: "sincronizza contatto", "aggiungi ai contatti", "salva contatto", "aggiorna contatto". FR: "synchroniser le contact", "ajouter aux contacts", "sauvegarder le contact". ES: "sincronizar contacto", "agregar a contactos", "guardar contacto". DE: "Kontakt synchronisieren", "zu Kontakten hinzufuegen", "Kontakt speichern". PT: "sincronizar contato", "adicionar aos contatos", "salvar contato". ID: "sinkronisasi kontak", "tambah ke kontak", "simpan kontak", "perbarui kontak".
/create-agentCreate a new custom agent from scratch. Runs a 6-phase interview to understand purpose, capabilities, triggers, output format, and coordination rules, then generates the agent file. Triggers: EN: "create a new agent", "custom agent", "I need a new agent", "build an agent", "new crew member". IT: "crea un nuovo agente", "agente personalizzato", "nuovo membro del crew". FR: "créer un nouvel agent", "agent personnalisé". ES: "crear un nuevo agente", "agente personalizado". DE: "neuen Agenten erstellen". PT: "criar um novo agente". ID: "buat agent baru", "agent kustom", "butuh agent baru", "buat crew member".
/daily-reviewDaily note workflow: open or create today's daily note, pull today's calendar events, capture EOD reflections, extract action items to inbox, and generate a day-close summary. Triggers: EN: "daily review", "start my day", "open today's note", "daily note", "end of day", "EOD", "wrap up the day", "morning review", "evening review", "what did I do today", "close the day". ID: "review harian", "mulai hari", "buka catatan hari ini", "akhir hari", "tutup hari", "review pagi", "review malam", "apa yang aku kerjakan hari ini". IT: "review giornaliero", "inizia la giornata", "nota giornaliera", "fine giornata", "chiudi la giornata". FR: "revue quotidienne", "commencer la journée", "note du jour", "fin de journée", "clore la journée". ES: "revisión diaria", "empezar el día", "nota diaria", "fin del día", "cerrar el día". DE: "Tagesrückblick", "Tag beginnen", "Tagesnotiz", "Tagesabschluss", "Tag schließen". PT: "revisão diária", "começar o dia", "nota diária", "fim do dia", "fechar o dia".
Other plugins' skills for the same job