Agent skill
vendix-naming-conventions
Project naming conventions.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/vendix-naming-conventions
Metadata
Additional technical details for this skill
- scope
-
[ "root" ] - auto invoke
- Writing Code (Naming)
SKILL.md
Vendix Naming Conventions
CRITICAL SKILL - ALWAYS ACTIVE - Las convenciones de nombres son la PRIORIDAD ABSOLUTA. CUALQUIER violaciΓ³n es un BUG CRΓTICO.
π¨ CRITICAL RULE - ZERO TOLERANCE
YOU MUST ENFORCE THESE NAMING CONVENTIONS WITHOUT EXCEPTION:
| Type | Convention | Example | β WRONG |
|---|---|---|---|
| Variables | snake_case |
user_name, order_total, is_active |
userName, order-total |
| Functions | CamelCase |
getUserData(), calculateOrderTotal() |
get_user_data(), GetUserData() |
| Classes | PascalCase |
UserService, OrderService |
userService, user_service |
| Interfaces | PascalCase |
UserProfile, ApiResponse |
userProfile, api_response |
| Constants | SCREAMING_SNAKE_CASE |
MAX_RETRIES, DEFAULT_TIMEOUT |
maxRetries, default_timeout |
| Enums | PascalCase |
UserRole, OrderStatus |
userRole, order_status |
| Enum Values | snake_case |
ADMIN, PENDING |
Admin, Pending |
| Files | kebab-case |
user.service.ts, order.controller.ts |
userService.ts, Order.service.ts |
| Folders | kebab-case |
user-management/, order-processing/ |
userManagement/, order_processing/ |
metadata: scope: [root] auto_invoke: "Any Code Change"
π Detailed Rules
1. Variables - snake_case (MANDATORY)
β CORRECT:
const user_name = 'John';
const order_total = 99.99;
const is_active = true;
const client_info = { ip_address: '192.168.1.1' };
const product_list = [];
β WRONG:
const userName = 'John'; // β camelCase
const orderTotal = 99.99; // β camelCase
const isActive = true; // β camelCase
const clientInfo = { ... }; // β camelCase
WHY: Readability, team collaboration, automated tools, type inference.
2. Functions - CamelCase (MANDATORY)
β CORRECT:
function getUserData() { }
function calculateOrderTotal() { }
function validateStoreAccess(user_store_id?: number) { }
function generateSlug(text: string) { }
async function registerOwner(registerOwnerDto: RegisterOwnerDto) { }
β WRONG:
function get_user_data() { } // β snake_case
function CalculateOrderTotal() { } // β PascalCase
function ValidateStoreAccess() { } // β PascalCase
3. Classes - PascalCase (MANDATORY)
β CORRECT:
export class UserService { }
export class OrderService { }
export class RequestContextService { }
export class AuthGuard implements CanActivate { }
export class ProductListComponent { }
β WRONG:
export class userService { } // β camelCase
export class order_service { } // β snake_case
export class AUTH_GUARD { } // β SCREAMING_SNAKE_CASE
4. Interfaces - PascalCase (MANDATORY)
β CORRECT:
export interface UserProfile { }
export interface ApiResponse<T> { }
export interface AuthenticatedRequest extends Request { }
export interface CreateUserDto { }
β WRONG:
export interface userProfile { } // β camelCase
export interface API_response { } // β snake_case
export interface ICreateUserDto { } // β No 'I' prefix needed
5. Constants - SCREAMING_SNAKE_CASE (MANDATORY)
β CORRECT:
const MAX_RETRIES = 3;
const DEFAULT_TIMEOUT = 5000;
const API_BASE_URL = 'https://api.vendix.com';
const DB_CONNECTION_POOL_SIZE = 10;
β WRONG:
const maxRetries = 3; // β camelCase
const default_timeout = 5000; // β snake_case
const apiBaseUrl = '...'; // β camelCase
6. Enums - PascalCase (values: snake_case)
β CORRECT:
enum UserRole {
ADMIN = 'admin',
USER = 'user',
SUPER_ADMIN = 'super_admin',
}
enum OrderStatus {
PENDING = 'pending',
PROCESSING = 'processing',
COMPLETED = 'completed',
}
β WRONG:
enum userRole { } // β camelCase
enum user_role { } // β snake_case
enum UserRole {
Admin = 'admin', // β PascalCase values
SuperAdmin = 'super_admin', // β Inconsistent
}
7. Files - kebab-case (MANDATORY)
β CORRECT:
user.service.ts
order.controller.ts
auth.guard.ts
product-list.component.ts
request-context.service.ts
domain-resolver.middleware.ts
β WRONG:
userService.ts // β camelCase
order.service.ts // β Mixed case
Auth.Guard.ts // β PascalCase
productList.component.ts // β camelCase
8. Folders - kebab-case (MANDATORY)
β CORRECT:
user-management/
order-processing/
auth-module/
product-list/
shared-components/
domain-resolver/
β WRONG:
userManagement/ // β camelCase
order_processing/ // β snake_case
AuthModule/ // β PascalCase
sharedComponents/ // β camelCase
π Special Cases
Database Tables - snake_case
model users { } // β
CORRECTO
model product_variants { } // β
CORRECTO
model sales_order_items { } // β
CORRECTO
model Users { } // β WRONG
model ProductVariants { } // β WRONG
model salesOrderItems { } // β WRONG
Database Columns - snake_case
model users {
id Int // β
CORRECTO
organization_id Int // β
CORRECTO
main_store_id Int? // β
CORRECTO
created_at DateTime // β
CORRECTO
}
API Endpoints - kebab-case
// β
CORRECTO
@Controller('user-management')
@Get('user-profile')
@Post('create-order')
// β WRONG
@Controller('userManagement') // β camelCase
@Get('userProfile') // β camelCase
Component Selectors - kebab-case with app- prefix
// β
CORRECTO
@Component({
selector: 'app-user-profile',
selector: 'app-product-list',
selector: 'app-order-summary',
})
// β WRONG
selector: 'userProfile' // β camelCase
selector: 'appUserProfile' // β camelCase without hyphen
selector: 'user-profile' // β Missing app- prefix
π― Quick Checklist
Before committing code, verify:
- All variables use
snake_case - All functions use
CamelCase - All classes use
PascalCase - All interfaces use
PascalCase - All constants use
SCREAMING_SNAKE_CASE - All files use
kebab-case - All folders use
kebab-case - All enum values use
snake_case - All DB tables use
snake_case - All DB columns use
snake_case - All component selectors use
app-kebab-case
π΄ YOUR RESPONSIBILITY
YOU MUST:
- β Double-check variable names BEFORE writing code
- β Immediately fix ANY naming violation you encounter
- β Flag violations as CRITICAL bugs
- β Reinforce conventions in every interaction
- β NEVER compromise naming conventions for ANY reason
TREAT NAMING VIOLATIONS AS CRITICAL BUGS THAT REQUIRE IMMEDIATE ATTENTION
Related Skills
vendix-development-rules- General development rulesvendix-build-verification- Build verification workflowvendix-backend-domain- Backend naming patternsvendix-frontend-component- Frontend component patterns
Didn't find tool you were looking for?