Provides commands and configuration for using ty, the fast Python type checker and language server.
Install
mkdir -p .claude/skills/ty && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17245" && unzip -o skill.zip -d .claude/skills/ty && rm skill.zipInstalls to .claude/skills/ty
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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.Key capabilities
- →Invoke ty for type checking all files or specific paths
- →Configure type checking rules (error, warn, ignore)
- →Target specific Python versions for checks
- →Target specific Python platforms for checks
- →Configure ty via pyproject.toml or ty.toml
- →Apply per-file overrides for rules
How it works
The skill describes how to use ty, a fast Python type checker, by detailing its invocation commands, rule configuration, Python version/platform targeting, and configuration file options.
Inputs & outputs
When to use ty
- →Performing type checks
- →Configuring python linting rules
- →Optimizing type check speed
About this skill
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 inpyproject.toml- A
ty.tomlconfiguration 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
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
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
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:
# 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:
[[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
mypy . → ty check
mypy --strict . → ty check --error-on-warning
mypy path/to/file.py → ty check path/to/file.py
Pyright → ty
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:
# 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:
When not to use it
- →When using mypy, Pyright, or other type checkers instead of ty
- →When type checking non-Python code
Limitations
- →The skill is specific to the ty type checker
- →Focuses on Python type checking
- →Discourages adding ignore comments unless explicitly requested
How it compares
This workflow provides a guide for using ty as a replacement for other Python type checkers, emphasizing its speed and specific configuration methods.
Compared to similar skills
ty side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| ty (this skill) | 0 | 4mo | Review | Beginner |
| python-testing-patterns | 77 | 3mo | Review | Intermediate |
| python-playground | 2 | 4mo | Review | Beginner |
| mflux-manual-testing | 2 | 2mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by rocky-d
View all by rocky-d →You might also like
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
python-playground
pydantic
Run and test Python code in a dedicated playground directory. Use when you need to execute Python scripts, test code snippets, investigate CPython behavior, or experiment with Python without affecting the main codebase.
mflux-manual-testing
filipstrand
Manually validate mflux CLIs by exercising the changed paths and reviewing output images/artifacts.
examples-auto-run
openai
Run python examples in auto mode with logging, rerun helpers, and background control.
extract-fuzzer-repro
noir-lang
Extract a Noir reproduction project from fuzzer failure logs in GitHub Actions. Use when a CI fuzzer test fails and you need to create a local reproduction.
klingai-known-pitfalls
jeremylongshore
Manage avoid common mistakes when using Kling AI. Use when troubleshooting issues or learning best practices to prevent problems. Trigger with phrases like 'klingai pitfalls', 'kling ai mistakes', 'klingai gotchas', 'klingai best practices'.