Global Coding Style
This Skill provides Claude Code with specific guidance on how it should handle global coding style.
When to use this skill:
- Writing or editing any .ts or .tsx files
- Creating new functions, variables, or type definitions
- Naming components, interfaces, or constants
- Organizing imports and file structure
- Defining animation timing or duration values
- Refactoring code for consistency
Instructions
- TypeScript Naming: Use camelCase for variables/functions (
getUserData, frameCount), PascalCase for types/interfaces/components (MonthlyRecap, RecapBook), UPPER_SNAKE_CASE for constants (VIDEO_CONFIG, FRAME_RATE)
- Automated Formatting: Use ESLint with TypeScript rules; 2-space indentation for .ts/.tsx files
- Path Aliases: Use
@/ prefix for imports from src/ (e.g., import { theme } from '@/lib/theme')
- Meaningful Names: Choose descriptive names that reveal intent; avoid abbreviations except for standard video terms (fps, codec, ssr)
- Small, Focused Functions: Keep functions small and focused; Remotion compositions should be modular sequences
- Frame-Based Timing: Always use frame numbers, not milliseconds (e.g.,
duration: 150 not duration: 5000)
- Remove Dead Code: Delete unused code, commented-out blocks, and imports rather than leaving them as clutter
- Backward compatibility only when required: Unless specifically instructed otherwise, assume you do not need to write additional code logic to handle backward compatibility
- DRY Principle: Extract reusable animations to
src/lib/animations.ts, reusable components to src/components/
Examples:
// Good: Frame-based, clear naming, path alias
import { fadeIn } from '@/lib/animations';
const INTRO_DURATION = 75; // frames at 30fps
export const IntroSequence: React.FC<{ startFrame: number }> = ({ startFrame }) => {
const opacity = fadeIn(frame, startFrame, 15);
return <div style={{ opacity }}>...</div>;
};
// Bad: Milliseconds, unclear naming, relative import
import { fadeIn } from '../../lib/animations';
const dur = 2500; // ms
export const intro = ({ start }) => {
const o = fadeIn(frame, start, 500);
return <div style={{ opacity: o }}>...</div>;
};
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: global-coding-style-53description: TypeScript and Remotion-specific coding style conventions for naming, formatting, and organization. Use this when writing any TypeScript code, creating new files, naming variables/functions/types, or structuring imports. Enforces frame-based timing and path alias usage. Use when this capability is needed.4---56# Global Coding Style78This Skill provides Claude Code with specific guidance on how it should handle global coding style.910## When to use this skill:1112- Writing or editing any .ts or .tsx files13- Creating new functions, variables, or type definitions14- Naming components, interfaces, or constants15- Organizing imports and file structure16- Defining animation timing or duration values17- Refactoring code for consistency1819## Instructions2021- **TypeScript Naming**: Use camelCase for variables/functions (`getUserData`, `frameCount`), PascalCase for types/interfaces/components (`MonthlyRecap`, `RecapBook`), UPPER_SNAKE_CASE for constants (`VIDEO_CONFIG`, `FRAME_RATE`)22- **Automated Formatting**: Use ESLint with TypeScript rules; 2-space indentation for .ts/.tsx files23- **Path Aliases**: Use `@/` prefix for imports from `src/` (e.g., `import { theme } from '@/lib/theme'`)24- **Meaningful Names**: Choose descriptive names that reveal intent; avoid abbreviations except for standard video terms (fps, codec, ssr)25- **Small, Focused Functions**: Keep functions small and focused; Remotion compositions should be modular sequences26- **Frame-Based Timing**: Always use frame numbers, not milliseconds (e.g., `duration: 150` not `duration: 5000`)27- **Remove Dead Code**: Delete unused code, commented-out blocks, and imports rather than leaving them as clutter28- **Backward compatibility only when required:** Unless specifically instructed otherwise, assume you do not need to write additional code logic to handle backward compatibility29- **DRY Principle**: Extract reusable animations to `src/lib/animations.ts`, reusable components to `src/components/`3031**Examples:**32```typescript33// Good: Frame-based, clear naming, path alias34import { fadeIn } from '@/lib/animations';35const INTRO_DURATION = 75; // frames at 30fps36export const IntroSequence: React.FC<{ startFrame: number }> = ({ startFrame }) => {37 const opacity = fadeIn(frame, startFrame, 15);38 return <div style={{ opacity }}>...</div>;39};4041// Bad: Milliseconds, unclear naming, relative import42import { fadeIn } from '../../lib/animations';43const dur = 2500; // ms44export const intro = ({ start }) => {45 const o = fadeIn(frame, start, 500);46 return <div style={{ opacity: o }}>...</div>;47};48```4950---51> Converted and distributed by [TomeVault](https://tomevault.io/claim/chad3814) — claim your Tome and manage your conversions.52<!-- tomevault:4.0:skill_md:2026-04-15 -->