Skip to content
Back to skills

Adding Ty Diagnostics

ASecurity

Use when a user says "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.

  • 45 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 19, 2026
ai-agentsgodocumentation

Works with

  • terminal

Security analysis

A100/100

Scanned September 19, 2026

npx -y skills add modem-dev/ossrules --skill adding-ty-diagnostics --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Adding Ty Diagnostics?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Adding Ty Diagnostics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modem-dev-adding-ty-diagnostics/badge)](https://www.skillsdirectory.com/skills/modem-dev-adding-ty-diagnostics)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: adding-ty-diagnostics
description: Use when a user says "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 or changing a ty diagnostic, especially as part of a new ty check.

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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.