🎯

typescript-skills

🎯Skill

from llama-farm/llamafarm

VibeIndex|
What it does

Enforces strict TypeScript best practices for React and Electron frontend applications, ensuring type safety, immutability, and clean code patterns.

typescript-skills

Installation

Install skill:
npx skills add https://github.com/llama-farm/llamafarm --skill typescript-skills
9
Last UpdatedJan 26, 2026

Skill Details

SKILL.md

Shared TypeScript best practices for Designer and Electron subsystems.

Overview

# 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:

```json

{

"strict": true,

"noUnusedLocals": true,

"noUnusedParameters": true,

"noFallthroughCasesInSwitch": true

}

```

Core Principles

  1. Strict mode always - Never use any without explicit justification
  2. Prefer interfaces - Use interface for object shapes, type for unions/intersections
  3. Explicit return types - Always type public function returns
  4. Immutability - Use readonly and as const where applicable
  5. Null safety - Handle null/undefined explicitly, avoid non-null assertions

Related Documents

  • [patterns.md](./patterns.md) - Idiomatic TypeScript patterns
  • [typing.md](./typing.md) - Strict typing, generics, utility types
  • [testing.md](./testing.md) - Vitest and testing patterns
  • [security.md](./security.md) - XSS prevention, input validation

Quick Reference

React Component Pattern

```tsx

interface Props {

readonly title: string

readonly onAction?: () => void

}

function MyComponent({ title, onAction }: Props): JSX.Element {

return

}

```

TanStack Query Hook Pattern

```typescript

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

```typescript

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 |

More from this repository10

🎯
rag-skills🎯Skill

Implements robust RAG document processing and retrieval using LlamaIndex, ChromaDB, and Celery for efficient, scalable AI document workflows.

🎯
generate-subsystem-skills🎯Skill

Generates specialized Claude Code skills for each subsystem, creating shared language and subsystem-specific checklists to optimize AI code generation across the monorepo.

🎯
common-skills🎯Skill

Manages shared Python utilities for LlamaFarm, focusing on HuggingFace model handling, GGUF file management, and cross-service consistency.

🎯
electron-skills🎯Skill

Configures secure Electron desktop application architecture with isolated processes, type-safe IPC, and cross-platform packaging for LlamaFarm.

🎯
go-skills🎯Skill

Enforces Go best practices and idiomatic patterns for secure, maintainable LlamaFarm CLI development.

🎯
cli-skills🎯Skill

Provides comprehensive Go CLI development guidelines using Cobra, Bubbletea, and Lipgloss for creating robust, interactive command-line interfaces in LlamaFarm projects.

🎯
commit-push-pr🎯Skill

Automates git workflow by committing changes, pushing to GitHub, and opening a PR with intelligent checks and handling of edge cases.

🎯
python-skills🎯Skill

Provides comprehensive Python best practices and code review guidelines for ensuring high-quality, secure, and maintainable code across LlamaFarm's Python components.

🎯
temp-files🎯Skill

Generates temporary files in a structured system directory, ensuring clean organization and easy tracking of generated reports and logs.

🎯
server-skills🎯Skill

Provides server-side best practices and code review guidelines for FastAPI, Celery, and Pydantic frameworks in Python.