repository-structure

Generate a repository structure definition document with layer-based directory design and naming conventions.

Updated Nov 27, 2025
One-click install
npx skills add https://github.com/GenerativeAgents/training-claude-code-example --skill repository-structure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: repository-structure
Source: https://github.com/GenerativeAgents/training-claude-code-example/tree/main/.claude/skills/repository-structure
Command: npx skills add https://github.com/GenerativeAgents/training-claude-code-example --skill repository-structure

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It defines a clear, scalable repository layout that supports growth and maintenance.

Core Features & Use Cases

  • Layered Structure Guidance: Clear separation per UI, service, and data layers.
  • Naming & Test Layout: Best practices for directory and file naming; test placement guidance.
  • Use Case: For a growing project, adopt a scalable structure from day one.

Quick Start

Use this guide to design docs/repository-structure.md reflecting the recommended layout.

Frequently Asked Questions about repository-structure

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

FAQPage Schema
How do I structure a repository for a scalable codebase?

Repository structure organizes code into clear layers—UI, service, and data—with defined directory roles, naming conventions, and dependency rules. A well-designed structure from the start reduces refactoring friction as your project grows and helps teams maintain consistency across modules.

What's the best way to organize tests within a layered repository?

Test placement follows layer boundaries: unit tests colocate with source modules, integration tests sit in a dedicated layer, and end-to-end tests live at the top. This layout mirrors your architecture and makes test selection and maintenance predictable as projects scale.

Can I apply repository structure guidance to an existing project?

Yes. Repository structure updates work on both new and existing projects. Document your current layout, align it with layer-based guidelines, and refactor incrementally without disrupting active development, using the structure document as a governance reference.

What naming conventions should I use for directories and modules?

Naming conventions standardize how you name directories, files, and modules within each layer to enforce clarity and reduce cognitive load. The structure document specifies conventions per layer—service names, utility prefixes, test suffixes—ensuring consistent discovery and navigation.

How do I define module boundaries and dependency rules in my repository?

Module boundaries separate concerns by layer and responsibility; dependency rules prevent circular imports and enforce one-way flows. Document which layers can depend on which others, specify what each module exports, and use the repository structure document to enforce these rules during code review.

What output should I expect from a repository structure definition?

The output is a docs/repository-structure.md file that standardizes project organization, specifies directory roles, naming patterns, test layouts, and dependency governance. Teams reference this document for onboarding, architecture decisions, and scaling decisions.