separation-of-concerns

Detect mixed responsibilities across presentation, domain, and infrastructure in TypeScript/React projects.

Updated Feb 5, 2026
One-click install
npx skills add https://github.com/benaor/Virtus --skill separation-of-concerns-benaor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: separation-of-concerns
Source: https://github.com/benaor/Virtus/tree/main/.claude/skills/design-principles/SEPARATION-OF-CONCERNS
Command: npx skills add https://github.com/benaor/Virtus --skill separation-of-concerns-benaor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Separation of concerns is essential to maintainable code; this skill helps teams identify and refactor code so that UI/presentation, domain/business logic, and data access responsibilities are distinctly separated, improving modularity and testability.

Core Features & Use Cases

  • Guides you to separate UI/presentation, domain/business logic, and data access.
  • Provides layer dependency rules and checks to enforce clean architecture.
  • Demonstrates before/after refactoring with concrete domain, infrastructure, and presentation examples (see references/layers-example.md).

Quick Start

Review the references/layers-example.md and start moving business rules from the UI layer into domain use cases.

Frequently Asked Questions about separation-of-concerns

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

FAQPage Schema
How do I separate business logic from UI components in a TypeScript React project?

To separate business logic from UI components, move business rules from the presentation layer into domain use cases. This skill detects mixed responsibilities and guides modularization of UI, business logic, and data access during refactoring or code reviews.

What is clean architecture layer separation for domain, presentation, and infrastructure?

Clean architecture layer separation distinctly divides UI presentation, domain business logic, and data access infrastructure. This skill identifies and enforces these boundaries by providing layer dependency rules and checks to improve code modularity and testability.

How do I refactor a React component that contains mixed data access and business logic?

Refactor mixed React components by extracting data access into infrastructure modules and business rules into domain use cases. This skill provides before and after refactoring examples with concrete domain, infrastructure, and presentation layer separations.

What are common separation of concerns violations in TypeScript applications?

Common separation of concerns violations include UI components directly accessing databases or containing business rules. This skill outlines layer dependency rules and provides guidance for detecting these violations alongside clean modular solutions.

Can I use this separation of concerns approach for code reviews on existing TypeScript projects?

Yes, this approach applies to TypeScript and React projects undergoing code reviews. It detects mixed responsibilities across presentation, domain, and infrastructure layers, enabling modularization of UI, business logic, and data access.