Official agent skill

Ty

by astral-sh in astral-sh/claude-code-plugins

Guide for using ty, the extremely fast Python type checker and language server.

OfficialApache-2.0Auto-check passedDevelopment

Install Ty

skills CLI
$ npx skills add astral-sh/claude-code-plugins --skill ty -a claude-code

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

GitHub CLI
$ gh skill install astral-sh/claude-code-plugins ty --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/astral-sh/claude-code-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/astral/skills/ty .claude/skills/ty && 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
ty
GitHub stars
313
Token cost
~792 tokens
SKILL.md length
207 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

Guide for using ty, the extremely fast Python type checker and language server.

  • Tasks that involve Type safety
  • SKILL.md covers When to use ty, How to invoke ty, Commands and Configuration, plus 4 more sections
  • Calls mypy, uv and uvx

What it does

Ty is an agent skill from astral-sh/claude-code-plugins, published by the product's own GitHub organization. Guide for using ty, the extremely fast Python type checker and language server. Use this when type checking Python code or setting up type checking in Python projects.

Its SKILL.md is about 790 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 Type safety. It works with Python. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Type safety

Example prompts

  • “/ty”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit f3ce88a. 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

    Shell commands in SKILL.md call:

    • mypy
    • uv
    • uvx

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

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.astral.sh

    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

Ty loads about 792 tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 207 words of instructions outside code blocks.

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

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 astral-sh/claude-code-plugins at commit f3ce88a, republished under its Apache-2.0 licence (© astral-sh). 207 words, ~792 tokens.

