file-organization

Enforce direct imports, kebab-case docs, and colocated tests across codebases.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/bkinsey808/songshare-effect --skill file-organization-bkinsey808
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-organization
Source: https://github.com/bkinsey808/songshare-effect/tree/main/.github/skills/file-organization
Command: npx skills add https://github.com/bkinsey808/songshare-effect --skill file-organization-bkinsey808

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Establishes consistent file organization, naming conventions, and import patterns across the SongShare project to reduce cognitive load and refactor risk.

Core Features & Use Cases

  • No barrel files: avoid index.ts re-exports to keep structure explicit.
  • Direct imports: always import from source files to improve tree-shaking and clarity.
  • Descriptive filenames: Clear module names that indicate purpose.
  • Kebab-case docs: Documentation files use kebab-case naming for consistency.
  • ES Module config: Use ESM formats (.js/.mjs) for config and setup files.
  • Colocated tests: Place unit tests next to source files for easier maintenance.
  • Explicit type imports: Prefer import type for types; avoid inline mixed imports.

Quick Start

Review and apply the repository's file-organization rules in new files and PRs.

Frequently Asked Questions about file-organization

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

FAQPage Schema
Why should I avoid barrel files for TypeScript imports?

Direct imports require referencing source files instead of intermediate index.ts re-exports. This practice improves tree-shaking and clarity, ensuring your file structure remains explicit and reducing refactor risk across your TypeScript codebase.

How do I organize colocated tests in a TypeScript project?

Place unit tests directly next to their corresponding source files to colocate them. This file organization strategy improves maintainability by keeping implementation and tests grouped together, reducing cognitive load during refactoring.

What is the best way to configure ESM formats for TypeScript setup files?

Use .js or .mjs extensions for your configuration and setup files to enforce ES Module formats. This standardizes ESM usage across your project, supporting direct imports and explicit type separation.

Should I use import type for TypeScript type definitions?

Yes, prefer import type for TypeScript type definitions to avoid inline mixed imports. This explicit type import practice separates types from runtime values, reducing bundle size and maintaining clean import patterns.

What naming conventions should documentation files follow in a TypeScript codebase?

Documentation files should use kebab-case naming conventions for consistency. This standardizes file organization across your codebase, making documentation easier to locate and maintaining structural uniformity with descriptive filenames.

When do I need to standardize file structure across my codebase?

Standardize file structure during new component creation, refactors, or repository-wide reorganizations. Applying consistent file organization rules in these scenarios reduces cognitive load and improves long-term maintainability.