agentleFS
AstralKnown publisherastral-sh/ruff/.agents/skills/adding-ty-diagnostics/SKILL.md

adding-ty-diagnostics

Skill50k starsChanged 2 months agoMITView on GitHub

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.

Trending

Steady talk.about the whole repository

Jan 2026: 1 mentionFeb 2026: 1 mentionMar 2026: 1 mentionApr 2026: 2 mentionsMay 2026: 1 mentionJun 2026: 2 mentionsJul 2026: 2 mentionsAug 2026: 1 mentionSep 2026: 2 mentionsOct 2026: 2 mentionsNov 2026: 3 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the astral-sh/ruff repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about astral-sh/ruff

The biggest 5 of 82 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 82

Talked about on Bluesky, GitHub and Hacker News (82 times).

On Bluesky · 50

45 more on Bluesky

On GitHub · 25

20 more on GitHub

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

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

    line 8
  2. Distinctive:

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

    line 12
  3. Very specific:

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

    line 14
  4. Very specific:

    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 …

    line 16
  5. Very specific:

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

    line 27
  6. Very specific:

    When using the declare_lint!

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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").

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.