typescript-skills
Strict TypeScript coding standards for LlamaFarm projects.
Install
mkdir -p .claude/skills/typescript-skills && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1722" && unzip -o skill.zip -d .claude/skills/typescript-skills && rm skill.zipInstalls to .claude/skills/typescript-skills
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Shared TypeScript best practices for Designer and Electron subsystems.Key capabilities
- →Enforce strict TypeScript patterns
- →Implement Electron IPC types
- →Generate React components
- →Apply null safety checks
- →Define interface-based object shapes
How it works
The skill applies predefined TypeScript configurations and patterns to React and Electron subsystems. It enforces strict mode, explicit return types, and interface-based typing.
Inputs & outputs
When to use typescript-skills
- →Apply strict typing patterns
- →Generate React components
- →Implement Electron IPC types
About this skill
TypeScript Skills for LlamaFarm
Shared TypeScript best practices for Designer (React) and Electron App subsystems.
Overview
This skill covers idiomatic TypeScript patterns for LlamaFarm's frontend applications:
- designer/: React 18 + TanStack Query + TailwindCSS + Radix UI
- electron-app/: Electron 28 + Electron Vite
Tech Stack
| Subsystem | Framework | Build | Key Libraries |
|---|---|---|---|
| designer | React 18 | Vite | TanStack Query, Radix UI, axios, react-router-dom |
| electron-app | Electron 28 | electron-vite | electron-updater, axios |
Configuration
Both projects use strict TypeScript:
{
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
}
Core Principles
- Strict mode always - Never use
anywithout explicit justification - Prefer interfaces - Use
interfacefor object shapes,typefor unions/intersections - Explicit return types - Always type public function returns
- Immutability - Use
readonlyandas constwhere applicable - Null safety - Handle null/undefined explicitly, avoid non-null assertions
Related Documents
- patterns.md - Idiomatic TypeScript patterns
- typing.md - Strict typing, generics, utility types
- testing.md - Vitest and testing patterns
- security.md - XSS prevention, input validation
Quick Reference
React Component Pattern
interface Props {
readonly title: string
readonly onAction?: () => void
}
function MyComponent({ title, onAction }: Props): JSX.Element {
return <button onClick={onAction}>{title}</button>
}
TanStack Query Hook Pattern
export const projectKeys = {
all: ['projects'] as const,
lists: () => [...projectKeys.all, 'list'] as const,
detail: (id: string) => [...projectKeys.all, 'detail', id] as const,
}
export function useProject(id: string) {
return useQuery({
queryKey: projectKeys.detail(id),
queryFn: () => fetchProject(id),
enabled: !!id,
})
}
Error Class Pattern
export class ApiError extends Error {
constructor(
message: string,
public readonly status: number,
public readonly response?: unknown
) {
super(message)
this.name = 'ApiError'
}
}
Checklist Summary
| Category | Critical | High | Medium | Low |
|---|---|---|---|---|
| Typing | 3 | 4 | 2 | 1 |
| Patterns | 2 | 3 | 3 | 2 |
| Testing | 2 | 3 | 2 | 1 |
| Security | 4 | 2 | 1 | 0 |
When not to use it
- →Projects not using React or Electron
- →Codebases requiring loose typing
Prerequisites
Limitations
- →Restricted to React and Electron subsystems
- →Requires strict mode compliance
How it compares
Unlike manual coding, this skill enforces specific LlamaFarm-approved patterns and strict configuration defaults automatically.
Compared to similar skills
typescript-skills side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| typescript-skills (this skill) | 3 | 6mo | Review | Intermediate |
| typescript | 28 | 2mo | No flags | Beginner |
| fullstack-guardian | 1 | 3mo | No flags | Advanced |
| react-patterns | 9 | 6mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by llama-farm
View all by llama-farm →You might also like
typescript
lobehub
TypeScript code style and optimization guidelines. Use when writing TypeScript code (.ts, .tsx, .mts files), reviewing code quality, or implementing type-safe patterns. Triggers on TypeScript development, type safety questions, or code style discussions.
fullstack-guardian
Jeffallan
Use when implementing features across frontend and backend, building APIs with UI, or creating end-to-end data flows. Invoke for feature implementation, API development, UI building, cross-stack work.
react-patterns
davila7
Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.
code-standards
redpanda-data
TypeScript, React, and JavaScript best practices enforced by Ultracite/Biome.
js-tosorted-immutable
TheOrcDev
Use toSorted() instead of sort() to avoid mutating arrays. Apply when sorting arrays that are React props, state, or otherwise shared/referenced elsewhere.
writing-react-effects
dust-tt
Writes React components without unnecessary useEffect. Use when creating/reviewing React components, refactoring effects, or when code uses useEffect to transform data or handle events.