skillfed

code-architecture

Guides you through selecting the right architecture pattern—clean, hexagonal, feature-based, or vertical slice—based on team size and domain complexity. Covers folder structure, dependency inversion, module boundaries, and SOLID principles at application scale. Diagnoses architectural problems like fat controllers and circular dependencies.

Code Architecture helps you choose and implement application patterns like clean, hexagonal, or feature-based structures for maintainable code.

AI-generated summary based on this skill's SKILL.md

164 27 MIT updated by curiositech

Install

curiositech/some_claude_skills/code-architecture · repository language: TypeScript

git clone https://github.com/curiositech/some_claude_skills
cp -r some_claude_skills/.claude/skills/code-architecture ~/.claude/skills/code-architecture
npx skillfed install curiositech/some_claude_skills/code-architecture

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What clean architecture patterns work best for Node.js?

code-architecture guides you through selecting patterns like clean, hexagonal, feature-based, and vertical slice architectures tailored to Node.js projects. The skill helps you evaluate team size and domain complexity to choose the right fit, then walks through folder structure, dependency inversion, and module boundaries specific to Node environments. Each pattern trades simplicity for testability and maintainability differently.

How do I organize code in a feature-based structure?

code-architecture covers feature-based organization by defining clear module boundaries around business capabilities rather than technical layers. It shows how to structure folders vertically around features, establish dependency rules between features, and use barrel exports to control what each feature exposes. The skill also addresses when feature-based structure outperforms layer-based approaches and how to prevent cross-feature coupling.

How can I fix circular dependencies in TypeScript?

code-architecture diagnoses circular dependency problems by identifying where modules depend on each other cyclically, then applies dependency inversion and clear module boundaries to break cycles. The skill teaches you to extract shared abstractions, use interfaces to decouple modules, and restructure folder hierarchies so dependencies flow in one direction. It also covers detecting these issues early through architecture reviews.

What is the fat controller problem and how do I solve it?

code-architecture identifies the fat controller problem—when a single controller handles too many responsibilities—and shows how to refactor it into focused use cases and domain logic. The skill guides you toward extracting business logic into separate layers, organizing code around user workflows rather than HTTP verbs, and applying SOLID principles at module scale to keep controllers thin and testable.

When should I use clean vs hexagonal architecture?

code-architecture provides a decision framework comparing clean and hexagonal patterns based on team experience, domain complexity, and infrastructure needs. Clean architecture emphasizes concentric layers and testability; hexagonal (ports and adapters) emphasizes external dependency isolation. The skill helps you weigh trade-offs: hexagonal adds abstraction overhead but excels when you need to swap infrastructure; clean is simpler for smaller teams and domains.

How do I detect architectural problems in existing code?

code-architecture teaches you to recognize symptoms like fat controllers, circular dependencies, unclear module boundaries, and tight coupling between features. The skill walks through diagnostic techniques—mapping dependency graphs, measuring module cohesion, reviewing folder structure—and connects problems to root causes. Once identified, it guides you toward refactoring strategies using dependency inversion, SOLID principles, and clearer architectural patterns.

SKILL.md

rendered from the published skill — quoted content, verbatim


name: code-architecture description: Application architecture patterns and code organization — clean architecture, hexagonal architecture, feature-based structure, dependency inversion, module boundaries, SOLID principles at module scale. Activate on "clean architecture", "hexagonal architecture", "feature-based structure", "dependency inversion", "module boundaries", "architecture pattern", "folder structure", "fat controller", "circular dependency", "IoC container". NOT for microservice decomposition (use microservices-patterns) or database schema design (use database-design-patterns). allowed-tools: Read,Write,Edit,Bash,Grep,Glob metadata: category: Code Quality & Testing tags: - code - architecture - clean-architecture - hexagonal-architecture - feature-based-structure pairs-with: - skill: refactoring-surgeon reason: Refactoring implements the architectural patterns that code-architecture prescribes - skill: monorepo-management reason: Monorepo workspace boundaries enforce architectural module separation - skill: microservices-patterns reason: Service decomposition decisions depend on application architecture patterns - skill:

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 3 files
.claude/skills/code-architecture/SKILL.md
.claude/skills/code-architecture/references/architecture-patterns.md
.claude/skills/code-architecture/references/dependency-inversion.md

Related skills

Tags

layered-design domain-modeling code-organization abstraction-strategy testing-layers interface-design module-coupling enterprise-patterns refactoring-structure