tsz: Skill for Claude Code

.agents/skills/tsz-tracing/SKILL.md

tsz-tracing is a skill for Claude Code, Codex from tsz-org/tsz. It costs 46 tokens per session (502 once invoked), scanned A, original, Apache-2.0.

A tracing guide for investigating TSZ compiler behavior with structured logs. Tracing records nested operations so you can see which parts of the compiler ran and what they did.

In plain words
What is it for?
It is for reducing failures to small TypeScript examples, comparing TSZ with the TypeScript compiler, and inspecting solver, checker, binder, or query traces.
Why use it?
It provides a repeatable alternative to adding temporary print statements when type inference, narrowing, or conformance tests behave unexpectedly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is tsz-org/tsz's own configuration. It tells Claude Code and Codex how to work on tsz itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tsz configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tsz-org/tsz. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tsz-org/tsz/main/.agents/skills/tsz-tracing/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/tsz-org/tsz

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tsz-tracing

README.md
[![agentmods](https://agentmods.dev/badge/skills/tsz-org/tsz/tsz-tracing/github.svg)](https://agentmods.dev/skills/tsz-org/tsz/tsz-tracing)
Your own site
<a href="https://agentmods.dev/skills/tsz-org/tsz/tsz-tracing"><img src="https://agentmods.dev/badge/skills/tsz-org/tsz/tsz-tracing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tsz-tracing

Your own site · 80×15
<a href="https://agentmods.dev/skills/tsz-org/tsz/tsz-tracing"><img src="https://agentmods.dev/badge/skills/tsz-org/tsz/tsz-tracing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 502 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00502
Opus 5.5 $0.00018 $0.00201
Sonnet 5.5 $0.00009 $0.00100
Haiku 4.5 $0.00005 $0.00050

Measured 23d ago against content hash 149373c3c535, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tsz-tracing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 23d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/tsz-tracing/SKILL.md · 49 lines

What it actually says

TSZ Tracing

Use tracing before adding debug prints. It is for conformance failures, inference/narrowing/assignability surprises, and runtime path discovery.

Commands

TSZ_LOG=debug TSZ_LOG_FORMAT=tree cargo run -p tsz-cli -- file.ts
TSZ_LOG=debug TSZ_LOG_FORMAT=json cargo run -p tsz-cli -- file.ts
TSZ_LOG="tsz_solver=trace,tsz_checker=debug" TSZ_LOG_FORMAT=tree cargo run -p tsz-cli -- file.ts
TSZ_LOG="tsz_solver::narrowing=trace" TSZ_LOG_FORMAT=tree cargo run -p tsz-cli -- file.ts

Use RUST_LOG only as fallback. TSZ_LOG_FORMAT values: tree, json, text.

Workflow

  1. Reduce to the smallest .ts witness.
  2. Compare expected behavior with npx tsc --noEmit file.ts.
  3. Start broad (debug, tree), then narrow by module.
  4. Capture large traces with 2> trace.log, head, tail, rg, or grep "type_id=<id>".
  5. Use structured trace fields and spans; never add ad-hoc stdout/stderr debugging.

Useful Filters

  • Narrowing: TSZ_LOG="tsz_solver::narrowing=trace".
  • Relations/inference: TSZ_LOG="tsz_solver=debug".
  • Checker lookup/cache: TSZ_LOG="tsz_checker=debug".
  • Query events: TSZ_LOG=tsz::query_json=trace TSZ_LOG_FORMAT=json.

Read Output

Tree output nests spans, shows elapsed ms, level, module path, event, and fields. Look for the first structural divergence: wrong narrowed member, unexpected relation result, missing lazy ref resolution, cache hit/miss, or diagnostic source-span decision.

Tracing goes to stderr and is initialized only when TSZ_LOG/RUST_LOG is set. For trace examples and quick reminders, read QUICKREF.md.

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 23d ago First seen · 49 lines · 46 tokens per session scan A 149373c3c535

Subscribe to this mod's changes

tsz-tracing is a skill published in the GitHub repository tsz-org/tsz (577 stars, last pushed today), licensed Apache-2.0. It adds 46 tokens to every session and 502 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-28.