simplify-layout
Skill1 starsChanged 3 months agoMITView on GitHub
Shortens file and folder names and groups related code so paths stay scannable. Folder context carries the noun; leaf files stay short verbs or aspects; related modules sit together. Use when the user asks to simplify names, shorten paths, or make a package or feature layout easier to scan — not for cohesion-only splits that keep descriptive names, broad boundary or scalability migrations, or general smell cleanup.
In this repository81 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-mdSkill
- base-uiSkill
- better-authSkill
- brainstormSkill
- bullmqSkill
- bunSkill
- clickhouseSkill
- clone-to-tempSkill
- compound-uiSkill
- copywritingSkill
- create-durable-planSkill
- d3Skill
- date-fnsSkill
- decimal-jsSkill
- deduplicateSkill
- design-engineerSkill
- designSkill
- drizzle-ormSkill
- effectSkill
- elysia-architectureSkill
- elysiaSkill
- evlogSkill
- feedsmithSkill
- grokSkill
- handoffSkill
- heyapiSkill
- impitSkill
- intlayerSkill
- jsdocSkill
- kafkaSkill
- kill-legacySkill
- legend-stateSkill
- loopSkill
- mantine-hooksSkill
- mobbinSkill
- motionSkill
- oxfmtSkill
- oxlintSkill
- permixSkill
- plain-languageSkill
- playwrightSkill
- react-boundariesSkill
- react-emailSkill
- reactSkill
- reorganizeSkill
- researchSkill
- schema-dtsSkill
- sentrySkill
- seoSkill
- setup-competitors-mdSkill
- setup-copywriting-mdSkill
- setup-icp-mdSkill
- setup-project-mdSkill
- storybookSkill
- subagentsSkill
- tailwindSkill
- tailwind-variantsSkill
- takumiSkill
- tanstack-chartsSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 13 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Ask once if the boundary is ambiguous.
- Distinctive: line 19
Default to propose (read-only rename/group map).
- Very specific: line 24
Read project naming or layout guidance if present (AGENTS.md, CONTRIBUTING, nested ownership docs, design-system docs).
- Distinctive: line 35
Do not repeat the parent folder (or package) in the leaf name.
- Distinctive: line 53
Put siblings that change together in the same folder.
- Very specific: line 69
Prefer one word when clear: day, stamp, lookup, list, card
- Very specific: line 70
Use kebab-case multi-word only when needed: dimension-filters.ts, currency-fraction-digits.ts
- Distinctive: line 72
Do not invent cryptic 2–3 letter abbreviations that need a glossary
- Distinctive: line 80
Do not add empty scaffolding folders "for later"
- Very specific: line 81
Do not nest utils/helpers/lib chains.
- Distinctive: line 101
Call out what must not rename (migrations on disk, public SDK paths, persisted resource IDs, API routes) unless the user explicitly asks.
- Distinctive: line 132
Prefer rename/move over rewriting logic
- Distinctive: line 135
Keep unrelated worktree changes untouched
- Distinctive: line 136
Read-only unless the user requests implementation
- Distinctive: line 140
Use the project's existing quality commands for touched files or packages only (format, lint, typecheck, tests).
- Distinctive: line 144
If schema, migrate, or generated-path artifacts moved, run the project's usual migration or codegen step for that surface.
- Very specific: line 188
When this skill runs inside a multi-agent implementation or repair workflow, each subagent runs only targeted checks for its assigned …
- Distinctive: line 192
If no multi-agent harness is available, run the same targeted checks in chat.
≈ “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.
Files
Simplify Layout
Make file trees short-named and well-grouped: folder context carries the noun; leaf files stay short verbs/aspects; related code sits together.
Canonical shape: references/layout-model.md.
Scope
- User-provided path first (package, feature, or subtree).
- Current git changes if no path is given and the diff is layout-shaped.
- Ask once if the boundary is ambiguous.
Default to propose (read-only rename/group map). Only rewrite paths when the user says apply / migrate / implement.
First Steps
- Read project naming or layout guidance if present (
AGENTS.md,CONTRIBUTING, nested ownership docs, design-system docs). - Glob the target tree; sketch an abbreviated current layout.
- Load the layout model: references/layout-model.md.
- Compare against 1–2 sibling folders of similar role (optional, for local
conventions like
public//private/trust buckets).
Principles
1. Path context replaces filename prefixes
Do not repeat the parent folder (or package) in the leaf name.
| Avoid | Prefer |
queries/user-profile-query.ts | queries/users/profile.ts |
auth/auth-token-helper.ts | auth/token.ts |
rows/events/event-row-mapper.ts | rows/events/map.ts |
billing-invoice-summary.ts under packages/billing | invoices/summary.ts |
2. Folder = noun / domain; file = aspect / operation
- Domain folders:
users/,billing/,auth/,orders/,seed/ - Leaf files:
card.ts,detail.ts,overview.ts,create.ts,sync.ts,map.ts - Stable role folders when the archetype needs them:
queries/,services/,components/,hooks/,errors/,utils/— keep those short too
3. Group related code under one parent
Put siblings that change together in the same folder. Prefer:
queries/
users/profile.ts
users/list.ts
orders/detail.ts
orders/overview.ts
billing/invoice.tsOver a flat dump of users-profile.ts, orders-detail.ts, billing-invoice.ts
at one level, or scattering related modules across unrelated roots.
4. Short names; spell out only when ambiguous
- Prefer one word when clear:
day,stamp,lookup,list,card - Use kebab-case multi-word only when needed:
dimension-filters.ts,currency-fraction-digits.ts - Do not invent cryptic 2–3 letter abbreviations that need a glossary
- Service or package folder identities may stay longer
(
analytics-traffic-read) when they are the public domain name; files inside stay short (service.ts,errors/…)
5. Depth serves grouping, not ceremony
- Split a flat folder when it mixes domains or names start carrying prefixes
- Do not add empty scaffolding folders "for later"
- Do not nest
utils/helpers/libchains; one private helper bucket is enough - Respect existing trust boundaries (
public//private//internal/) — shorten names inside them; do not flatten them away
6. One primary concern per file
Split when a file mixes unrelated export groups or grows past ~250–400 LOC with
continued growth expected. Name the split pieces by aspect, not by
helpers / misc / shared2.
Workflow
Propose (default)
- Map current tree (abbreviated).
- Flag friction: long names, repeated path segments, mixed domains, scattered siblings, god files, useless nesting.
- Propose a target tree using the layout model adapted to this archetype (package vs feature vs UI — do not force data-layer folder names onto UI).
- Emit an old → new path table for every rename/move.
- Call out what must not rename (migrations on disk, public SDK paths, persisted resource IDs, API routes) unless the user explicitly asks.
Apply (only when asked)
- [ ] Create/move/rename files per the map
- [ ] Update imports, package exports, and path aliases as needed
- [ ] Move colocated tests with their sources
- [ ] Update nearest ownership/layout docs if paths changed
- [ ] Delete emptied leftovers
- [ ] Run the project's targeted format/lint/typecheck/tests for touched areasPreserve behavior. No barrels (index.ts / index.js) unless that subtree
already uses them. Do not rename applied migrations or external contracts.
Defects To Flag
- Leaf names that restate parent folders (
…/events/event-*.ts) - Package or brand restated in paths inside the owning package
(
acme-*underpackages/acme) - Flat directories with many prefix-disambiguated files (
foo-bar-baz.tssiblings) - Related modules split across distant folders without a shared parent
utils/,helpers/,common/,misc/dumping groundssomething.service.tscollapsing a service folder (prefersomething/service.tswhen that is the local service shape)- Deep trees where every segment is a vague layer name
Fix Rules
- Prefer rename/move over rewriting logic
- Match local archetype conventions (feature trust buckets, UI primitives) while applying short-name + grouping rules
- Keep unrelated worktree changes untouched
- Read-only unless the user requests implementation
Verification
Use the project's existing quality commands for touched files or packages only (format, lint, typecheck, tests). Prefer targeted checks over full-repo gates unless the rename spans shared contracts.
If schema, migrate, or generated-path artifacts moved, run the project's usual migration or codegen step for that surface.
Review Output
## Scope
[path]
## Current (abbrev)
[tree]
## Friction
1. …
## Target
[tree]
## Rename map
| Before | After |
| ------ | ----- |
## Do not rename
- …
## Apply?
Propose only / ready to apply when askedRelated Skills
| Skill | Use when |
unsmell | Maintainability beyond naming/grouping (duplication, complexity, types) |
Multi-Agent Verification
When this skill runs inside a multi-agent implementation or repair workflow, each subagent runs only targeted checks for its assigned files/package/surface and reports broader gate needs. The orchestrator owns the project's full quality gate sequence and routes final-gate failures back to responsible subagents. If no multi-agent harness is available, run the same targeted checks in chat.
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.

