This skill provides expert advice on structuring software projects. It's tailored for developers seeking to optimize their project organization based on specific rules and methodologies.
$ npx skills add https://github.com/tartinerlabs/skills --skill project-structureThe project-structure skill analyzes your codebase's directory layout to identify organizational issues, anti-patterns, and opportunities for better colocation and grouping. It uses modular, editable rules that adapt to your project's existing conventions and structure. The skill produces actionable guidance for reorganizing files and folders to improve maintainability and developer experience. It's designed for teams seeking to enforce consistent project organization standards across their codebase without manual oversight.
Install via command: `$ npx skills add https://github.com/tartinerlabs/skills --skill project-structure`
Organizing project files based on rules
Implementing feature-based project structure
Auditing existing project layouts
$ npx skills add https://github.com/tartinerlabs/skills --skill project-structuregit clone https://github.com/tartinerlabs/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as an expert software architect and recommend the optimal project structure for a [PROGRAMMING_LANGUAGE] project in the [INDUSTRY] industry, following [METHODOLOGY] principles. Consider [SCALABILITY_NEEDS] and [TEAM_SIZE]. Use [FRAMEWORK] where applicable. Provide a directory tree, key configuration files, and brief explanations for each component.
# Project Structure Recommendation for AcmeCorp's E-Commerce API ## Directory Tree ``` acme-ecommerce-api/ ├── src/ │ ├── controllers/ # Route handlers │ │ ├── auth.controller.js │ │ ├── product.controller.js │ │ └── order.controller.js │ ├── services/ # Business logic │ │ ├── auth.service.js │ │ ├── product.service.js │ │ └── order.service.js │ ├── models/ # Data models │ │ ├── user.model.js │ │ ├── product.model.js │ │ └── order.model.js │ ├── routes/ # API routes │ │ ├── auth.routes.js │ │ ├── product.routes.js │ │ └── order.routes.js │ ├── middlewares/ # Custom middlewares │ │ ├── auth.middleware.js │ │ └── error.middleware.js │ └── utils/ # Utility functions │ ├── logger.js │ └── responseHandler.js ├── config/ │ ├── database.js # DB configuration │ ├── server.js # Server setup │ └── env.js # Environment variables ├── tests/ │ ├── unit/ # Unit tests │ └── integration/ # Integration tests ├── .env # Environment variables ├── .gitignore ├── package.json └── README.md ``` ## Key Files Explained ### `src/controllers/` Handles incoming HTTP requests and delegates to services. Separates concerns from business logic. ### `src/services/` Contains core business logic. Example: `product.service.js` handles inventory checks and pricing calculations. ### `src/models/` Defines data schemas and relationships. Uses Mongoose for MongoDB in this Node.js project. ### `config/database.js` Centralized database connection configuration with connection pooling for performance. ## Why This Structure? - **Scalability**: Separates concerns allows independent scaling of components. - **Maintainability**: Clear hierarchy reduces cognitive load for new team members. - **Testability**: Services and controllers can be mocked and tested in isolation. ### Next Steps 1. Initialize the project with `npm init -y` 2. Install dependencies: `npm install express mongoose dotenv` 3. Create the directory structure using the tree above 4. Implement the `auth` module first (most critical for e-commerce) Would you like me to elaborate on any specific component or provide sample code for a particular file?
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan