grey-haven-plugins/developer-experience/skills/code-style/SKILL.md
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.
npx skillsauth add greyhaven-ai/claude-code-config code-styleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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")development
Grey Haven's comprehensive testing strategy - Vitest unit/integration/e2e for TypeScript, pytest markers for Python, >80% coverage requirement, fixture patterns, and Doppler for test environments. Use when writing tests, setting up test infrastructure, running tests, debugging test failures, improving coverage, configuring CI/CD, or when user mentions 'test', 'testing', 'pytest', 'vitest', 'coverage', 'TDD', 'test-driven development', 'unit test', 'integration test', 'e2e', 'end-to-end', 'test fixtures', 'mocking', 'test setup', 'CI testing'.
development
Comprehensive test suite generation with unit tests, integration tests, edge cases, and error handling. Use when generating tests for existing code, improving coverage, or creating systematic test suites. Triggers: 'generate tests', 'add tests', 'test coverage', 'write tests for', 'create test suite'.
development
Specialized testing for React applications using TanStack ecosystem (Query, Router, Table, Form) with Vite and Vitest. Use when testing React + TanStack apps, mocking server state, testing router, or validating query behavior. Triggers: 'TanStack testing', 'React Query testing', 'test TanStack', 'mock query', 'router test'.
development
Apply Grey Haven's TanStack ecosystem patterns - Router file-based routing, Query data fetching with staleTime, and Start server functions. Use when building React applications with TanStack Start. Triggers: 'TanStack', 'TanStack Start', 'TanStack Query', 'TanStack Router', 'React Query', 'file-based routing', 'server functions'.