ty-skills_skill
- Python
2
GitHub Stars
1
Bundled Files
3 weeks ago
Catalog Refreshed
2 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstart where the catalogue uses aiagentskills.
npx veilstart add skill jiatastic/open-python-skills --skill ty-skills- SKILL.md3.8 KB
Overview
This skill teaches practical Python type checking with ty, the extremely fast type checker by Astral. It focuses on adding annotations, resolving ty diagnostics, configuring ty via pyproject.toml, and using ty-specific features like intersection types. The goal is to help teams adopt ty reliably across editors, CI, and codebases migrating from mypy or pyright.
How this skill works
I analyze your codebase and ty diagnostics, suggest precise type annotations and fixes, and generate or tune pyproject.toml configuration entries for rules, includes, and overrides. I explain advanced typing patterns (generics, protocols, intersection types), provide suppression recommendations, and produce editor setup steps for VS Code, Cursor, Neovim, and PyCharm. I can also create CI checks and conversion guidance for migrating from other type checkers.
When to use it
- Adding or improving type annotations across a Python codebase
- Fixing type errors and diagnostics reported by ty
- Migrating a project from mypy or pyright to ty
- Configuring ty rules, severities, and per-file overrides in pyproject.toml
- Setting up the ty language server and editor integrations
Best practices
- Start with a narrow pyproject.toml include root and incrementally expand as fixes are applied
- Treat ty rule severities as data: start with warn and promote to error for CI only after fixes
- Use small, focused commits when adding types to limit churn and ease review
- Prefer precise signatures (TypedDict, Protocols, generics) over overly broad Any to retain tool value
- Use suppression comments sparingly and include a short justification for future cleanups
Example use cases
- Annotate a FastAPI backend to improve IDE completion and catch runtime mistakes before deployment
- Fix a batch of ty diagnostics, including incompatible-assignment and missing-argument, with concrete code edits
- Migrate an existing mypy configuration to ty by translating rule intent and adding per-package overrides
- Enable ty in CI with an incremental rollout: warn first, then fail on error after remediation
- Configure VS Code or Neovim to use the ty language server for fast in-editor diagnostics
FAQ
Yes. You can run ty in parallel to compare diagnostics during migration. Align rule intent in your configurations and gradually adopt ty-only enforcement when results are trusted.
How do I silence a specific ty rule for a single line?
Use a type: ignore comment with rule names, for example: # type: ignore[incompatible-assignment]. Add a brief comment explaining why to make later cleanup easier.