typescript
TypeScript Guidelines
Standards and best practices for TypeScript development with modern tooling. Follow these guidelines when writing or modifying TypeScript code.
Design Principles
Apply DRY, KISS, and SOLID consistently. Prefer functional approaches where relevant; use classes for stateful behavior. Use composition over inheritance. Each module should have a single responsibility. Use dependency injection for class dependencies.
Code Style
- Naming: Descriptive yet concise names for variables, functions, and classes
- Documentation: JSDoc comments for public APIs, complex logic, and non-obvious design decisions
- Type annotations: Be explicit with typing to reduce inference time; avoid
anyunless necessary - Imports: Avoid barrel exports to prevent circular dependencies; prefer direct imports
Type Safety
- Strict TypeScript: Use strict mode with proper type definitions. Use type-safe patterns like Zod schemas for validation and type-safe DOM helpers where applicable.
- Avoid
any: Useunknowninstead ofanywhen the type is truly unknown. Narrow types appropriately.
More from siviter-xyz/dot-agent
create-skill
Guide for creating effective skills following best practices. Use when creating or updating skills that extend agent capabilities.
2.0Kcursor-best-practices
Best practices for working with Cursor. Use when learning how to effectively use Cursor features or optimizing your workflow.
511software-engineer
Core software engineering principles for code style, documentation, and development workflow. Applies when editing code, working in software repositories, or performing software development tasks.
375python
Python development guidelines and best practices. Use when working with Python code.
259create-agents-md
Create AGENTS.md files for project-specific inline rules. Use when adding small, project-specific instructions that should be committed in repos.
209frontend-engineer
Frontend development guidelines for React/TypeScript applications. Modern patterns including Suspense, lazy loading, useSuspenseQuery, file organization with features directory, MUI v7 styling, TanStack Router, performance optimization, and TypeScript best practices. Use when creating components, pages, features, fetching data, styling, routing, or working with frontend code.
197