Loading...
Loading...
Found 14 Skills
[Pragmatic DDD Architecture] Interactive guide for scaffolding and bootstrapping a new project or module from scratch. Use this skill when the user asks to start a new project or add a massive new feature. It instructs the agent to run an assessment wizard, define the PRD, evaluate serverless tech, and set up the foundation.
[Pragmatic DDD Architecture] How to structure **Use Cases** using DDD and Railway-Oriented Programming (neverthrow Result types). Tailored for TypeScript + drizzle-orm + node-postgres stack. **Use whenever creating or modifying any Use Case class — even simple ones like "Exists" or "List" operations — to ensure type-safe error unions, proper transactional boundaries, Value Object-only contracts, auth-first patterns, and Result-based error handling.** Includes references to working examples (Create, List, Exists patterns). Depends on 'repositories' skill.
[Pragmatic DDD Architecture] Guide for Authentication configuration and the `auth` Bounded Context. Use when modifying auth flows, adding social providers, configuring email templates/Resend, working with the Better Auth client/server configurations, or modifying `src/auth/` components and components dependent on session handling.
[Pragmatic DDD Architecture] Guide for creating DDD Repositories (Interfaces and Infrastructure). Use when creating repository contracts or implementing them using Drizzle ORM, Zod, and Postgres. Enforces completely typed transactions with Drizzle Transaction types (no 'unknown'), Result returns for Railway-oriented programming via neverthrow, and mapping pg node errors to domain errors. Fits our docker-compose / drizzle-kit standard testing workflow.
[Pragmatic DDD Architecture] Guide for creating tests. Use when creating unit tests, integration tests, or understanding test conventions. Covers our tightly coupled stack: Vitest (unit, integration, ui projects), file naming, transactional database integration tests (txTest) with testcontainers/node-postgres/drizzle, mock patterns (createMock*RepoWithAssertions), and neverthrow Result assertions.
[Pragmatic DDD Architecture] Guide for creating strictly typed Domain validation and infrastructure errors. Use when handling or creating new errors to ensure they conform to the Railway-oriented programming model (neverthrow Result), TypeScript error branding, and constructor parameter constraints. Covers co-location rules vs. shared domain error usage.
[Pragmatic DDD Architecture] Guide for Next.js 16 Proxy (formerly middleware), app router segments, layout composition, i18n URL localization, cookie management, and redirect strategies between public and protected routes. Use when updating proxy.ts, configuring public vs private environments, modifying the [locale] vs /dashboard routing structure, and appending headers.
[Pragmatic DDD Architecture] Guide for creating DDD Value Objects (VOs). Use when defining a new Value Object in a domain layer. Covers immutability patterns, private constructors, random/from builders, Railway-oriented error handling via neverthrow Result, TypeScript branded error types, and co-locating errors within the VO file.
[Pragmatic DDD Architecture] Guide for creating Next.js Server Actions exactly tied to zod, neverthrow, and the domain architecture. Use when creating or editing any file in presentation/actions/. Covers "use server" placement, unknown parameters validated with `zod`, discriminated union response types, auth-first pattern, Value Object validation with TypeScript narrowing, use-case error mapping via `assertNever`, serviceContainer invocation, and revalidation strategy.
[Pragmatic DDD Architecture] Guide for creating PostgreSQL tables and defining relations using Drizzle ORM. Use when creating new schemas, managing PostgreSQL indexes, enums, mapping column names to camelCase for the domain, and explicitly exporting constraint names.
[Pragmatic DDD Architecture] Guide for the overall project architecture, Domain-Driven Design (DDD) principles, Modular Monolith (Bounded Contexts) organization, and file structure. Use when deciding where to place a new file, creating a new module, or understanding the application's layers and dependency flow.
[Pragmatic DDD Architecture] Guide for creating DDD Entities and Aggregates. Use when defining new domain entities with business rules, private state, and getters. Covers entity instantiation via objects, integration with Value Objects, and the rule against using setters.