install
source · Clone the upstream repo
git clone https://github.com/rohitg00/skillkit
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/rohitg00/skillkit "$T" && mkdir -p ~/.claude/skills && cp -r "$T/packages/core/src/eval/__tests__/fixtures/good-skill" ~/.claude/skills/rohitg00-skillkit-typescript-best-practices && rm -rf "$T"
manifest:
packages/core/src/eval/__tests__/fixtures/good-skill/SKILL.mdsource content
TypeScript Best Practices
When to Use
Use this skill when:
- Writing new TypeScript code
- Reviewing TypeScript pull requests
- Refactoring JavaScript to TypeScript
Triggers
Activated when editing
.ts or .tsx files in the project.
Rules
Always
- Always use
for variables that won't be reassignedconst - Always use explicit return types on exported functions
- Always prefer
overinterface
for object shapestype
Never
- Never use
— useany
insteadunknown - Never use
— usevar
orconstlet - Never ignore TypeScript errors with
@ts-ignore
Examples
// Good: explicit return type export function calculateTotal(items: Item[]): number { return items.reduce((sum, item) => sum + item.price, 0); }
// Good: discriminated union type Result<T> = | { success: true; data: T } | { success: false; error: Error };
Boundaries
- Do not modify
without explicit permissiontsconfig.json - Do not add new dependencies without checking existing utilities
- Focus only on TypeScript patterns, not runtime behavior