AugmentClaude

File Organizer

Restructure and deduplicate shared notes directories with updated indexes.

Installation

  1. Make sure Claude is on your device and in your terminal.

    Skills load from ~/.claude/skills/ when Claude Code starts up β€” so you need it on your machine first. If you don't have it yet, install it once with the command below, then run claude in any terminal to verify.

    One-time setup
    npm i -g @anthropic-ai/claude-code

    Already have it? Skip ahead.

  2. Paste into Claude Code or into your terminal.

    This copies the whole skill folder into ~/.claude/skills/organize-files-human-agent-society/ β€” the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.

    Faster alternative (instruction-only skills)

    Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates β€” they won't be downloaded and the skill will fail when it tries to load them.

    Quick install (SKILL.md only)
    Sign up to copy
  3. Restart Claude Code.

    Quit and reopen Claude Code (or any other agent that loads from ~/.claude/skills/). New skills are picked up on startup.

  4. Just ask Claude.

    Skills auto-activate when your request matches the skill's description β€” no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the β€œWhat this skill does” section above.

Prefer to read the source first? Open on GitHub.

When Claude uses it

Organize the shared notes directory when it becomes hard to navigate. Restructure within research/ and experiments/, deduplicate, update index.md.

What this skill does

Organize Files

Restructure the shared notes directory so every agent can find what they need quickly.

For a complete before/after walkthrough on a realistic messy notes/ tree β€” including the dedup pass, naming fixes, subdirectory creation, link repair, and audit-log entry β€” see references/worked-example.md. Read it once before your first reorganization; it makes the abstract steps below concrete.

For recovery procedures and judgment calls (move script aborted partway, false-positive duplicates, files that look misplaced in _synthesis/, contradicting _open-questions.md, races between agents…), see references/edge-cases.md.

When to Use

  • Too many flat files in research/ or experiments/
  • Duplicate or near-duplicate notes
  • Inconsistent naming (spaces, uppercase, agent IDs in filenames)
  • After a deep-research or consolidate phase that created many files
  • You can't find a note you know exists

Notes Directory Structure

notes/
β”œβ”€β”€ index.md          ← table of contents (research + experiments only)
β”œβ”€β”€ raw/              ← immutable sources (DON'T touch)
β”œβ”€β”€ research/         ← deep-research findings (organize within)
β”‚   β”œβ”€β”€ <topic>/      ← group by topic or theme
β”‚   └── ...
β”œβ”€β”€ experiments/      ← eval reflections and results (organize within)
β”‚   β”œβ”€β”€ <approach>/   ← group by approach or technique
β”‚   └── ...
β”œβ”€β”€ _synthesis/       ← consolidate owns this (DON'T touch)
β”œβ”€β”€ _connections.md   ← consolidate owns this
β”œβ”€β”€ _open-questions.md
└── _organization-log.md  ← append-only log of what you changed

Process

1. Audit

Get the current state:

bash .coral/public/skills/organize-files/scripts/audit.sh

Or manually: ls -R {shared_dir}/notes/ and count files per directory.

Also check for content-level issues:

  • Contradictions β€” do any notes claim opposite things? Update or flag them in _open-questions.md.
  • Stale info β€” research notes that experiments have disproven. Update with actual results.
  • Orphan pages β€” notes not listed in index.md. Add them.
  • Missing cross-references β€” related notes that don't link to each other.
  • Gaps β€” techniques mentioned but never researched, or researched but never tried.

2. Plan

Write out your target structure before moving anything. Organize within research/ and experiments/ β€” add subdirectories by topic when a dir has 5+ files:

research/
β”œβ”€β”€ algorithms/       (3+ notes)
β”œβ”€β”€ optimization/     (3+ notes)
└── ...

experiments/
β”œβ”€β”€ optimization/     (3+ notes)
β”œβ”€β”€ debugging/        (3+ notes)
└── ...

Rules:

  • Minimum 3 files per subdirectory β€” don't create a dir for 1-2 files
  • Max 2 levels deep β€” experiments/optimization/learning-rate.md is the limit
  • Name by topic β€” algorithms/ not agent1-work/
  • Don't touch raw/ β€” immutable source material
  • Don't touch _synthesis/, _connections.md, _open-questions.md β€” owned by consolidate
  • Don't touch research/_coverage.md β€” the research coverage ledger, owned by the research team (the _ prefix already keeps the index/dedup/link scripts off it)

3. Deduplicate

Find near-duplicates:

python .coral/public/skills/organize-files/scripts/find_duplicates.py .coral/public/notes --threshold 0.5

For pairs above the threshold where the verdict is not immediately obvious from a quick read β€” same topic vs. different angle vs. different topic with shared boilerplate vs. genuinely contradicting β€” spawn the Dedup Judge subagent. It reads both notes blinded (no author / timestamp / length metadata) and returns a structured verdict (same-topic-merge / different-angle-fold / contradicting-do-not-merge / keep-both-rename) with concrete merge or rename instructions. See agents/dedup-judge.md. Use it especially when:

  • The two notes were written by different agents (recency / author bias is highest).
  • One note is much longer than the other (length bias makes the long one feel authoritative).
  • The notes appear to disagree but you can't tell if it's a real conflict or a scope difference.

For obvious cases β€” verbatim duplicates, or clearly different topics that shared a paragraph β€” just decide directly.

When merging confirmed duplicates, preserve provenance from both notes β€” never just pick one and discard:

  • Union the ## References lists (de-duplicated by URL or raw/ filename). Losing a citation loses an audit trail that an agent may need months later.
  • Keep the more specific claims from each note, not just whichever was longer. A short note with concrete numbers usually has higher information density than a long one with vague prose.
  • Combine tags and aliases rather than picking one set. Both were correct in their original context.

Move originals to _archive/ so the merge is reversible.

When two notes contradict each other, don't merge:

  • Flag the conflict in _open-questions.md (existing rule).
  • Also stamp contradictedBy: [other-note-slug] into each note's frontmatter so future readers see the conflict at the note level β€” _open-questions.md collects them, but agents reading the note directly should see the warning without a separate lookup.

4. Move and Rename

Use the move script for safe moves with frontmatter tracking:

python .coral/public/skills/organize-files/scripts/move_note.py SOURCE DEST

Naming: kebab-case-like-this.md, topic first, no agent IDs, no bare dates, under 60 chars.

5. Update Index

Regenerate index.md:

python .coral/public/skills/organize-files/scripts/generate_index.py .coral/public/notes

The index should only list research/ and experiments/ entries β€” not raw/.

Then resolve cross-links β€” moves and renames break any [[old-slug]] references in note bodies:

python .coral/public/skills/organize-files/scripts/resolve_links.py .coral/public/notes --dry-run
# review the diff, then:
python .coral/public/skills/organize-files/scripts/resolve_links.py .coral/public/notes

The resolver walks every note, scans the body for plain-text mentions of every other note's title, and wraps them as [[slug|Title]]. It skips text already inside wikilinks, citation markers, code blocks, and inline code. Run this after moves and renames, not before β€” the resolver needs final paths.

6. Log

Append a summary to _organization-log.md: what you moved, merged, or renamed, and why.

Related skills