File organization

From Esposter/Esposter · View interactive version

File organization is an AI agent skill from the GitHub repository Esposter/Esposter. Apply when creating, moving, renaming, or organising any file, export, constant, or package. Esposter's file and folder organisation — which folder and which package a file belongs in, what it may import, and how a rename lands.

How to use this skill

Skill file

File & Folder Organisation

Settled — do not re-propose

Imports

Files and Exports

Constants

Never Duplicate Similar Logic — Source AND Tests

Before writing a helper, grep for an existing one; before finishing a feature, grep for near-twin functions you may have created and collapse them. When ≥2 functions — or ≥2 call sites, the same condition written inline at each — share a shape and differ only in a predicate/parameter, extract one functional primitive and make each caller a thin, intention-revealing wrapper that keeps the domain name and passes the constants. When the twins differ, the collapsed result takes the correct behaviour (per the reference or spec), and the commit body names the change.

Packages and the repo's own layout

Maps, registries and classes

Renames

File Length

Reference pages

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.