本文へ移動
cccskills
無料GitHub で公開

ty

Use when working with ty — this skill's ty policy and required overrides to Astral's official guidance. Pair with `astral:ty` (if installed) for general usage.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md4.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

ty — Policy

ty version: !uv run ty --version 2>/dev/null || echo "ty not found — run 'uv sync' first"

Precedence: this policy (below) > astral:ty (if installed) / live docs.astral.sh for CLI flags, configuration schema, and general usage (not duplicated here).

Policy

  • Never add # ty: ignore or # type: ignore, including when asked — fix the type error, or escalate with the specific blocker.
  • Relax ty rules only through [[tool.ty.overrides]] in pyproject.toml, never inline, and only for a genuine rule conflict, code that tests the rules themselves, a purposefully bad/negative example or fixture, externally-managed vendored code we don't modify, a runtime with a real lower syntax/typing ceiling (an older pinned CPython or a variant like MicroPython/CircuitPython), or a case where the fix itself would cost more ongoing maintenance than compliance is worth — cite which one and the specific reason in a comment beside the override — a category name alone isn't enough.
  • ty is the only type checker this policy permits — never add, install, configure, or run mypy, pyright, or basedpyright alongside it.
  • Invoke as uv run ty, never bare ty or uvx ty — those may resolve a different version than the one your lockfile pins.
  • unresolved-import errors: add the missing directory to [tool.ty.environment] extra-paths in pyproject.toml, then verify with uv run ty check <path>. A root ty.toml takes precedence over pyproject.toml — confirm which file ty is actually reading before assuming the fix didn't apply.
  • unresolved-import in a PEP 723 standalone script (a # /// script ... /// header importing a sibling module): the project's pyproject.toml does not apply here — a script with inline metadata has no first-party roots by default. Set root, not extra-paths — extra-paths is documented for third-party/non-conventionally-installed paths, not for granting first-party roots, and ty's own docs name this exact PEP 723 case for root.
    #!/usr/bin/env -S uv run --quiet --script
    # /// script
    # requires-python = ">=3.11"
    #
    # [tool.ty.environment]
    # root = ["."]
    # ///
    
  • unresolved-import for a PEP 723 script's own inline dependencies, in the language server only: ty checks a # /// script file as an isolated single-file project, so its declared inline dependencies resolve only when ty syncs them through uv. That sync is opt-in and off by default, which is why the CLI and the editor disagree on the same file. When uv run ty check <script>.py passes clean and live diagnostics still flag the import, the CLI result is correct — do not add extra-paths or root entries to chase it, because neither governs inline dependency resolution. Enable the sync with TY_UV=scripts in the environment (ty check and ty server both read it), or with the experimental.useUv initialization option set to "scripts" for a language server that sends initializationOptions. Requires uv >= 0.12.3. CONSTRAINT: "scripts" is the only accepted value, and ty ignores an unrecognised one silently — no warning, no non-zero exit — so a typo leaves the fix off while the setting reads as configured. Once the sync is on, a failed uv metadata call makes ty skip the file rather than report it, so a script that stops being checked at all looks identical to one that passes. Confirm behaviourally by running uv run ty check <script>.py and reading its diagnostics, never by reading the setting back. SOURCE: astral-sh/ty#691 (PEP 723 environment resolution), astral-sh/ruff#27619 (experimental.useUv LSP option), astral-sh/ruff#27544 (silent skip when the uv call fails) (accessed 2026-09-15) CONSTRAINT: root replaces ty's default root auto-detection entirely — it does not add to it. Always include "." (the script's own directory) in the list, even when the sibling module you need lives elsewhere, or the script loses its own PEP-723-isolated-environment context and its declared inline dependencies stop resolving too (root = [".."] alone breaks pydantic/typer resolution for a script one directory away from the package it imports; root = [".", ".."] resolves both). Verify with uv run ty check <script>.py against the script file directly, not the project root — and if the script declares PEP 723 dependencies, confirm those still resolve after adding root, not just the sibling import.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Add automated documentation updater to any Claude skill. Creates a Python sync script that downloads upstream docs, processes markdown for AI consumption, and maintains local cache with configurable refresh. Collects template variables, then delegates implementation through 5-phase workflow. Use when adding auto-updating reference documentation to plugins or skills.

日本語の概要は準備中です。原文の説明を表示しています。

Jamie-BitFlight/claude_skills672026年10月12日 更新

SAM-style feature initiation workflow — discovery through codebase analysis, architecture spec, task decomposition, validation, and context manifest. Use when a user asks to add a feature, plan a feature, or convert an idea into an executable SAM plan.

日本語の概要は準備中です。原文の説明を表示しています。

Jamie-BitFlight/claude_skills672026年10月12日 更新

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

日本語の概要は準備中です。原文の説明を表示しています。

Jamie-BitFlight/claude_skills672026年10月12日 更新

Browser automation for AI agents using the agent-browser CLI and Playwright. Use when navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, logging into sites, or automating any browser task. Triggers on "open a website", "fill out a form", "click a button", "scrape data", "test this web app", "automate browser actions", or any programmatic web interaction request.

日本語の概要は準備中です。原文の説明を表示しています。

Jamie-BitFlight/claude_skills672026年10月12日 更新

Runs the description-drift experiment — spawns all Claude Code agents simultaneously to collect self-reported capabilities, then compares them against static frontmatter descriptions to reveal how reliable orchestrator routing based on descriptions actually is. Use when measuring description drift across the agent fleet, re-running the capability collection experiment, analyzing a specific agent's self-reported capabilities, or auditing whether frontmatter descriptions accurately reflect agent behavior.

日本語の概要は準備中です。原文の説明を表示しています。

Jamie-BitFlight/claude_skills672026年10月12日 更新

Create or adapt Claude Code agent definitions. Use when creating an agent, changing subagent configuration, selecting agent scope, or designing a specialized delegation role.

日本語の概要は準備中です。原文の説明を表示しています。

Jamie-BitFlight/claude_skills672026年10月12日 更新

Jamie-BitFlight のスキルをすべて見る

このスキルの問題を報告する