code-architecture

Organize application architecture and module boundaries for testable, changeable codebases.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/selrai-company/claude-workshop-kit --skill code-architecture-selrai-company
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-architecture
Source: https://github.com/selrai-company/claude-workshop-kit/tree/main/skills/code-architecture
Command: npx skills add https://github.com/selrai-company/claude-workshop-kit --skill code-architecture-selrai-company

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Large or long-lived codebases become hard to understand, test, and change due to tangled business logic, fat controllers, circular dependencies, unclear module boundaries, and inappropriate abstractions. This Skill provides concrete guidance to reorganize and design application modules so the code remains reliable and adaptable as the team and feature set grow.

Core Features & Use Cases

  • Architecture selection: Help choose between clean architecture, hexagonal architecture, feature-based structure, or vertical-slice organization based on team size and domain complexity.
  • Dependency inversion & DI guidance: Prescribe interfaces, constructor injection patterns, when to use IoC containers, and anti-patterns to avoid.
  • Module boundaries & exports: Define public APIs for features, enforce barrel exports, and recommend import rules to prevent internal coupling.
  • Anti-pattern detection & refactoring advice: Diagnose fat controllers, circular dependencies, over-abstraction, and recommend concrete remediation steps and tooling.
  • Testing strategy alignment: Map layers to the test pyramid and recommend where unit, integration, and E2E tests should live.
  • Use case example: Reorganize an orders feature into a feature folder with domain, application, infrastructure, HTTP adapters, and a public index to improve onboarding and deletion safety.

Quick Start

Ask the assistant to analyze your repository and recommend a concrete folder structure, dependency-injection approach, and three prioritized refactors to reduce coupling.

Frequently Asked Questions about code-architecture

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

FAQPage Schema
How do I choose between clean architecture and hexagonal architecture for my project?

To choose between clean, hexagonal, feature-based, or vertical-slice patterns, evaluate your team size and domain complexity. This analysis prescribes the best architecture to make your single-deployable codebase understandable and testable.

How do I fix circular dependencies and fat controllers in my codebase?

Fixing circular dependencies and fat controllers requires diagnosing unclear module boundaries and inappropriate abstractions. Apply concrete refactoring strategies and prescriptive dependency inversion guidance to reorganize modules and reduce internal coupling.

What is the best way to structure feature folders and module boundaries?

The best way to structure feature folders is to define domain, application, infrastructure, and HTTP adapter layers. Enforce barrel exports and public APIs to establish clear module boundaries, prevent internal coupling, and ensure deletion safety.

When should I use dependency injection containers and constructor injection?

Use dependency injection containers and constructor injection when you need to prescribe interfaces and invert dependencies. Following these patterns prevents anti-patterns, ensures proper IoC container selection, and makes application modules reliable and adaptable.

How do I align my testing strategy with the test pyramid across application layers?

Align your testing strategy by mapping architecture layers directly to the test pyramid. Place unit, integration, and E2E tests in their appropriate layers to ensure automated testing coverage matches your module boundaries and dependency inversion structure.