skills/vertical-slice-architecture/SKILL.md
Enforce Vertical Slice Architecture (VSA) when building applications in any language (Go, .NET/C#, Java, Kotlin, TypeScript, Python, etc.) and any type (web API, mobile backend, CLI, event-driven). Organize code by feature/use-case instead of technical layers. Each feature is a self-contained vertical slice with a single entry point that receives the router/framework handle and its dependencies. Use when the user says "vertical slice architecture", "VSA", "organize by feature", "feature-based architecture", "slice architecture", or when building a new app or feature and the project already follows VSA conventions. Also use when reviewing or refactoring code to align with VSA principles.
npx skillsauth add mryll/skills vertical-slice-architectureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Setup, RegisterRoute, Map); the role is the invariant, not the name.{project}/
features/ # or internal/features/ (Go), Features/ (.NET)
{domain}/ # orders/, users/, kvs/
{operation}/ # create/, list/, delete/
handler # Single entry point + orchestration
request/response # DTOs
validator # Input validation (optional)
test # Co-located integration test
internal/ # Feature-private helpers (optional)
platform/ # or Infrastructure/ — shared cross-cutting concerns
middleware/ # Auth, error handling, idempotency
database/ # Connection pooling, circuit breakers
observability/ # Metrics, tracing, structured logging
opqueue/ # Operation queues, outbox patterns (if needed)
main # Composition root wires features + infrastructure
features/{domain}/{operation}/main)Place in platform/ (not inside a feature). Examples:
Only extract when genuine duplication emerges across multiple slices (use judgment — the "3+ slices" heuristic is guidance, not a hard rule):
platform/httpx/Detect the project's language/framework and consult the appropriate reference:
Every feature exposes one primary setup/registration function. Internal types stay private. The entry point name is conventional — the invariant is: one public function per feature that wires the slice to the framework.
Setup or RegisterRoute; signature func Setup(r gin.IRoutes, repo Repository); DI via explicit params.Map (static); signature static void Map(IEndpointRouteBuilder app); DI container resolves deps in handler.@RestController class discovered by component scan; Spring DI (constructor injection).setup; signature function setup(router: Router, db: Database): void; DI via explicit params.setup; signature def setup(router: APIRouter, db: Database) -> None; DI via explicit params or Depends().Exceptions: Versioned APIs may have SetupV1/SetupV2 wrappers sharing internal handler wiring. Frameworks with auto-discovery (Spring, NestJS) use the controller/module class itself as the entry point.
See references/testing.md for full testing strategy per language, including feature integration tests, platform/adapter tests, mock verification patterns, and test naming conventions.
tools
Explain anything — code, an error, a concept, or a non-technical topic — in the simplest, most plain-language way possible, ELI5-style, with a natural Río de la Plata (Argentine) voice that puts clarity first. Use ONLY when the user explicitly asks to have something dumbed down or simplified. Triggers (Spanish + English): 'explicámelo como si fuera de Boca' (or de River / de cualquier cuadro), 'explicámelo simple', 'explicalo fácil', 'más fácil', 'bajámelo un cambio', 'en criollo', 'como si tuviera 5 años', 'para tontos', 'ELI5', 'explain like I'm 5', 'dumb it down', 'in plain terms'. Optimized for technical material (code, architecture, tooling, errors) but the same method works for any topic. Do NOT use when the user wants full technical depth, a code review, or did not ask to simplify — this skill is for deliberate, on-request simplification, not for talking down to the user by default.
tools
Iterative non-code discussion between the local agent and Codex CLI on any open-ended topic: diet, fitness, writing, decisions, strategy, study plans, life choices, brainstorming. Orchestrates an automatic back-and-forth debate where both agents critique, propose alternatives, and iterate on the user's idea until reaching consensus. Codex CLI runs READ-ONLY, forms its own opinions, and normally does not navigate the filesystem unless the user provides file paths. Use when the user says discuss with codex, iterate with codex, consult codex, debate with codex, ask codex for a second opinion, get codex's take, or brainstorm with codex, including pasting or describing a plan, draft, idea, decision, or proposal and wanting a critical iterative review. Does NOT trigger on code review, plan-mode review of implementation plans, architecture discussions, or any technical software-engineering analysis; use codex-review for those.
development
Language-agnostic strategy for testing code at the boundary with external infrastructure (databases, APIs, queues): integration tests with real infrastructure (e.g. Testcontainers) prove the full chain works for happy paths; unit/slice tests with mocks prove error-handling and mapping logic (domain error to status, input validation, infra failure). Works in any language/framework — Go, .NET/C#, Java, Python, TypeScript and more — with concrete references for Go, .NET (ASP.NET Core) and Java (Spring Boot) and an explicit path to adapt when no reference matches your language. Apply when designing a test strategy, creating a handler/feature/worker that needs tests, or deciding what type of test a scenario needs. Triggers: 'dual testing', 'integration vs unit', 'testcontainers vs mocks', 'what type of test', 'where should this test go', 'error path coverage'. Does NOT trigger on writing individual test assertions or test naming conventions (use test-namer for those).
tools
Iterative code review and planning discussion between the local agent and Codex CLI. Orchestrates an automatic back-and-forth debate where both agents discuss findings, architecture decisions, or implementation plans until reaching consensus. Codex CLI runs READ-ONLY and never modifies files; model and reasoning effort come from the user's local Codex config. Supports plan mode: when the local agent has a plan ready, Codex evaluates and iterates on it before implementation, producing an updated consensus plan. Use when the user asks to review with codex, analyze with codex, discuss code with codex, iterate with codex, consult codex, ask codex, review the plan with codex, validate plan with codex, or any Codex CLI request for code review, architecture review, plan review, or implementation strategy. Does NOT trigger on non-code topics like diet, fitness, writing, life decisions, or general strategy; use codex-discuss for those.