// "Apply Grey Haven Studio's TypeScript/React and Python/FastAPI coding standards from production templates. Use when writing code, reviewing PRs, fixing linting errors, formatting files, or when the user mentions 'code standards', 'Grey Haven style', 'linting', 'Prettier', 'ESLint', 'Ruff', 'formatting rules', or 'coding conventions'. Includes exact Prettier/ESLint/Ruff configs, naming conventions, project structure, and multi-tenant database patterns."
| name | grey-haven-code-style |
| description | Apply Grey Haven Studio's TypeScript/React and Python/FastAPI coding standards from production templates. Use when writing code, reviewing PRs, fixing linting errors, formatting files, or when the user mentions 'code standards', 'Grey Haven style', 'linting', 'Prettier', 'ESLint', 'Ruff', 'formatting rules', or 'coding conventions'. Includes exact Prettier/ESLint/Ruff configs, naming conventions, project structure, and multi-tenant database patterns. |
Actual coding standards from Grey Haven Studio production templates.
Follow these exactly when working on Grey Haven codebases. This skill provides navigation to detailed examples, reference configs, and templates.
Based on cvi-template - TanStack Start + React 19
Key Settings:
any, unused vars)~/ maps to ./src/*Naming Conventions:
camelCase (getUserData, isAuthenticated)PascalCase (UserProfile, AuthProvider)UPPER_SNAKE_CASE (API_BASE_URL, MAX_RETRIES)PascalCase (User, AuthConfig)snake_case (user_id, created_at, tenant_id) โ ๏ธ CRITICALProject Structure:
src/
โโโ routes/ # File-based routing (TanStack Router)
โโโ lib/
โ โโโ components/ # UI components (grouped by feature)
โ โโโ server/ # Server functions and DB schema
โ โโโ config/ # Environment validation
โ โโโ hooks/ # Custom React hooks (use-* naming)
โ โโโ utils/ # Utility functions
โ โโโ types/ # TypeScript definitions
โโโ public/ # Static assets
Based on cvi-backend-template - FastAPI + SQLModel
Key Settings:
Naming Conventions:
snake_case (get_user_data, is_authenticated)PascalCase (UserRepository, AuthService)UPPER_SNAKE_CASE (API_BASE_URL, MAX_RETRIES)snake_case (user_id, created_at, tenant_id) โ ๏ธ CRITICALis_ or has_ (is_active, has_access)Project Structure:
app/
โโโ config/ # Application settings
โโโ db/
โ โโโ models/ # SQLModel entities
โ โโโ repositories/ # Repository pattern (tenant isolation)
โโโ routers/ # FastAPI endpoints
โโโ services/ # Business logic
โโโ schemas/ # Pydantic models (API contracts)
โโโ utils/ # Utilities
ALWAYS use snake_case for database column names - this is non-negotiable in Grey Haven projects.
โ Correct:
// TypeScript - Drizzle schema
export const users = pgTable("users", {
id: uuid("id").primaryKey(),
created_at: timestamp("created_at").defaultNow(),
tenant_id: uuid("tenant_id").notNull(),
email_address: text("email_address").notNull(),
is_active: boolean("is_active").default(true),
});
# Python - SQLModel
class User(SQLModel, table=True):
id: UUID = Field(default_factory=uuid4, primary_key=True)
created_at: datetime = Field(default_factory=datetime.utcnow)
tenant_id: UUID = Field(foreign_key="tenants.id", index=True)
email_address: str = Field(unique=True, index=True)
is_active: bool = Field(default=True)
โ Wrong:
// DON'T use camelCase in database schemas
export const users = pgTable("users", {
id: uuid("id"),
createdAt: timestamp("createdAt"), // WRONG!
tenantId: uuid("tenantId"), // WRONG!
emailAddress: text("emailAddress"), // WRONG!
});
See EXAMPLES.md for complete examples.
Every database table must include tenant isolation:
tenant_id (snake_case in DB) or tenantId (camelCase in TypeScript code)tenant_idSee EXAMPLES.md for implementation patterns.
โ ๏ธ ALWAYS activate virtual environment before running Python commands:
source .venv/bin/activate
Required for:
pytest)task test, task format)Use this skill when:
These standards come from actual Grey Haven production templates:
cvi-template (TanStack Start + React 19 + Drizzle)cvi-backend-template (FastAPI + SQLModel + PostgreSQL)When in doubt, reference these templates for patterns and configurations.
snake_case (both TypeScript and Python schemas)any type: ALLOWED in Grey Haven TypeScript (pragmatic approach)singleQuote: false)disallow_untyped_defs: true)tenant_id/tenantId~/ for TypeScript imports from src/trailingComma: "all")