skills/writing-typescript/SKILL.md
Idiomatic TypeScript development. Use when writing TypeScript code, Node.js services, React apps, or discussing TS patterns. Emphasizes strict typing, composition, and modern tooling (bun/vite).
npx skillsauth add julianobarbosa/claude-code-skills writing-typescriptInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
any, prefer unknownbun # Runtime + package manager (fast)
vite # Frontend bundling
vitest # Testing
eslint # Linting
prettier # Formatting
function isUser(value: unknown): value is User {
return typeof value === "object" && value !== null && "id" in value;
}
type Result<T, E = Error> = { ok: true; value: T } | { ok: false; error: E };
function processResult<T>(result: Result<T>): T {
if (result.ok) return result.value;
throw result.error;
}
type UserUpdate = Partial<User>;
type UserSummary = Pick<User, "id" | "name">;
type UserWithoutPassword = Omit<User, "password">;
type ReadonlyUser = Readonly<User>;
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"noImplicitReturns": true,
"isolatedModules": true
}
}
bun install # Install deps
bun run build # Build
bun test # Test
bun run lint # Lint
bun run format # Format
import type with verbatimModuleSyntax and named exports: type-only import of a value triggers errors. Fix: import { type Foo } from "mod" (inline marker).as const on object: readonly AND literal-narrowed — different from as Foo (asserts type) or satisfies Foo (validates without widening).satisfies validates without widening; as widens — using as where you wanted satisfies loses literal types silently.Array<T>.includes(x) requires x to be of type T — narrowing-from-union doesn't work; the standard fix is a type-predicate helper.strictNullChecks: false makes T mean T | null | undefined for ALL types — partial migrations leave types that lie about nullability.tsconfig.json extends doesn't recursively merge compilerOptions.paths — child paths REPLACE parent paths, not merge.testing
Brief description of what this skill does. Include specific triggers - when should Claude use this skill? Example triggers, file types, or keywords that indicate this skill applies.
tools
Manage and troubleshoot PATH configuration in zsh. Use when adding tools to PATH (bun, nvm, Python venv, cargo, go), diagnosing "command not found" errors, validating PATH entries, or organizing shell configuration in .zshrc and .zshrc.local files.
tools
Zabbix monitoring system automation via API and Python. Use when: (1) Managing hosts, templates, items, triggers, or host groups, (2) Automating monitoring configuration, (3) Sending data via Zabbix trapper/sender, (4) Querying historical data or events, (5) Bulk operations on Zabbix objects, (6) Maintenance window management, (7) User/permission management
development
Operate YouTube Music via natural language. Search songs, artists, albums, playlists, lyrics, charts, recommendations, and control playback. Browse personal library, manage playlists, rate tracks, and inspect account info. Use this skill whenever the user asks about YouTube Music, wants to play music, manage playlists, search by song or artist name, inspect lyrics, or control playback.