code-style
БесплатноБез исполняемых скриптовНе проверенOak AI project TypeScript coding conventions including naming patterns (kebab-case files, PascalCase components, camelCase functions), component structure…
Об этом скилле
Code Style Guide
General Principles
- TypeScript: Strict types with noUncheckedIndexedAccess. Prefer explicit return types.
- Imports: Sorted: React → Third-party → Project → Relative
- Formatting: 2-space indents, 80 char width, double quotes, trailing commas
- Function style: Functional, declarative programming. Avoid classes.
- Organization: Modular architecture with clear separation of concerns
Naming Conventions
- Files/Directories: kebab-case (lowercase with dashes)
- Components: PascalCase
- Variables/Functions: camelCase
- Types/Interfaces: PascalCase
- Constants: UPPER_CASE for true constants, camelCase for config objects
- Hooks: Always prefix with "use" (e.g., useAnalytics)
Component Structure
- Component Pattern: Functional components with hooks
- Client Components: Add "use client" directive at the top of file
- File Organization:
- Exported component first
- Sub-components next
- Helper functions
- Type definitions at the end
State Management
- Global State: Zustand stores organized by domain
- Local State: React hooks (useState, useReducer)
- Remote State: tRPC queries and mutations with TanStack Query
Error Handling
- Promise Handling: Always await promises or use .catch() (enforced by no-floating-promises)
- Error Patterns:
- Early returns with guard clauses
- Structured error types
- User-friendly error messages
- Proper logging
- Error Cause: When rethrowing errors, use the
causeoption for better error context:throw new Error("High-level error message", { cause: originalError });
tRPC Implementation
- Router Organization: By domain/feature
- Procedure Types: Query for read, Mutation for write operations
- Error Handling: Consistent error responses
- Middleware: Authentication, rate limiting, etc.
Testing Patterns
- Unit Tests: Jest for utilities and hooks
- Component Tests: React Testing Library
- E2E Tests: Playwright
- Mocking: Mock external dependencies appropriately
Установить code-style в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл code-style?
Oak AI project TypeScript coding conventions including naming patterns (kebab-case files, PascalCase components, camelCase functions), component structure, error handling with cause, state management patterns, and tRPC implementation. Use when writing, reviewing, or refactoring code.
Как установить скилл code-style?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл code-style запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic