Official agent skill

Adding Ty Diagnostics

by astral-sh in astral-sh/ruff

A skill your agent uses when a user says "add a ty rule", "add a ty diagnostic", "write this new ty diagnostic", "change a ty error message", "review ty diagnostics", or asks to add, update, or…

OfficialMITAuto-check passedDevelopment

Install Adding Ty Diagnostics

skills CLI
$ npx skills add astral-sh/ruff --skill adding-ty-diagnostics -a claude-code

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

GitHub CLI
$ gh skill install astral-sh/ruff adding-ty-diagnostics --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/ruff.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/adding-ty-diagnostics .claude/skills/adding-ty-diagnostics && 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
adding-ty-diagnostics
GitHub stars
50k
Token cost
~556 tokens
SKILL.md length
290 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when a user says "add a ty rule", "add a ty diagnostic", "write this new ty diagnostic", "change a ty error message", "review ty diagnostics", or asks to add, update, or…

  • A user says add a ty rule
  • Calls cargo
  • Add a ty diagnostic
  • Write this new ty diagnostic

What it does

Adding Ty Diagnostics is an agent skill from astral-sh/ruff, published by the product's own GitHub organization. Use when a user says "add a ty rule", "add a ty diagnostic", "write this new ty diagnostic", "change a ty error message", "review ty diagnostics", or asks to add, update, or review ty checks, diagnostic messages, subdiagnostics, or concise output behavior.

Its SKILL.md is about 560 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 Linting and formatting. It works with Ruff and Python. The repository describes itself as: An extremely fast Python linter and code formatter, written in Rust. The licence is MIT.

When your agent uses it

  • A user says add a ty rule
  • Add a ty diagnostic
  • Write this new ty diagnostic
  • Change a ty error message

Example prompts

  • “add a ty rule”
  • “add a ty diagnostic”
  • “write this new ty diagnostic”
  • “/adding-ty-diagnostics”

What it can do on your machine

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

    • cargo

    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):

    • pypi.org

    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

Adding Ty Diagnostics loads about 556 tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 290 words of instructions outside code blocks.

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

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/ruff at commit 4830211, republished under its MIT licence (© astral-sh). 290 words, ~556 tokens.

Download SKILL.mdSave it as .claude/skills/adding-ty-diagnostics/SKILL.md (or your agent's skills folder).
name
adding-ty-diagnostics
description
Use when a user says "add a ty rule", "add a ty diagnostic", "write this new ty diagnostic", "change a ty error message", "review ty diagnostics", or asks to add, update, or review ty checks, diagnostic messages, subdiagnostics, or concise output behavior.

Adding Ty Diagnostics

Use this skill when adding a ty rule or adding, changing, or reviewing a ty diagnostic.

Keep error messages concise. Think about how the diagnostic will look on a narrow terminal screen.

Put extra detail in subdiagnostics or secondary annotations when that helps, but make sure the primary diagnostic is understandable on its own.

Always check that the diagnostic still makes sense when the user passes --output-format=concise.

If the error code is entirely new or if you have changed the documentation for the error code, you will need to run cargo dev generate-all after making your changes, to update the generated schema for ty and the generated .md documentation files.

Diagnostics should usually be tested using mdtests. If you are changing behaviour for an existing diagnostic, you should usually add your tests to a pre-existing .md file; otherwise, it may be appropriate to add a new .md file for your tests. A new ty diagnostic should normally have at least one snapshot test showing how ty renders it. For changes to existing diagnostics, snapshot tests are only usually necessary for diagnostics that use secondary annotations or subdiagnostics. If you want to add a snapshot, inline # snapshot comments are preferred over the legacy <!-- snapshot-annotations --> directive.

When adding a ty rule that is disabled by default, normally enable it at warn in .github/ty-ecosystem.toml so the ecosystem-analyzer workflows report its effects.

When using the declare_lint! macro, the status field should be set to LintStatus::stable(<next version of ty>). You should determine what the next version of ty will be by inspecting https://pypi.org/pypi/ty/json, finding what the latest release of ty is, and incrementing the patch version by one. For example, if the latest release of ty is 0.5.3, the status should be LintStatus::stable("0.5.4").

© astral-sh, 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 .agents/skills/adding-ty-diagnostics of astral-sh/ruff.

Open the folder on GitHubat commit 4830211

Compare with similar skills

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

Adding Ty Diagnostics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Adding Ty Diagnostics this skillastral-sh/ruff50k—~556Automated safety check: PassMIT
Kedro Babysitkedro-org/kedro11k—~4kAutomated safety check: PassCustom licence
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause
Update Dependenciesalorence/django-modern-rpc111—~1.3kAutomated safety check: PassMIT
Align Recipe pyproject.tomlgoogle/adk-recipes10k—~4.6kAutomated safety check: PassApache-2.0
Ruffastral-sh/claude-code-plugins313—~992Automated safety check: PassApache-2.0

Similar skills

  • 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 today
    DevelopmentAuto-check passed
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated today
    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 today
    DevelopmentAuto-check passed
  • Align Recipe pyproject.toml

    google/adk-recipes

    Official

    Brings a Python recipe's pyproject.toml in line with the repo's CI rules, either as a read-only dry run or by rewriting the file while keeping comments.

    10k GitHub stars~4.6k tokensUpdated today
    DevelopmentAuto-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
    DevelopmentAuto-check passed
  • Code Style

    meleantonio/ChernyCode

    Python code style and formatting standards using Ruff. An agent skill from meleantonio/ChernyCode.

    516 GitHub stars~379 tokensUpdated 1 mo ago
    DevelopmentAuto-check passed

More from astral-sh/ruff

  • Official

    A skill your agent uses when a user says "summarise ecosystem results", "summarize this ty ecosystem report", "what changed in this ecosystem run?", or asks to summarise or summarize ty ecosystem…

    50k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • 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
    Auto-check passed
  • Official

    A skill your agent uses when a user asks to wobble ty constraint ordering, check constraint-set or TDD ordering determinism, test reversed constraint/typevar IDs, or investigate nondeterministic ty…

    50k GitHub stars~838 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Adding Ty Diagnostics

What does Adding Ty Diagnostics do?

A skill your agent uses when a user says "add a ty rule", "add a ty diagnostic", "write this new ty diagnostic", "change a ty error message", "review ty diagnostics", or asks to add, update, or…. Adding Ty Diagnostics is an agent skill from astral-sh/ruff, published by the product's own GitHub organization. Use when a user says "add a ty rule", "add a ty diagnostic", "write this new ty diagnostic", "change a ty error message", "review ty diagnostics", or asks to add, update, or review ty checks, diagnostic messages, subdiagnostics, or concise output behavior.

When should I use Adding Ty Diagnostics?

Adding Ty Diagnostics fits situations like: A user says add a ty rule; add a ty diagnostic; write this new ty diagnostic; change a ty error message.

How do I install Adding Ty Diagnostics in Claude Code?

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

How do I install Adding Ty Diagnostics in Codex?

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

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

What does Adding Ty Diagnostics need to run?

Going by SKILL.md and its folder, Adding Ty Diagnostics needs the command-line tools its instructions call (cargo).

Does Adding Ty Diagnostics access the network?

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

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

Adding Ty Diagnostics 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 Adding Ty Diagnostics use?

About 556 tokens (SKILL.md is roughly 2.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 Adding Ty Diagnostics?

Skills that share tags, products or a category with Adding Ty Diagnostics: Kedro Babysit (kedro-org/kedro, 11k stars), Saleor Commit Workflow (saleor/saleor, 23k stars), Update Dependencies (alorence/django-modern-rpc, 111 stars) and Align Recipe pyproject.toml (google/adk-recipes, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Adding Ty Diagnostics?

astral-sh (a GitHub organization, an official publisher) maintains it in astral-sh/ruff, which has 49,932 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 8, 2026.

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