file-organization

Organize codebases to enforce export-first architecture with one export per file.

23|3|Updated Jun 28, 2022
One-click install
npx skills add https://github.com/Esposter/Esposter --skill file-organization-esposter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-organization
Source: https://github.com/Esposter/Esposter/tree/main/.agents/skills/file-organization
Command: npx skills add https://github.com/Esposter/Esposter --skill file-organization-esposter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Esposter file and folder organisation enforces a strict, per-file export pattern, clear separation of concerns (models, services, constants), and consistent naming across packages to reduce cognitive load and onboarding time.

Core Features & Use Cases

  • One export per file — avoids bulk exports and clarifies responsibility.
  • Co-located types and models — place interfaces/types under models/ and keep schemas close to usage.
  • Alias-driven imports — adopt project-wide aliases (#shared, @@, @/) to simplify navigation.
  • Constant maps and MIME types discipline — centralize constants and MIME-type mappings rather than ad-hoc lookups.
  • File-length and documentation discipline — keep files within reasonable length and document architectural decisions.

Quick Start

Follow these conventions whenever creating or reorganizing files, exports, constants, or new packages to ensure consistent structure and naming throughout the repository.

Frequently Asked Questions about file-organization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I organize exports and imports in a TypeScript monorepo?

To organize exports and imports in a TypeScript monorepo, enforce a one export per file rule and use alias-driven imports like @/ or @@ to ensure uniform paths and reduce cognitive load.

What is the best way to structure Vue components and models in a monorepo?

The best way to structure Vue components and models in a monorepo is co-locating types under a models/ directory, keeping schemas close to usage, and applying structured component guidelines.

Why does enforcing one export per file help with code organization?

Enforcing one export per file helps code organization by avoiding bulk exports and clarifying file responsibility, which enforces a strict export-first architecture across packages and reduces onboarding time.

How do I separate constants and MIME types when reorganizing files?

To separate constants and MIME types when reorganizing files, centralize constant maps and MIME-type mappings rather than using ad-hoc lookups to maintain clear separation of concerns.

Can I use alias imports to simplify navigation across monorepo packages?

Yes, you can use alias imports to simplify navigation across monorepo packages by adopting project-wide aliases like #shared, @@, and @/ to enforce consistent import paths throughout the codebase.

Does this coding standard apply when creating new packages in a monorepo?

Yes, this coding standard applies when creating, moving, or reorganizing files, exports, constants, or new packages in a monorepo to ensure consistent structure and naming throughout the repository.