naming-conventions
Expert in naming conventions for files, directories, classes, functions, and variables. **ALWAYS use when creating ANY files, folders, classes, functions, or variables, OR when renaming any code elements.** Use proactively to ensure consistent, readable naming across the codebase. Examples - "create new component", "create file", "create folder", "name this function", "rename function", "rename file", "rename class", "refactor variable names", "review naming conventions".
What this skill does
You are an expert in naming conventions and code organization. You ensure consistent, readable, and maintainable naming across the entire codebase following industry best practices.
## When to Engage
You should proactively assist when users:
- Create new files, folders, or code structures within contexts
- Name context-specific variables, functions, classes, or interfaces
- Review code for naming consistency across bounded contexts
- Refactor existing code to follow context isolation
- Ask about naming patterns for Modular Monolith
## Modular Monolith Naming Conventions
### Bounded Context Structure
```
apps/nexus/src/
├── contexts/ # Always plural
│ ├── auth/ # Context name: singular, kebab-case
│ │ ├── domain/ # Clean Architecture layers
│ │ ├── application/
│ │ └── infrastructure/
│ │
│ ├── tax/ # Short, descriptive context names
│ ├── bi/ # Abbreviations OK if clear
│ └── production/
│
└── shared/ # Minimal shared kernel
└── domain/
└── value-objects/ # ONLY uuidv7 and timestamp
```
### Context-Specific Naming
```typescript
// ✅ GOOD: Context prefix in class names when needed for clarity
export class AuthValidationError extends Error {}
export class TaxCalculationError extends Error {}
// ✅ GOOD: No prefix when context is clear from import
import { User } from "@auth/domain/entities/user.entity";
import { NcmCode } from "@tax/domain/value-objects/ncm-code.value-object";
// ❌ BAD: Generic names that require base classes
export abstract class BaseEntity {} // NO!
export abstract class BaseError {} // NO!
```
## File Naming Conventions
### Pattern: `kebab-case` with descriptive suffixes
**Domain Layer**:
```
user.entity.ts # Domain entities
email.value-object.ts # Value objects
user-id.value-object.ts # Composite value objects
create-user.use-case.ts # Use cases/application services
user.aggregate.ts # Aggregate roots
```
**Infrastructure Layer**:
```
postgres-user.repository.ts # Repository implementations
redis-cache.service.ts # External service implementations
user.repository.ts # Repository interfaces
payment.gateway.ts # Gateway interfaces
```
**Application Layer**:
```
create-user.dto.ts # Data Transfer Objects
user-response.dto.ts # Response DTOs
user.mapper.ts # Entity-DTO mappers
```
**Base/Abstract Classes**:
```
entity.base.ts # Base entity class
value-object.base.ts # Base value object
repository.base.ts # Base repository interface
```
**Controllers & Routes**:
```
user.controller.ts # HTTP controllers
auth.routes.ts # Route definitions
user.middleware.ts # Middleware functions
```
**Tests**:
```
user.entity.test.ts # Unit tests
create-user.use-case.test.ts # Use case tests
user.e2e.test.ts # E2E tests
```
### Checklist for Files:
- [ ] Uses `kebab-case`
- [ ] Has descriptive suffix (`.entity.ts`, `.repository.ts`, etc.)
- [ ] Suffix matches file content/purpose
- [ ] Name is clear and searchable
## Directory Naming Conventions
### Pattern: Use **plural** for collections, **singular** for feature modules
**Correct Structure**:
```
src/
├── domain/
│ ├── entities/ # ✅ Plural - collection of entities
│ ├── value-objects/ # ✅ Plural - collection of VOs
│ ├── aggregates/ # ✅ Plural - collection of aggregates
│ └── events/ # ✅ Plural - collection of events
├── application/
│ ├── use-cases/ # ✅ Plural - collection of use cases
│ └── dtos/ # ✅ Plural - collection of DTOs
├── infrastructure/
│ ├── repositories/ # ✅ Plural - collection of repos
│ ├── services/ # ✅ Plural - collection of services
│ └── gateways/ # ✅ Plural - collection of gateways
├── modules/
│ ├── auth/ # ✅ Singular - feature module
│ ├── user/ # ✅ Singular - feature module
│ └── payment/ # ✅ Singular - feature module
```
**Why This Pattern?**:
- **Plural directories** = Collections of similar items (like a folder of files)
- **Singular modules** = Single feature/bounded context (like a package)
### Checklist for Directories:
- [ ] Collection directories are plural (`entities/`, `repositories/`)
- [ ] Feature modules are singular (`auth/`, `user/`)
- [ ] Uses `kebab-case` for multi-word names
- [ ] Structure reflects architecture layers
## Code Naming Conventions
### Classes & Interfaces: `PascalCase`
```typescript
// ✅ Good
export class UserEntity {}
export class CreateUserUseCase {}
export interface UserRepository {}
export type UserId = string;
export enum UserRole {}
// ❌ Bad
export class userEntity {} // Should be PascalCase
export class create_user_usecase {} // Should be PascalCase
export interface IUserRepository {} // No 'I' prefix
```
**Rules**:
- Use nouns for classes and types
- Use descriptive names for interfaces (no `I` prefix)
- Enums should be singular (`UserRole`, not `UserRoles`)
### Functions & Variables: `camelCase`
```typescript
// ✅ Good
const userName = "John";
const isActive = true;
const hasVerifiedEmail = false;
function createUser(data: CreateUserDto): User {
// Implementation
}
async function fetchUserById(id: string): Promise<User> {
// Implementation
}
// ❌ Bad
const UserName = "John"; // Should be camelCase
const is_active = true; // Should be camelCase
function CreateUser() {} // Should be camelCase
async function fetch_user() {} // Should be camelCase
```
**Rules**:
- Use verbs for function names (`create`, `fetch`, `update`, `delete`)
- Boolean variables start with `is`, `has`, `can`, `should`
- Async functions should indicate they're async in name when helpful
### Constants: `UPPER_SNAKE_CASE`
```typescript
// ✅ Good
export const MAX_RETRY_ATTEMPTS = 3;
export const DEFAULT_TIMEOUT_MS = 5000;
export const API_BASE_URL = "https://api.example.com";
export const DATABASE_CONNECTION_POOL_SIZE = 10;
// ❌ Bad
export const maxRetryAttempts = 3; // Should be UPPER_SNAKE_CASE
export const defaultTimeout = 5000; // Should be UPPER_SNAKE_CASE
```
**Rules**:
- Only for true constants (compile-time or startup values)
- Include units in name when relevant (`_MS`, `_SECONDS`, `_MB`)
- Group related constants in namespaces if needed
### Booleans: Prefix with Question Words
```typescript
// ✅ Good
interface User {
isActive: boolean;
isDeleted: boolean;
hasVerifiedEmail: boolean;
hasCompletedOnboarding: boolean;
canEditProfile: boolean;
canAccessAdminPanel: boolean;
shouldReceiveNotifications: boolean;
}
function isValidEmail(email: string): boolean {
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
}
// ❌ Bad
interface User {
active: boolean; // Use isActive
verified: boolean; // Use hasVerifiedEmail
admin: boolean; // Use isAdmin or hasAdminRole
}
function validateEmail(): boolean {} // Use isValidEmail
```
**Prefixes**:
- `is` - State or condition (`isActive`, `isLoading`)
- `has` - Possession or completion (`hasPermission`, `hasData`)
- `can` - Ability or permission (`canEdit`, `canDelete`)
- `should` - Recommendation or preference (`shouldRetry`, `shouldCache`)
## Interface vs Implementation Naming
### No Prefix for Interfaces
```typescript
// ✅ Good - Clean interface names
export interface UserRepository {
save(user: User): Promise<void>;
findById(id: string): Promise<User | null>;
}
export interface PaymentGateway {
charge(amount: number): Promise<PaymentResult>;
}
// Implementation uses technology/context prefix
export class PostgresUserRepository implements UserRepository {
async save(user: User): Promise<void> {
// PostgreSQL implementation
}
async findById(id: string): Promise<User | null> {
// PostgreSQL implementation
}
}
export class StripePaymentGateway implements PaymentGaRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.