agentleFS
denniemokdenniemok/simple-skills/simple-restructure/SKILL.md

simple-restructure

Skill1 starsChanged 43 days agoMITView on GitHub

Reorganize the repo file tree by grouping files into domain folders, without changing code behavior. Use when the user asks to restructure, reorganize, or group files and folders.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the current tree and detect the existing conventions (layers, naming, aliases).

    line 35
  2. Distinctive:

    Update every import, alias, config path, and test path that points to a moved file.

    line 39
  3. Distinctive:

    Run the build, type check, or tests.

    line 40
  4. Distinctive:

    Follow the repo's current layout and naming.

    line 44
  5. Distinctive:

    Create a domain folder only when it has 3 or more files.

    line 45
  6. Distinctive:

    Keep folders shallow, about 2 levels below a layer.

    line 47
  7. Distinctive:

    Never move entry points, config files, or files the tooling expects at a fixed path.

    line 49
  8. Distinctive:

    Leave third-party, generated, and build output folders alone.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Simple Restructure

Make the repo tree organised by moving files into folders that match what they belong to. Move files and fix imports. Do not change logic. The golden rule is to move only what helps. If a folder is already clear, leave it.

What organised means

Group by domain (the thing a file is about), inside the layers the repo already has. One domain name is reused across layers.

src/
├── components/
│   ├── book/
│   ├── bookshelf/
│   └── ui/          # generic, no domain
├── hooks/
│   ├── book/
│   └── bookshelf/
└── utils/
    ├── book/
    └── text/

Workflow

  1. Read the current tree and detect the existing conventions (layers, naming, aliases).
  2. Find domains. Look for files sharing a name prefix, a feature, or an entity.
  3. Propose the move plan as an old path to new path list. Wait for approval before moving.
  4. Move files with git mv when in a git repo, so history is kept.
  5. Update every import, alias, config path, and test path that points to a moved file.
  6. Run the build, type check, or tests. If you cannot, say what should be run.

Rules

  • Follow the repo's current layout and naming. Only add structure where it is missing.
  • Create a domain folder only when it has 3 or more files. Fewer stay flat.
  • Generic or shared code goes in a shared folder like ui or common, not in a domain.
  • Keep folders shallow, about 2 levels below a layer.
  • Move only. Do not rename exports, split or merge files, or edit logic. Suggest those as follow-ups.
  • Never move entry points, config files, or files the tooling expects at a fixed path.
  • Folders that define routes (Next.js app/ and pages/, Astro src/pages/) also define URLs, so do not move or rename them. Group the code they import instead, such as components/, lib/, and hooks/ by domain.
  • Leave third-party, generated, and build output folders alone.

Output

The final tree of what changed, plus any risks or things to verify.

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.