Project Structure Enforcer

•
69
•

Enforces modern folder architecture and unidirectional import rules to maintain clean, scalable, and production-ready codebases.

The Project Structure Enforcer is a specialized architectural validator for Claude Code that automates the maintenance of clean codebases. It enforces 2026 industry standards for React, Next.js, and FastAPI projects by blocking structural violations such as excessive nesting beyond four levels, the use of barrel files that hinder tree-shaking, and improper file placement for hooks or components. By mandating a unidirectional import flow—where shared logic feeds into features and then into the application layer—this skill prevents circular dependencies and technical debt, ensuring your AI-generated code follows enterprise-grade architecture patterns.

주요 기능

01Strict nesting depth enforcement (max 4 levels) to ensure project navigability.
0269 GitHub stars
03Real-time PreToolUse validation that stops architectural drift during file creation or editing.
04Framework-specific placement rules for React components, custom hooks, and FastAPI services.
05Automated blocking of barrel files (index.ts) to optimize build performance and tree-shaking.
06Unidirectional import validation to maintain clean boundaries between features and shared libraries.

사용 사례

01Refactoring legacy spaghetti code into a modular, feature-based directory structure.
02Preventing circular dependencies and tree-shaking issues in high-performance frontend applications.
03Enforcing architectural consistency across large teams or multiple AI-assisted projects.