Agent skill
typescript
Skill: typescript
Install this agent skill to your Project
npx add-skill https://github.com/FranciscoMoretti/chat-js/tree/main/apps/chat/.cursor/skills/typescript
SKILL.md
Typing Guidelines
- Avoid
anyat all cost. The types should work or they indicate a problem. - Never use
as "any"oras unknown asto solve/avoid type errors. The types should work or they indicate a problem. - Avoid using
asto cast to a specific type. The types should work or they indicate a problem.
Exports / Imports
- Never create index barrel files (index.ts, index.js)
- Always use direct imports with named exports
- Always use inline interfaces with function parameters
Examples
Good - Inline interface with function:
export function processData({
id,
name,
options,
}: {
id: string;
name: string;
options: ProcessingOptions;
}): ProcessedResult {
// implementation
}
Bad - Separated interface:
interface ProcessDataProps {
id: string;
name: string;
options: ProcessingOptions;
}
export function processDAta({
id,
name,
options,
}: ProcessDataProps): ProcessResult {
// Implementation
}
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ultracite
Skill: ultracite
trpc-patterns
Skill: trpc-patterns
lazy-prefetch-pattern
Skill: lazy-prefetch-pattern
react
Skill: react
chat-context
Skill: chat-context
ultracite
Skill: ultracite
Didn't find tool you were looking for?