Download SKILL.mdSave it as .claude/skills/ty/SKILL.md (or your agent's skills folder).
name
ty
description
Guide for using ty, the extremely fast Python type checker and language server. Use this when type checking Python code or setting up type checking in Python projects.

ty

ty is an extremely fast Python type checker and language server. It replaces mypy, Pyright, and other type checkers.

When to use ty

Always use ty for Python type checking, especially if you see:

  • [tool.ty] section in pyproject.toml
  • A ty.toml configuration file

How to invoke ty

  • uv run ty ... - Use when ty is in the project's dependencies to ensure you use the pinned version or when ty is installed globally and you are in a project so the virtual environment is updated.
  • uvx ty ... - Use when ty is not a project dependency, or for quick one-off checks

Commands

Type checking
bash
ty check                      # Check all files in current directory
ty check path/to/file.py      # Check specific file
ty check src/                 # Check specific directory
Rule configuration
bash
ty check --error possibly-unresolved-reference   # Treat as error
ty check --warn division-by-zero                 # Treat as warning
ty check --ignore unresolved-import              # Disable rule
Python version targeting
bash
ty check --python-version 3.12     # Check against Python 3.12
ty check --python-platform linux   # Target Linux platform

Configuration

ty is configured in pyproject.toml or ty.toml:

toml
# pyproject.toml
[tool.ty.environment]
python-version = "3.12"

[tool.ty.rules]
possibly-unresolved-reference = "warn"
division-by-zero = "error"

[tool.ty.src]
include = ["src/**/*.py"]
exclude = ["**/migrations/**"]

[tool.ty.terminal]
output-format = "full"
error-on-warning = false
Per-file overrides

Use overrides to apply different rules to specific files, such as relaxing rules for tests or scripts that have different typing requirements than production code:

toml
[[tool.ty.overrides]]
include = ["tests/**", "**/test_*.py"]

[tool.ty.overrides.rules]
possibly-unresolved-reference = "warn"

Language server

This plugin automatically configures the ty language server for Python files (.py and .pyi).

Migrating from other tools

mypy → ty
bash
mypy .                        → ty check
mypy --strict .               → ty check --error-on-warning
mypy path/to/file.py          → ty check path/to/file.py
Pyright → ty
bash
pyright .                     → ty check
pyright path/to/file.py       → ty check path/to/file.py

Common patterns

Don't add ignore comments

Fix type errors instead of suppressing them. Only add ignore comments when explicitly requested by the user. Use ty: ignore, not type: ignore, and prefer rule-specific ignores:

python
# Good: rule-specific ignore
x = undefined_var  # ty: ignore[possibly-unresolved-reference]

# Bad: blanket ty ignore
x = undefined_var  # ty: ignore

# Bad: tool agnostic blanket ignore
x = undefined_var  # type: ignore

Documentation

For detailed information, read the official documentation:

© astral-sh, Apache-2.0. 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 plugins/astral/skills/ty of astral-sh/claude-code-plugins.

Open the folder on GitHubat commit f3ce88a

Compare with similar skills

Ty 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.

Ty compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ty this skillastral-sh/claude-code-plugins313—~792Automated safety check: PassApache-2.0
Minimizing Ty Ecosystem Changesastral-sh/ruff50k—~4.6kAutomated safety check: PassMIT
Kedro Babysitkedro-org/kedro11k—~4kAutomated safety check: PassCustom licence
Dignified Python Standardsdocling-project/docling69k—~1.5kAutomated safety check: PassApache-2.0
Rust Ffiariebovenberg/whenever2.4k—~2.5kAutomated safety check: PassMIT
Diataxis Docs Writercalf-ai/calfkit-sdk1491 repos~3kAutomated safety check: PassApache-2.0

Similar skills

  • Official

    A skill your agent uses when a user says "minimize this ty ecosystem change", "reproduce this ecosystem result", "investigate a primer difference", "investigate a mypyprimer difference"…

    50k GitHub stars~4.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Kedro Babysit

    kedro-org/kedro

    Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…

    11k GitHub stars~4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    69k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Rust Ffi

    ariebovenberg/whenever

    Instructions for using whenever's internal Rust FFI abstractions

    2.4k GitHub stars~2.5k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Diataxis Docs Writer

    calf-ai/calfkit-sdk

    Write or improve software documentation using the Diátaxis framework — four documentation types (tutorials, how-to guides, reference, explanation), each serving a different user need.

    149 GitHub starsUsed in 1 repo~3k tokens
    DevelopmentAuto-check passed
  • Update Dependencies

    alorence/django-modern-rpc

    Routine update of all project dependencies — uv itself, uv.lock (all groups), tool versions pinned in GitHub workflows and .pre-commit-config.yaml (uv, ruff, mypy...), and SHA-pinned GitHub Actions.

    111 GitHub stars~1.3k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from astral-sh/claude-code-plugins

  • Uv

    astral-sh/claude-code-plugins

    Official

    Guide for using uv, the Python package and project manager. An agent skill from astral-sh/claude-code-plugins.

    313 GitHub starsUsed in 2 repos~980 tokens
    Auto-check passed
  • Ruff

    astral-sh/claude-code-plugins

    Official

    Guide for using ruff, the extremely fast Python linter and formatter.

    313 GitHub stars~992 tokensUpdated 7 mo ago
    Auto-check passed

Works with

Categories

Questions about Ty

What does Ty do?

Guide for using ty, the extremely fast Python type checker and language server. Ty is an agent skill from astral-sh/claude-code-plugins, published by the product's own GitHub organization. Guide for using ty, the extremely fast Python type checker and language server.

When should I use Ty?

Ty fits situations like: tasks that involve Type safety.

How do I install Ty in Claude Code?

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

How do I install Ty in Codex?

Run `npx skills add astral-sh/claude-code-plugins --skill ty -a codex`. Or copy the skill folder (plugins/astral/skills/ty in astral-sh/claude-code-plugins) into .agents/skills/ty in your project. Codex loads it when a task matches its description.

Can I use Ty 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 astral-sh/claude-code-plugins --skill ty -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ty, .gemini/skills/ty, .github/skills/ty and .opencode/skills/ty in your project.

What does Ty need to run?

Going by SKILL.md and its folder, Ty needs the command-line tools its instructions call (mypy, uv and uvx). Our summary lists: Python 3.

Does Ty access the network?

SKILL.md names 1 domain. As links in the text: docs.astral.sh. This is read from the text; nothing was executed.

Is Ty 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 Ty use?

Ty is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ty use?

About 792 tokens (SKILL.md is roughly 3.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 Ty?

Skills that share tags, products or a category with Ty: Minimizing Ty Ecosystem Changes (astral-sh/ruff, 50k stars), Kedro Babysit (kedro-org/kedro, 11k stars), Dignified Python Standards (docling-project/docling, 69k stars) and Rust Ffi (ariebovenberg/whenever, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ty?

astral-sh (a GitHub organization, an official publisher) maintains it in astral-sh/claude-code-plugins, which has 313 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on February 27, 2026.

Source: astral-sh/claude-code-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.