Agent skill

Typescript

by MatrixAges in MatrixAges/polywise

Guide for implementing TypeScript in projects, including naming conventions, type definitions, and code style.

MITAuto-check passedDevelopment

Install Typescript

skills CLI
$ npx skills add MatrixAges/polywise --skill typescript -a claude-code

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

GitHub CLI
$ gh skill install MatrixAges/polywise 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/MatrixAges/polywise.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.opencode/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
662
Token cost
~1.1k tokens
SKILL.md length
429 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Guide for implementing TypeScript in projects, including naming conventions, type definitions, and code style.

  • Works in 4 steps: Naming Conventions → Type Definitions → Code Style → …
  • Tasks that involve Refactoring
  • SKILL.md covers 1. Naming Conventions, 2. Type Definitions, 3. Code Style and 4. Summary Checklist
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Typescript is an agent skill from MatrixAges/polywise. Guide for implementing TypeScript in projects, including naming conventions, type definitions, and code style. Triggered when writing or refactoring TypeScript code.

Its SKILL.md is about 1.1k 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: The open source agentic content system to make your contents alive. Self-hosted on any platform. ◑. The licence is MIT.

When your agent uses it

  • Tasks that involve Refactoring

Example prompts

  • “/typescript”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Naming Conventions
  2. Type Definitions
  3. Code Style
  4. Summary Checklist

What it can do on your machine

Read from SKILL.md and the folder at commit f8d2320. 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 (its code samples are typescript).

    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 1.1k tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 429 words of instructions outside code blocks.

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

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 MatrixAges/polywise at commit f8d2320, republished under its MIT licence (© MatrixAges). 429 words, ~1,062 tokens.

