# TypeScript

> TypeScript is an open-source agent skill for developer tools. Applies TypeScript and React coding conventions when writing or reviewing TSX code. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/sorah/config/tree/master/claude/marketplace/plugins/sorah-guides/skills/typescript
- **Repository:** https://github.com/sorah/config
- **GitHub stars:** 31
- **License:** MIT
- **Skill name:** typescript
- **Collection:** https://github.com/sorah/config
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill gives the agent a set of TypeScript conventions to follow when editing or reviewing TypeScript and TSX code. It covers preferences for type declarations, such as favoring type aliases over interfaces, using discriminated unions and string literal unions, and strict-mode type safety with type guards and unknown instead of any. It also sets naming rules for files, types, variables, constants and booleans.

For React work, the guidance covers functional components, hook usage with SWR for server data and react-hook-form for forms, custom hooks, and Next.js App Router patterns such as defaulting to server components. Error handling, async style and import conventions are included, along with common styling approaches for Chakra UI and Vanilla Extract.

The skill is guidance only: it ships no scripts or reference files, and it states that project-specific conventions such as a CLAUDE.md or style guide take priority over its defaults.

## When your agent uses it

> This skill should be used when writing or reviewing TypeScript or TSX code, or when the project uses "TypeScript", "React", "tsx", "SWR", "Vite", "Next.js", or TypeScript type patterns. Provides TypeScript coding conventions, React patterns, and best practices. Project-specific conventions always take priority.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/sorah/config/tree/HEAD/claude/marketplace/plugins/sorah-guides/skills/typescript)
- [License: MIT](https://github.com/sorah/config/tree/HEAD/claude/marketplace/plugins/sorah-guides/skills/typescript)

## Features

- **Type definition rules:** Guidance on choosing type aliases, discriminated unions and string literal unions over enums.
- **Strict type safety:** Advice on strict mode, type guard functions, unknown over any, and type-only imports.
- **Naming conventions:** Rules for naming files, types, variables, constants and boolean values.
- **React component patterns:** Functional components, named exports, and server versus client component choices in Next.js.
- **Data fetching and hooks:** Preferred use of SWR, react-hook-form, useState, Context and custom hooks.
- **Error handling guidance:** Discriminated union results for API responses, custom error classes and route-level error boundaries.

## Good for

- Review a TSX component for type safety and naming issues
- Refactor interfaces into type aliases in a TypeScript module
- Add SWR data fetching to a React page
- Write a type guard for a union of string values
- Structure a Next.js App Router page with server and client components

## Install

### Claude Code

This skill ships in the `sorah-guides` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add sorah/config
/plugin install sorah-guides@sorah-marketplace
```

Or copy only this skill to `~/.claude/skills/typescript`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/sorah/config.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/typescript &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/typescript" ~/.claude/skills/typescript &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/typescript` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/typescript` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/sorah/config.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/typescript &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/typescript" ~/.agents/skills/typescript &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/typescript` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/typescript` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/sorah/config.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/typescript &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/typescript" ~/.cursor/skills/typescript &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/typescript` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/sorah/config.git --path claude/marketplace/plugins/sorah-guides/skills/typescript
```

Or copy the folder to `~/.gemini/skills/typescript` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/typescript`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/sorah/config.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/typescript &&
cp -R "$tmp/claude/marketplace/plugins/sorah-guides/skills/typescript" ~/.copilot/skills/typescript &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/typescript` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/sorah/config.git
```

Then copy `config/claude/marketplace/plugins/sorah-guides/skills/typescript` into your agent's skills folder as `typescript`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does TypeScript run any scripts or tools?

No. It ships only a SKILL.md file with no scripts, and no tools are restricted or listed.

### What happens when a project has its own coding rules?

The skill states that project-specific conventions such as CLAUDE.md or style guides always take priority over its guidance.

### When does the skill get used?

It is meant for writing or reviewing TypeScript or TSX code, or when a project uses TypeScript, React, SWR, Vite, Next.js or TypeScript type patterns.

### How do I install TypeScript in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/typescript to use it in all your projects, or to .claude/skills/typescript in one project. Or install the sorah-guides plugin, which includes it: /plugin marketplace add sorah/config, then /plugin install sorah-guides@sorah-marketplace.

### Does TypeScript run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use TypeScript?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to TypeScript?

The closest alternatives to TypeScript are Marco code style, TypeScript best practices, Coding standards, Coding standards and Coding standards.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Marco code style](https://ai-powered.com/skills/marco-code-style): Marco code style is an open-source agent skill for developer tools.
- [TypeScript best practices](https://ai-powered.com/skills/typescript-best-practices): TypeScript best practices is an open-source agent skill for developer tools.
- [Coding standards](https://ai-powered.com/skills/coding-standards-abdullayevtemurmalik): Coding standards is an open-source agent skill for developer tools.
- [Coding standards](https://ai-powered.com/skills/coding-standards-fmarzochi): Coding standards is an open-source agent skill for developer tools.
- [Coding standards](https://ai-powered.com/skills/coding-standards-smartworldarafath): Coding standards is an open-source agent skill for developer tools.
- [TypeScript strict](https://ai-powered.com/skills/typescript-strict): TypeScript strict is an open-source agent skill for developer tools.
- [Readable code](https://ai-powered.com/skills/readable-code): Readable code is an open-source agent skill for developer tools.
- [React patterns](https://ai-powered.com/skills/react-patterns-tonyghiani): React patterns is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/typescript
