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.
In this repository15 other files it gives its agents.
- simple-cantoneseSkill
- simple-checkSkill
- simple-chineseSkill
- simple-cloudflareSkill
- simple-code-reviewSkill
- simple-commitSkill
- simple-debugSkill
- simple-full-refactorSkill
- simple-launchSkill
- simple-orchestratorSkill
- simple-readmeSkill
- simple-refactorSkill
- simple-releaseSkill
- simple-supabaseSkill
- simple-text-cleanupSkill
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
- Distinctive: line 35
Read the current tree and detect the existing conventions (layers, naming, aliases).
- Distinctive: line 39
Update every import, alias, config path, and test path that points to a moved file.
- Distinctive: line 40
Run the build, type check, or tests.
- Distinctive: line 44
Follow the repo's current layout and naming.
- Distinctive: line 45
Create a domain folder only when it has 3 or more files.
- Distinctive: line 47
Keep folders shallow, about 2 levels below a layer.
- Distinctive: line 49
Never move entry points, config files, or files the tooling expects at a fixed path.
- Distinctive: line 51
Leave third-party, generated, and build output folders alone.
≈ “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.
Files
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
- Read the current tree and detect the existing conventions (layers, naming, aliases).
- Find domains. Look for files sharing a name prefix, a feature, or an entity.
- Propose the move plan as an old path to new path list. Wait for approval before moving.
- Move files with
git mvwhen in a git repo, so history is kept. - Update every import, alias, config path, and test path that points to a moved file.
- 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
uiorcommon, 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/andpages/, Astrosrc/pages/) also define URLs, so do not move or rename them. Group the code they import instead, such ascomponents/,lib/, andhooks/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.
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
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.

