
Detect and refactor Bloaters — code, methods, and classes that have grown too large. Trigger: When identifying Long Method, Large Class, Primitive Obsession, Long Parameter List, or Data Clumps.
Teaches and applies the Abstract Factory creational design pattern — producing families of related objects without specifying their concrete classes, ensuring product compatibility. Trigger: When creating families of related objects or enforcing product compatibility constraints.
Audit and improve web accessibility following WCAG 2.2 guidelines. Trigger: When asked to improve accessibility, a11y audit, WCAG compliance, screen reader support, keyboard navigation, or making components accessible.
Prisma CLI commands: init, generate, migrate, db push/pull, studio, and debug. Trigger: When running Prisma CLI commands, generating client, running migrations, or managing database state.
Prisma Client API: model queries, filters, operators, CRUD, relations, transactions, and client methods. Trigger: When writing Prisma queries, performing CRUD operations, filtering data, using transactions, or configuring Prisma Client.
Configure Prisma with PostgreSQL, MySQL, SQLite, MongoDB, and other providers. Trigger: When setting up a new Prisma project, changing database providers, or troubleshooting connection issues.
Detect and remove Dispensables — pointless and unneeded code elements. Trigger: When identifying Comments as deodorant, Duplicate Code, Lazy Class, Data Class, Dead Code, or Speculative Generality.
DomainError patterns and error codes for this SaaS platform. Trigger: When creating domain-specific errors, handling business rule violations, or mapping errors to HTTP responses.
Teaches and applies the Factory Method creational design pattern — providing an interface for creating objects in a superclass, allowing subclasses to decide which class to instantiate. Trigger: When decoupling object creation from usage or implementing extensible creation logic.
Create distinctive, production-grade frontend interfaces with high design quality. Trigger: When asked to build web components, pages, dashboards, React components, or when styling/beautifying any web UI.
Manage class hierarchies by pulling up, pushing down, extracting interfaces, and switching between inheritance and delegation. Trigger: When refactoring class hierarchies, extracting superclasses/interfaces, or resolving Liskov violations.
Monitor Nx Cloud CI pipeline and handle self-healing fixes. USE WHEN user says "monitor ci", "watch ci", "ci monitor", "watch ci for this branch", "track ci", "check ci status", wants to track CI status, or needs help with self-healing CI fixes. Prefer this skill over native CI provider tools (gh, glab, etc.) for CI monitoring — it integrates with Nx Cloud self-healing which those tools cannot access.
NestJS best practices and architecture patterns for building production-ready applications. Trigger: When writing, reviewing, or refactoring NestJS code — modules, DI, security, performance, testing.
Domain layer patterns (DDD) for NestJS services in this SaaS platform. Trigger: When creating domain entities, value objects, repository interfaces, or pure use cases.
Explore and understand Nx workspaces. USE WHEN answering questions about the workspace, projects, or tasks. ALSO USE WHEN an nx command fails or you need to check available targets/configuration before running a task. EXAMPLES: 'What projects are in this workspace?', 'How is project X configured?', 'What depends on library Y?', 'What targets can I run?', 'Cannot find configuration for task', 'debug nx task failure'.
Identify and implement correct relationships between classes: Dependency, Association, Aggregation, and Composition. Trigger: When designing class structures, reviewing coupling, or deciding between inheritance and composition.
Improve data handling by encapsulating fields, replacing primitives with objects, and managing type codes. Trigger: When refactoring primitive obsession, encapsulating public fields/collections, or replacing magic numbers.
Teaches and applies the Adapter structural design pattern — allowing objects with incompatible interfaces to collaborate by wrapping one interface into another. Trigger: When integrating third-party libraries, legacy code, or incompatible interfaces.
Teaches and applies the Bridge structural design pattern — splitting a large class into two separate hierarchies (abstraction and implementation) that evolve independently. Trigger: When separating platform-independent abstractions from platform-specific implementations.
Teaches and applies the Builder creational design pattern — constructing complex objects step by step, allowing different representations using the same construction process. Trigger: When building complex objects with many optional parameters or multi-step construction.
Teaches and applies the Chain of Responsibility behavioral design pattern — passing requests along a chain of handlers where each handler decides to process or forward. Trigger: When implementing request handling pipelines, middleware chains, or event propagation.
Teaches and applies the Command behavioral design pattern — encapsulating requests as objects to support parameterization, queuing, logging, and undo/redo operations. Trigger: When implementing undoable operations, task queues, or action history.
Teaches and applies the Decorator structural design pattern — attaching new behaviors to objects dynamically by wrapping them inside decorator objects. Trigger: When adding responsibilities to objects at runtime without modifying their class.
Teaches and applies the Facade structural design pattern — providing a simplified interface to a complex subsystem, library, or framework. Trigger: When simplifying access to complex APIs or hiding subsystem complexity.
Teaches and applies the Flyweight structural design pattern — minimizing memory usage by sharing common state between multiple fine-grained objects. Trigger: When dealing with large numbers of similar objects consuming too much memory.
Teaches and applies the Iterator behavioral design pattern — providing sequential access to elements of a collection without exposing its internal representation. Trigger: When traversing complex data structures or building custom collection iterators.
Teaches and applies the Memento behavioral design pattern — capturing and externalizing an object's internal state without violating encapsulation, enabling state restoration. Trigger: When implementing undo/redo, snapshots, or state history features.
Teaches and applies the Observer behavioral design pattern — defining a subscription mechanism to notify multiple objects about events in the observed object. Trigger: When implementing event-driven systems, reactive updates, or pub/sub mechanisms.
Teaches and applies the Proxy structural design pattern — providing a substitute for another object to control access, add lazy loading, logging, or caching. Trigger: When controlling access to objects, adding cross-cutting concerns, or lazy loading.
Prisma Postgres: setup via Console, create-db CLI, Management API, and SDK for provisioning and integration. Trigger: When creating Prisma Postgres databases, provisioning with create-db, or using the Management API.
Optimize for search engine visibility and ranking. Trigger: When asked to improve SEO, optimize for search, fix meta tags, add structured data, or sitemap optimization.
Streamline complex conditional logic using guard clauses, decomposition, and polymorphism. Trigger: When simplifying nested conditionals, replacing switch/if-else chains, or introducing guard clauses.
Syncs skill metadata to AGENTS.md Auto-invoke sections across the NX monorepo. Trigger: When creating or modifying a skill, updating metadata.scope/metadata.auto_invoke, or regenerating Auto-invoke tables.
Manage refactoring as a strategic process — when to refactor, how to prioritize debt, and how to do it safely. Trigger: When planning a refactoring initiative, communicating technical debt, or deciding what to clean up first.
Tailwind CSS utility-first styling patterns including responsive design, layout, flexbox, grid, and design system patterns. Trigger: When styling React components, building responsive layouts, implementing design systems, or using Tailwind v4.
Test-Driven Development workflow for this NX monorepo (React frontend + NestJS backend). Trigger: ALWAYS when implementing features, fixing bugs, or refactoring - regardless of component. This is a MANDATORY workflow, not optional.
Testing patterns for this SaaS platform — Object Mothers, AAA, coverage requirements. Trigger: When writing unit tests for use cases, domain entities, helpers, or React components.
TypeScript 6 strict patterns and best practices for this NX monorepo. Trigger: When implementing or refactoring TypeScript in .ts/.tsx (types, interfaces, generics, const maps, type guards, removing any, tightening unknown, declarative naming, RO-RO, guard clauses).
TypeScript advanced type system: generics, conditional types, mapped types, template literals, and utility types. Trigger: When implementing complex type logic, creating reusable type utilities, or building type-safe abstractions.
Document architecture using UML class diagrams with Mermaid. Trigger: When generating or interpreting class diagrams, mapping TypeScript classes to UML, or documenting object relationships.
Document object interactions over time using UML Sequence Diagrams with Mermaid. Trigger: When documenting behavioral patterns, message flows, or interactions between objects/services.
Vitest unit testing patterns with React Testing Library. Trigger: When writing unit tests for React components, hooks, or utilities.
Zustand 5 state management patterns. Trigger: When implementing client-side state with Zustand (stores, selectors, persist middleware, slices).
Teaches and applies the Prototype creational design pattern — cloning existing objects without making code dependent on their classes, delegating cloning to the objects themselves. Trigger: When creating copies of complex objects or avoiding expensive re-initialization.
Generate code using nx generators. INVOKE IMMEDIATELY when user mentions scaffolding, setup, structure, creating apps/libs, or setting up project structure. Trigger words - scaffold, setup, create a ... app, create a ... lib, project structure, generate, add a new project. ALWAYS use this BEFORE calling nx_docs or exploring - this skill handles discovery internally.
Detect and refactor Change Preventers — flaws that hinder software evolution. Trigger: When identifying Divergent Change, Shotgun Surgery, or Parallel Inheritance Hierarchies.
Detect and refactor Couplers — excessive coupling or over-delegation between classes. Trigger: When identifying Feature Envy, Inappropriate Intimacy, Message Chains, or Middle Man.
Detect and refactor OO Abusers — incorrect or incomplete application of OOP principles. Trigger: When identifying Switch Statements, Temporary Fields, Refused Bequest, or Alternative Classes with Different Interfaces.
Teaches and applies the Mediator behavioral design pattern — reducing direct dependencies between objects by forcing them to communicate only through a mediator. Trigger: When decoupling tightly coupled components or implementing event buses.
Teaches and applies the State behavioral design pattern — allowing an object to alter its behavior when its internal state changes, appearing as if the object changed its class. Trigger: When implementing finite state machines, workflow states, or mode-based behavior.
Teaches and applies the Visitor behavioral design pattern — separating an algorithm from the object structure it operates on, enabling new operations without modifying existing classes. Trigger: When adding operations to a stable class hierarchy without modifying those classes.
Extend third-party libraries safely without modifying their source using Foreign Methods or Local Extensions. Trigger: When a library class lacks a needed method and cannot be modified directly.
Find and add Nx plugins. USE WHEN user wants to discover available plugins, install a new plugin, or add support for a specific framework or technology to the workspace.
Import, merge, or combine repositories into an Nx workspace using nx import. USE WHEN the user asks to adopt Nx across repos, move projects into a monorepo, or bring code/history from another repository.
Evaluate and apply SOLID principles: SRP, OCP, LSP, ISP, DIP. Trigger: When reviewing architecture for maintainability, designing new modules, or refactoring toward cleaner dependencies.
Node.js architecture decision-making: framework selection, async patterns, security, and deployment. Trigger: When making Node.js architecture decisions, choosing async patterns, or applying security best practices.
Safely redistribute functionality among classes — move methods/fields, extract/inline classes, hide delegates. Trigger: When redistributing responsibilities, improving class cohesion, or reducing coupling between objects.
Comprehensive Playwright E2E testing: Page Object Model, CI/CD, accessibility, performance, mocking, and advanced patterns. Trigger: When writing Playwright E2E tests, fixing flaky tests, configuring CI, or implementing POM.
React 19 component patterns for the admin dashboard and customer app. Trigger: When creating React components, hooks, forms, data fetching with React Query, or client state with Zustand.
Creates new AI agent skills for the SaaS Business Platform project. Trigger: When user asks to create a new skill, add agent instructions, or document patterns for AI.
Teaches and applies the Template Method behavioral design pattern — defining the skeleton of an algorithm in a superclass while letting subclasses override specific steps. Trigger: When defining invariant algorithm structure with customizable steps in subclasses.
Teaches and applies the Composite structural design pattern — composing objects into tree structures to represent part-whole hierarchies, treating individual and composite objects uniformly. Trigger: When working with tree hierarchies, nested components, or recursive structures.
Apply core OOP design principles: Encapsulate What Varies, Program to an Interface, Favor Composition over Inheritance. Trigger: When designing extensible systems, refactoring brittle hierarchies, or evaluating coupling.
NestJS modular architecture patterns for this SaaS platform. Trigger: When creating NestJS modules, controllers, services, guards, interceptors, pipes, or providers.
Link workspace packages in monorepos (npm, yarn, pnpm, bun). USE WHEN: (1) you just created or generated new packages and need to wire up their dependencies, (2) user imports from a sibling package and needs to add it as a dependency, (3) you get resolution errors for workspace packages (@org/*) like "cannot find module", "failed to resolve import", "TS2307", or "cannot resolve". DO NOT patch around with tsconfig paths or manual package.json edits - use the package manager's workspace commands to fix actual linking.
Design software using the four OOP pillars: Abstraction, Encapsulation, Inheritance, and Polymorphism. Trigger: When evaluating class design, replacing switch statements with polymorphism, or designing class hierarchies.
React composition patterns that scale: compound components, render props, context providers, React 19 APIs. Trigger: When refactoring components with boolean prop proliferation, building flexible component APIs, or using compound components.
React and Next.js performance optimization: eliminating waterfalls, bundle size, re-render optimization, and server-side patterns. Trigger: When optimizing React component performance, data fetching waterfalls, bundle size, or implementing RSC patterns.
Streamline methods by extracting, inlining, and decomposing long or complex logic. Trigger: When methods are too long, contain complex expressions, or mix multiple levels of abstraction.
BFF API Gateway patterns for this SaaS platform — routing, aggregation, and forwarding to microservices. Trigger: When working on the API Gateway, implementing BFF routes, aggregating microservice responses, or handling cross-cutting concerns.
Improve method interfaces by renaming, separating queries from modifiers, and introducing parameter objects. Trigger: When cleaning up method signatures, implementing CQRS, or reducing parameter lists.
Identify, classify, communicate, and prioritize technical debt using the debt quadrant model. Trigger: When evaluating code quality, proposing refactors, or communicating the cost of shortcuts to stakeholders.
Vite 8 (Rolldown-powered) build tool configuration, plugin API, SSR, and migration guide. Trigger: When working with vite.config.ts, Vite plugins, building libraries, or SSR apps with Vite.
Zod 4 schema validation patterns. Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.
Build production-ready Node.js backend services with Fastify, middleware patterns, error handling, authentication, and API design. Trigger: When creating Node.js servers, REST APIs, or microservices beyond NestJS scope.
Generates comprehensive, workable unit tests for any programming language using a multi-agent pipeline. Use when asked to generate tests, write unit tests, improve test coverage, add test coverage, create test files, or test a codebase. Supports TypeScript, JavaScript, Go, Python, Rust, Java, and more.
Teaches and applies the Singleton creational design pattern — ensuring a class has only one instance while providing a global access point to it. Trigger: When managing shared resources like database connections, config, or caches.
Teaches and applies the Strategy behavioral design pattern — defining a family of algorithms, encapsulating each one, and making them interchangeable at runtime. Trigger: When implementing interchangeable algorithms, sorting strategies, or payment methods.
Helps with running tasks in an Nx workspace. USE WHEN the user wants to execute build, test, lint, serve, or run any other tasks defined in the workspace.