agentleFS
AWSKnown publisherawslabs/do-agent-aws/Container-Root/agent/skills/directory-cross-examination/SKILL.md

directory-cross-examination

Skill3 starsChanged 3 days agoApache-2.0View on GitHub

Use when analyzing directories before archiving, deleting, or consolidating. Use when multiple directories might contain the same project at different stages. Use when you need to verify no unique content will be lost before moving files. Use when the user says "analyze these directories" or "should we keep these?"

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before archiving, moving, or deleting any directory

    line 14
  2. Distinctive:

    When multiple directories appear to be variants of the same project

    line 15
  3. Distinctive:

    When the user asks "do we need these?" or "what should we do with these?"

    line 16
  4. Very specific:

    When directories share naming patterns (e.g., slurm-*, nccl-*, deepep-*)

    line 17
  5. Distinctive:

    Read EVERY README.md and CLAUDE.md

    line 46
  6. Distinctive:

    Read key config files (Dockerfile, *.yaml, *.conf)

    line 47
  7. Distinctive:

    Check for test results, passing proofs, deployment artifacts

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Directory Cross-Examination

Overview

Systematic analysis of directories to determine what's unique, what's duplicate, and what's safe to archive — without making mistakes. Never move or delete anything until the full cross-examination is complete and the user has reviewed findings.

When to Use

  • Before archiving, moving, or deleting any directory
  • When multiple directories appear to be variants of the same project
  • When the user asks "do we need these?" or "what should we do with these?"
  • When directories share naming patterns (e.g., slurm-*, nccl-*, deepep-*)

Core Principle

Read everything. Compare everything. Recommend only. Act only with explicit approval.

The Process

Phase 1: Inventory (collect raw facts, no judgment)

For each directory, collect ALL of:

# Size, git status, remote, branch, dirty files, .claude presence
du -sh DIR
git -C DIR remote -v | head -2
git -C DIR branch --show-current
git -C DIR log --oneline -5
git -C DIR status --short | wc -l  # dirty count
[ -d DIR/.claude ] && echo "has .claude"

Also check:

  • Session activity from provenance DB (if available)
  • GitHub repo status (pushed? unpushed commits?)
  • Nested git repos inside

Phase 2: Content Analysis (read the actual files)

  • Read EVERY README.md and CLAUDE.md
  • Read key config files (Dockerfile, *.yaml, *.conf)
  • List unique file types and counts
  • Check for test results, passing proofs, deployment artifacts

Phase 3: Cross-Compare (the critical step)

Build a comparison matrix:

Content TypeDir ADir BDir C
K8s manifests14 YAMLs15 YAMLs9 YAMLs
Tests passingNoNoYes (NCCL+FSDP)
Helm chartYesNoNo
............

For each piece of unique content, ask:

  1. Does this exist ANYWHERE else in the workspace?
  2. Is this content superseded by a newer version elsewhere?
  3. Would losing this content prevent reproducing past work?

Phase 4: Classify

Assign each directory ONE role:

  • CANONICAL: The production-ready, actively used version
  • REFERENCE: Contains unique content not in canonical (e.g., Helm charts, experimental variants)
  • DUPLICATE: Same content exists in canonical or reference
  • HISTORICAL: Older version, all content superseded

Phase 5: Present Findings (STOP here — do not act)

Present to user:

  1. Which directory is canonical and why (with evidence)
  2. What unique content exists in each non-canonical directory
  3. Specific files that would be lost if archived
  4. Recommended action for each directory

CRITICAL: Do NOT move, archive, or delete anything without explicit user approval.

Red Flags — STOP and Ask

  • Directory has dirty files → check what they are before recommending archive
  • Directory has unpushed commits → push first or flag as data loss risk
  • Directory has .claude dir → it was actively used by Claude sessions
  • Directory has test results → may contain proof of working state
  • User says "just archive it" but you haven't read the content → READ FIRST

Common Mistakes

MistakePrevention
Archiving before reading contentAlways read READMEs and key files
Missing unique content in subdirsCheck /hack, /experiments, nested repos
Assuming same remote = same contentDifferent branches may have unique work
Moving files without checking dirty statusAlways check git status --short
Acting before user approvesPresent findings, wait for explicit go-ahead
<!-- imported on 2026-10-31 by tools/import-skills.py from a native Claude Code instance's skill library; the source site's names, ids, hosts and paths are scrubbed to <placeholders>; its other files were not copied -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.