No slash command · from code-foundations
Applies Clean Architecture rules to system-level boundary design: separates business logic from infrastructure, identifies actor-coupling risks via SRP, and enforces inward-pointing dependency arrows for multi-component systems.
Ships in code-foundations. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Operates at SYSTEM level (layers, boundaries, components). For MODULE level (interface depth, information hiding), use aposd-designing-deep-modules.
"A module should be responsible to one, and only one, actor."
An actor is a group of users/stakeholders who request changes. If two actors share a class, a change for one can break the other.
// BEFORE: One class serves three actors
class Employee {
Money calculatePay() { } // CFO's accounting team
String reportHours() { } // COO's HR team
void save() { } // CTO's DBA team
}
// AFTER: Separate class per actor
class EmployeeData { /* just data */ }
class PayCalculator {
Money calculatePay(EmployeeData e) { /* CFO */ }
}
class HourReporter {
String reportHours(EmployeeData e) { /* COO */ }
}
class EmployeeSaver {
void saveEmployee(EmployeeData e) { /* CTO */ }
}
// Optional: Facade for convenience
class EmployeeFacade {
// Delegates to actor-specific classes
}
Test: For each class, ask "who requests changes to this?" If the answer is more than one actor, split.
Duplication across actor boundaries is safer than coupling.
If CFO's calculatePay and COO's reportHours both use the same regularHours helper, they appear duplicated — but they change for different reasons. Merging them couples two actors. When CFO's accounting rules change, COO's reports break.
Rule: DRY applies within a single actor's code. Across actors, prefer duplication over coupling.
Dependencies point inward: Frameworks → Adapters → Use Cases → Entities.
Nothing in an inner circle can know anything about an outer circle. Business rules never import database, UI, or framework code. If business logic needs to call infrastructure, define an interface in the business layer and implement it in the infrastructure layer (dependency inversion).
Pattern: interface defined in the business layer (where it's used), implemented in the infrastructure layer (dependency inversion).
// Business layer — interface lives here, no infrastructure imports
public interface OrderRepository { Order findById(String id); void save(Order order); }
// Infrastructure layer — concrete class implements the business interface
public class SqlOrderRepository implements OrderRepository { /* SQL */ }
The Use Case depends on OrderRepository (abstraction). The infrastructure layer depends on OrderRepository too — arrows point inward.
When applying to an existing system:
Adapt paths to your project's directory structure.
# Framework coupling in business logic
grep -r "import.*servlet\|import.*spring.*web\|import.*express" src/domain/
grep -r "import.*sql\|import.*mongoose\|import.*prisma" src/entities/
# ORM annotations in domain
grep -r "@Entity\|@Table\|@Column" src/domain/
# Type checking instead of polymorphism (scope to domain dirs, not all of src/)
grep -r "instanceof\|getType()\|typeof.*===" src/domain/ src/entities/
Fixing a detected violation in an existing system is a refactor — stage it with Skill(code-foundations:cc-refactoring-guidance).
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (ryanthedev/code-foundations) — no native marketplace selected
npx claudepluginhub p/ryanthedev-code-foundations20 skills in this plugin
/aposd-designing-deep-modulesGuides module and API design using APOSD principles: generates multiple design alternatives, compares them on information hiding and interface depth, and produces a documented design decision. For creating new module/API design; not for assessing existing designs (use aposd-reviewing-module-design) or routine-level design (use cc-routine-and-class-design)./aposd-reviewing-module-designAssesses existing module and interface design for complexity symptoms: information leakage, shallow interfaces, pass-through layers, and unknown unknowns. Produces a structured assessment — not transformations (use aposd-simplifying-complexity to edit) and not new-design generation (use aposd-designing-deep-modules)./aposd-simplifying-complexityTransforms complex code by applying APOSD's pull-complexity-downward principle: resolves error hierarchies, collapses configuration, and moves caller-side logic into modules. Produces edited code; not for assessment-only review (use aposd-reviewing-module-design) or designing new modules from scratch (use aposd-designing-deep-modules)./aposd-verifying-correctnessVerifies implementation completeness across functional correctness, error handling, concurrency, and security dimensions using APOSD's post-implementation checklist. Run after a coding task is nominally complete, not during active bug investigation (use cc-debugging)./cc-control-flow-qualityAudits and restructures control flow using Code Complete's nesting, cyclomatic complexity, loop design, guard-clause, and boolean simplification rules. Covers deep nesting, loop exit design, index naming, and callback chains. For statement-level flow inside a routine; not for routine/class structure (use cc-routine-and-class-design) or staging a broader refactor (use cc-refactoring-guidance)./cc-debuggingApplies Code Complete's scientific debugging method: STABILIZE → LOCATE → HYPOTHESIZE → EXPERIMENT → FIX → TEST → SEARCH. For active bug investigation, not QA process design or test coverage planning (use cc-quality-practices).Other plugins' skills for the same job