code-structure

Enforce file and folder structure conventions for software implementation.

Updated Jan 1, 2026
One-click install
npx skills add https://github.com/ViewableGravy/better-ecs --skill code-structure-viewablegravy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-structure
Source: https://github.com/ViewableGravy/better-ecs/tree/main/.github/skills/code-structure
Command: npx skills add https://github.com/ViewableGravy/better-ecs --skill code-structure-viewablegravy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the challenge of maintaining consistent and readable code structure across a project, reducing cognitive load and improving maintainability.

Core Features & Use Cases

  • File Organization: Enforces a specific order for imports, type definitions, and implementation within files.
  • Code Readability: Promotes the use of section headers and clear function signatures.
  • Modularity: Encourages splitting logic into smaller, manageable modules and separating constants.
  • Use Case: When onboarding new developers or refactoring existing code, this Skill provides a clear blueprint for how files and functions should be structured, ensuring uniformity.

Quick Start

Apply the code-structure skill to organize the new TypeScript file.

Frequently Asked Questions about code-structure

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

FAQPage Schema
How do I standardize file and folder structure conventions for TypeScript?

To standardize TypeScript file organization, enforce a specific order for imports, type definitions, and implementation sections. This reduces cognitive load by promoting clear headers and moving detailed logic into helper modules to maintain concise system files.

What is the best way to organize imports and type definitions in a software project?

Organizing imports and type definitions requires enforcing a specific file order and separating constants. Using clear section headers for implementation blocks guides file organization, ensuring modularity and readability across your codebase.

How do I improve code readability and modularity when refactoring existing code?

Improve code readability by promoting clear function signatures and section headers. Achieve modularity by splitting detailed logic into smaller, manageable helper modules and managing state in dedicated structures to provide a clear refactoring blueprint.

When do I need to move detailed logic to helper modules?

You need to move detailed logic to helper modules when system files become too complex. This practice promotes concise main files, improves code readability, and ensures modularity by separating constants and managing state in dedicated structures.

Does this code structure approach work for onboarding new developers?

Yes, this code structure approach works for onboarding new developers by providing a clear blueprint for how files and functions should be structured. It ensures uniformity across the project, reducing cognitive load and improving maintainability.

Why should I use section headers in my code files?

You should use section headers in your code files to promote code readability and enforce preferred file organization. Clear headers separate imports, type definitions, and implementation sections, reducing cognitive load when navigating the project structure.