Agent skill

Typescript

by rishighan in rishighan/threetwo

TypeScript engineering guidelines based on Google's style guide.

MITAuto-check passedDevelopment

Install Typescript

skills CLI
$ npx skills add rishighan/threetwo --skill typescript -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rishighan/threetwo typescript --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rishighan/threetwo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/typescript .claude/skills/typescript && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
typescript
GitHub stars
110
Token cost
~2k tokens
SKILL.md length
930 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

TypeScript engineering guidelines based on Google's style guide.

  • Refactoring TypeScript code in this project
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Refactoring

What it does

Typescript is an agent skill from rishighan/threetwo. TypeScript engineering guidelines based on Google's style guide. Use when writing, reviewing, or refactoring TypeScript code in this project.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Refactoring. It works with TypeScript. The repository describes itself as: A good comic book curation app. The licence is MIT.

When your agent uses it

  • Refactoring TypeScript code in this project
  • Tasks that involve Refactoring

Example prompts

  • “/typescript”

What it can do on your machine

Read from SKILL.md and the folder at commit 5211137. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Typescript loads about 2k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 930 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rishighan/threetwo at commit 5211137, republished under its MIT licence (© rishighan). 930 words, ~2,019 tokens.

Download SKILL.mdSave it as .claude/skills/typescript/SKILL.md (or your agent's skills folder).
name
typescript
description
TypeScript engineering guidelines based on Google's style guide. Use when writing, reviewing, or refactoring TypeScript code in this project.

Comprehensive guidelines for writing production-quality TypeScript based on Google's TypeScript Style Guide. Naming Conventions Type Convention Example Classes, Interfaces, Types, Enums UpperCamelCase UserService, HttpClient Variables, Parameters, Functions lowerCamelCase userName, processData Global Constants, Enum Values CONSTANT_CASE MAX_RETRIES, Status.ACTIVE Type Parameters Single letter or UpperCamelCase T, ResponseType Naming Principles

Descriptive names, avoid ambiguous abbreviations
Treat acronyms as words: loadHttpUrl not loadHTTPURL
No prefixes like opt_ for optional parameters
No trailing underscores for private properties
Single-letter variables only when scope is <10 lines

Variable Declarations

// Always use const by default const users = getUsers();

// Use let only when reassignment is needed let count = 0; count++;

// Never use var // var x = 1; // WRONG

// One variable per declaration const a = 1; const b = 2; // const a = 1, b = 2; // WRONG

Types and Interfaces Prefer Type Aliases Over Interfaces

// Good: type alias for object shapes type User = { id: string; name: string; email?: string; };

// Avoid: interface for object shapes // interface User { // id: string; // name: string; // }

// Type aliases work for everything: objects, unions, intersections, mapped types type Status = 'active' | 'inactive'; type Combined = TypeA & TypeB; type Handler = (event: Event) => void;

// Benefits of types over interfaces: // 1. Consistent syntax for all type definitions // 2. Cannot be merged/extended unexpectedly (no declaration merging) // 3. Better for union types and computed properties // 4. Works with utility types more naturally

Type Inference

Leverage inference for trivially inferred types:

// Good: inference is clear const name = 'Alice'; const items = [1, 2, 3];

// Good: explicit for complex expressions const result: ProcessedData = complexTransformation(input);

Array Types

// Simple types: use T[] const numbers: number[]; const names: readonly string[];

// Multi-dimensional: use T[][] const matrix: number[][];

// Complex types: use Array<T> const handlers: Array<(event: Event) => void>;

Null and Undefined

// Prefer optional fields over union with undefined interface Config { timeout?: number; // Good // timeout: number | undefined; // Avoid }

// Type aliases must NOT include |null or |undefined type UserId = string; // Good // type UserId = string | null; // WRONG

// May use == for null comparison (catches both null and undefined) if (value == null) { // handles both null and undefined }

Types to Avoid

// Avoid any - use unknown instead function parse(input: unknown): Data { }

// Avoid {} - use unknown, Record<string, T>, or object function process(obj: Record<string, unknown>): void { }

// Use lowercase primitives let name: string; // Good // let name: String; // WRONG

// Never use wrapper objects // new String('hello') // WRONG

Classes Structure

class UserService { // Fields first, initialized where declared private readonly cache = new Map<string, User>(); private lastAccess: Date | null = null;

// Constructor with parameter properties constructor( private readonly api: ApiClient, private readonly logger: Logger, ) {}

// Methods separated by blank lines async getUser(id: string): Promise<User> { // ... }

private validateId(id: string): boolean { // ... } }

Visibility

class Example { // private by default, only use public when needed externally private internalState = 0;

// readonly for properties never reassigned after construction readonly id: string;

// Never use #private syntax - use TypeScript visibility // #field = 1; // WRONG private field = 1; // Good }

Avoid Arrow Functions as Properties

class Handler { // Avoid: arrow function as property // handleClick = () => { ... };

// Good: instance method handleClick(): void { // ... } }

// Bind at call site if needed element.addEventListener('click', () => handler.handleClick());

Static Methods

Never use this in static methods
Call on defining class, not subclasses

Functions Prefer Function Declarations

// Good: function declaration for named functions function processData(input: Data): Result { return transform(input); }

// Arrow functions when type annotation needed const handler: EventHandler = (event) => { // ... };

Arrow Function Bodies

// Concise body only when return value is used const double = (x: number) => x * 2;

// Block body when return should be void const log = (msg: string) => { console.log(msg); };

Parameters

// Use rest parameters, not arguments function sum(...numbers: number[]): number { return numbers.reduce((a, b) => a + b, 0); }

// Destructuring for multiple optional params interface Options { timeout?: number; retries?: number; } function fetch(url: string, { timeout = 5000, retries = 3 }: Options = {}) { // ... }

Show full SKILL.md (328 more words)Show less

// Never name a parameter 'arguments'

Imports and Exports Always Use Named Exports

// Good: named exports export function processData() { } export class UserService { } export interface Config { }

// Never use default exports // export default class UserService { } // WRONG

Import Styles

// Module import for large APIs import * as fs from 'fs';

// Named imports for frequently used symbols import { readFile, writeFile } from 'fs/promises';

// Type-only imports when only used as types import type { User, Config } from './types';

Module Organization

Use modules, never namespace Foo { }
Never use require() - use ES6 imports
Use relative imports within same project
Avoid excessive ../../../

Control Structures Always Use Braces

// Good if (condition) { doSomething(); }

// Exception: single-line if if (condition) return early;

Loops

// Prefer for...of for arrays for (const item of items) { process(item); }

// Use Object methods with for...of for objects for (const [key, value] of Object.entries(obj)) { // ... }

// Never use unfiltered for...in on arrays

Equality

// Always use === and !== if (a === b) { }

// Exception: == null catches both null and undefined if (value == null) { }

Switch Statements

switch (status) { case Status.Active: handleActive(); break; case Status.Inactive: handleInactive(); break; default: // Always include default, even if empty break; }

Exception Handling

// Always throw Error instances throw new Error('Something went wrong'); // throw 'error'; // WRONG

// Catch with unknown type try { riskyOperation(); } catch (e: unknown) { if (e instanceof Error) { logger.error(e.message); } throw e; }

// Empty catch needs justification comment try { optional(); } catch { // Intentionally ignored: fallback behavior handles this }

Type Assertions

// Use 'as' syntax, not angle brackets const input = value as string; // const input = <string>value; // WRONG in TSX, avoid everywhere

// Double assertion through unknown when needed const config = (rawData as unknown) as Config;

// Add comment explaining why assertion is safe const element = document.getElementById('app') as HTMLElement; // Safe: element exists in index.html

Strings

// Use single quotes for string literals const name = 'Alice';

// Template literals for interpolation or multiline const message = Hello, ${name}!; const query = SELECT * FROM users WHERE id = ?;

// Never use backslash line continuations

Disallowed Features Feature Alternative var const or let Array() constructor [] literal Object() constructor {} literal any type unknown namespace modules require() import Default exports Named exports #private fields private modifier eval() Never use const enum Regular enum debugger Remove before commit with Never use Prototype modification Never modify

© rishighan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/typescript of rishighan/threetwo.

Open the folder on GitHubat commit 5211137

Compare with similar skills

Typescript next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Typescript compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Typescript this skillrishighan/threetwo110—~2kAutomated safety check: PassMIT
Deepgram SDK Patternsjeremylongshore/tons-of-skills-marketplace2.8k—~2.2kAutomated safety check: PassMIT
Svelte5 Best PracticesSikandarJODD/cnblocks4301 repos~810Automated safety check: PassMIT
Dinero Best Practicesdinerojs/dinero.js6.8k—~756Automated safety check: PassMIT
Code Guidelinesgetsentry/sentry-react-native1.8k—~3.2kAutomated safety check: PassMIT
AST Visitor Pattern for Unionsprisma/orm48k—~830Automated safety check: PassApache-2.0

Similar skills

  • Deepgram SDK Patterns

    jeremylongshore/tons-of-skills-marketplace

    Apply production-ready Deepgram SDK patterns for TypeScript and Python.

    2.8k GitHub stars~2.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Svelte5 Best Practices

    SikandarJODD/cnblocks

    Svelte 5 runes, snippets, SvelteKit patterns, and modern best practices for TypeScript and component development.

    430 GitHub starsUsed in 1 repo~810 tokens
    DevelopmentAuto-check passed
  • Dinero Best Practices

    dinerojs/dinero.js

    Core best practices for the Dinero.js money library. An agent skill from dinerojs/dinero.js.

    6.8k GitHub stars~756 tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Code Guidelines

    getsentry/sentry-react-native

    Official

    Enforce Sentry React Native SDK code guidelines for implementation, refactoring, and review.

    1.8k GitHub stars~3.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Official

    Replaces a plain TypeScript union plus switch statements with frozen subclasses and a visitor interface when several places dispatch on the same variants.

    48k GitHub stars~830 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • ast-grep Codemod Reference

    warp-drive-data/warp-drive

    Reference for writing and debugging TypeScript and JavaScript codemods with @ast-grep/napi: parsing, node queries, meta-variables, rule objects and editing.

    3.2k GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from rishighan/threetwo

  • Jsdoc

    rishighan/threetwo

    Commenting and documentation guidelines. An agent skill from rishighan/threetwo.

    110 GitHub stars~2.7k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Typescript

What does Typescript do?

TypeScript engineering guidelines based on Google's style guide. Typescript is an agent skill from rishighan/threetwo. TypeScript engineering guidelines based on Google's style guide.

When should I use Typescript?

Typescript fits situations like: refactoring TypeScript code in this project; tasks that involve Refactoring.

How do I install Typescript in Claude Code?

Run `npx skills add rishighan/threetwo --skill typescript -a claude-code`. Or copy the skill folder (.claude/skills/typescript in rishighan/threetwo) into .claude/skills/typescript in your project. Claude Code loads it when a task matches its description.

How do I install Typescript in Codex?

Run `npx skills add rishighan/threetwo --skill typescript -a codex`. Or copy the skill folder (.claude/skills/typescript in rishighan/threetwo) into .agents/skills/typescript in your project. Codex loads it when a task matches its description.

Can I use Typescript in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rishighan/threetwo --skill typescript -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/typescript, .gemini/skills/typescript, .github/skills/typescript and .opencode/skills/typescript in your project.

What does Typescript need to run?

SKILL.md names no scripts, command-line tools or credentials: Typescript is instructions for the agent only.

Does Typescript access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Typescript safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Typescript use?

Typescript is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Typescript use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Typescript?

Skills that share tags, products or a category with Typescript: Deepgram SDK Patterns (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Svelte5 Best Practices (SikandarJODD/cnblocks, 430 stars), Dinero Best Practices (dinerojs/dinero.js, 6.8k stars) and Code Guidelines (getsentry/sentry-react-native, 1.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Typescript?

rishighan (a GitHub user) maintains it in rishighan/threetwo, which has 110 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 6, 2026.

Source: rishighan/threetwo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.