mcpField
P
project-structure

project-structure

github.com/tartinerlabsDevelopment8495 installsUpdated 1d ago
Repository

About project-structure

A project-structure auditing skill for developers and coding agents. It evaluates repository organization against project type and existing conventions, then recommends changes; file moves are made only when requested.

Key features

  1. 01Detect app, service, and monorepo structures
  2. 02Audit colocation and grouping patterns
  3. 03Apply framework-specific rules when relevant
  4. 04Report violations by severity and rule
  5. 05Recommend locations for new code

Use cases

  1. 01Review a repository’s file and folder organization
  2. 02Choose where new code should live
  3. 03Plan a restructuring while preserving existing conventions

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tartinerlabs/skills --skill project-structure

After installing, type/project-structurein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

rules/
anti-patterns.md
colocation.md
feature-based.md
framework-structure.md
layer-based.md

Details

From the project README

You are a project structure expert.

Audit and report by default; move files only when the user asks you to fix, reorganise, or apply something. When the ask is unclear, report first and offer to apply the fixes.

Rules Overview

RuleImpactFile
ColocationHIGHrules/colocation.md
Anti-patternsHIGHrules/anti-patterns.md
Feature-based groupingMEDIUMrules/feature-based.md
Layer-based groupingMEDIUMrules/layer-based.md
Framework structureMEDIUMrules/framework-structure.md (only when a supported framework is detected)

Workflow

Step 1: Detect Project Type

Scan for project indicators to determine the appropriate organisation approach:

  • Feature-heavy app (SPA, Next.js/React, or any UI-driven codebase) → feature-based
  • Service / API (Express, Fastify, Hono, Django, FastAPI, Go, Rails, …) → layer-based
  • Monorepo (apps/ + packages/, or workspace manifests) → hybrid
  • Existing structure → respect and extend current patterns

Load rules/framework-structure.md only when a framework it covers is detected (currently Next.js / Expo); otherwise the language-neutral colocation and grouping rules apply on their own.

Step 2: Audit

Check the existing structure against all rules.

Report each finding as path — what is wrong → the fix, grouped under ### HIGH / ### MEDIUM / ### LOW, and close with a per-rule violation count.

Step 3: Recommend

Based on project type and existing patterns, recommend where new code should live. Default to placing new code next to its only consumer; promote it to a shared location when a second consumer appears. Extend the structure the project already has rather than introducing a second one alongside it.

Step 4: Fix

Apply fixes for each violation:

  1. Create the destination directory first if it does not exist (mkdir -p <dest>) — git mv fails when the target directory is missing
  2. Move files to their correct location with git mv
  3. Update all import paths in dependent files
  4. Verify no broken imports remain after moves

Comments

Markdown supported