Download SKILL.mdSave it as .claude/skills/typescript/SKILL.md (or your agent's skills folder).
name
typescript
description
Guide for implementing TypeScript in projects, including naming conventions, type definitions, and code style. Triggered when writing or refactoring TypeScript code.

TypeScript Development Guide

This skill provides mandatory specifications for writing TypeScript in this project to ensure consistency, type safety, and code cleanliness.

1. Naming Conventions

1.1 Variables and Functions
  • Variables: Use snake_case (e.g., theme_value, is_dev).
  • Functions: Use camelCase (e.g., getAntdTheme, setGlobalAnimation).
  • Internal Props Objects: Use props_* prefix (e.g., props_side_bar).
1.2 Classes and Types
  • Classes: Use PascalCase (e.g., GlobalModel, Settings).
  • Interfaces/Types: Use PascalCase. Interfaces preferably start with I (e.g., IProps, IPropsSidebar).
  • Enum-like Types: Use literal union types instead of enum where possible (e.g., type Theme = 'light' | 'dark' | 'system').

2. Type Definitions

2.1 File Organization
  • Global Types: Place in packages/app/types/ or packages/app/typings/.
  • Local Types: Use types.ts file in the component or module directory.
  • Props: Define an IProps interface for each component, typically in the component file or adjacent types.ts.
2.2 Best Practices
  • Explicit Types: Prefer providing explicit type annotations for function parameters and complex return value types.
  • Utility Types: Leverage TypeScript's utility types (Pick, Omit, Partial, Exclude) to reuse existing definitions.
  • Strict Types: Avoid any. If the type is truly unknown, use unknown and perform type casting (cast) when necessary.
  • Type Alias vs. Interface: Use interface for object structures (especially props), use type for unions, intersections, or base types.

3. Code Style

3.1 Imports and Exports
  • Named Exports: Utility functions and models prefer named exports.
  • Default Exports: For the main component or main class in a file, use default export.
  • Pure Type Imports: Use import type for importing types to maintain clear process boundaries and reduce bundle size.
  • Path Aliases: Use @/ to reference the src directory (e.g., import { Settings } from '@/models').
Show full SKILL.md (170 more words)Show less
3.2 Statements and Logic
  • Arrow Functions: Component definitions and small utility functions prefer arrow functions.
  • Destructuring: Use destructuring for props and objects to improve readability.
  • Conditional Logic: Use optional chaining (?.) and nullish coalescing (??) for safer property access.
3.3 Code Spacing and Blank Lines

Use blank lines to separate code with different execution styles or visual appearances. If two adjacent lines of code look stylistically different, a blank line must be added between them.

When to Add Blank Lines:

  • Between data fetching and return statements
  • Between variable calculation and usage
  • Between multiple consecutive operations (different independent steps)
  • Before early returns
  • Between different operation types (sync vs async, query vs mutation)
  • Before and after state changes

Recommended:

typescript
async getSnapshot(weight_threshold = 0.2) {
	const nodes = await this.query(sql.sql_get_snapshot_nodes(weight_threshold))
	const edges = await this.query(sql.sql_get_snapshot_edges(weight_threshold))

	return { nodes, edges }
}

async tick(threshold_override?: number) {
	const threshold = threshold_override ?? 0.5

	await this.exec(sql.sql_tick(threshold))
}

Avoid:

typescript
async getSnapshot(weight_threshold = 0.2) {
	const nodes = await this.query(sql.sql_get_snapshot_nodes(weight_threshold))
	const edges = await this.query(sql.sql_get_snapshot_edges(weight_threshold))
	return { nodes, edges }
}

4. Summary Checklist

  • Are variable names snake_case?
  • Are function names camelCase?
  • Are component props using IProps or IProps*?
  • Are pure type imports using import type?
  • Are local types placed in types.ts files?
  • Has any been avoided in favor of strict types or unknown?
  • Are blank lines used to separate different execution style code blocks?

© MatrixAges, 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 .opencode/skills/typescript of MatrixAges/polywise.

Open the folder on GitHubat commit f8d2320

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 skillMatrixAges/polywise662—~1.1kAutomated 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
ast-grep Codemod Referencewarp-drive-data/warp-drive3.2k—~2.6kAutomated safety check: PassMIT

Similar skills

  • 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 yesterday
    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 today
    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 today
    DevelopmentAuto-check passed
  • Deep Refactor Audit

    AlmanacCode/codealmanac

    A skill your agent uses when a user asks for a major architecture/refactor audit, codebase smell investigation, boundary critique, feature simplification review, vibe-coded or AI-generated code…

    998 GitHub stars~3.5k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed

More from MatrixAges/polywise

All 11 skills in this repo
  • Chrome Cdp

    MatrixAges/polywise

    Interacts with local browser via Chrome DevTools Protocol (only triggered after user explicitly requests to inspect, debug, or interact with pages open in Chrome)

    662 GitHub stars~800 tokensUpdated 3 mo ago
    Auto-check passed
  • Skill Generator

    MatrixAges/polywise

    Called when users need to create new OpenCode skills. An agent skill from MatrixAges/polywise.

    662 GitHub stars~333 tokensUpdated 3 mo ago
    Auto-check passed
  • Agentmap Generator

    MatrixAges/polywise

    Guides the generation, reading, and updating of agentmap.md files.

    662 GitHub stars~489 tokensUpdated 3 mo ago
    Auto-check passed
  • CSS

    MatrixAges/polywise

    Guides styling implementation using TailwindCSS + CSS Modules.

    662 GitHub stars~1.3k tokensUpdated 3 mo ago
    Auto-check passed
  • Erpc Communication

    MatrixAges/polywise

    Guides using eRPC (electron-tRPC) for inter-process communication (IPC) between Electron main and renderer processes.

    662 GitHub stars~618 tokensUpdated 3 mo ago
    Auto-check passed
  • I18n

    MatrixAges/polywise

    Guides internationalization (i18n) implementation using i18next with TypeScript.

    662 GitHub stars~898 tokensUpdated 3 mo ago
    Auto-check passed

Works with

Categories

Questions about Typescript

What does Typescript do?

Guide for implementing TypeScript in projects, including naming conventions, type definitions, and code style. Typescript is an agent skill from MatrixAges/polywise. Guide for implementing TypeScript in projects, including naming conventions, type definitions, and code style.

When should I use Typescript?

Typescript fits situations like: tasks that involve Refactoring.

How do I install Typescript in Claude Code?

Run `npx skills add MatrixAges/polywise --skill typescript -a claude-code`. Or copy the skill folder (.opencode/skills/typescript in MatrixAges/polywise) 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 MatrixAges/polywise --skill typescript -a codex`. Or copy the skill folder (.opencode/skills/typescript in MatrixAges/polywise) 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 MatrixAges/polywise --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 1.1k tokens (SKILL.md is roughly 4.2k 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: Svelte5 Best Practices (SikandarJODD/cnblocks, 430 stars), Dinero Best Practices (dinerojs/dinero.js, 6.8k stars), Code Guidelines (getsentry/sentry-react-native, 1.8k stars) and AST Visitor Pattern for Unions (prisma/orm, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Typescript?

MatrixAges (a GitHub organization) maintains it in MatrixAges/polywise, which has 662 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on June 11, 2026.

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