tsz: Skill for Claude Code

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

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

A set of rules for preserving the architecture of the TSZ TypeScript checker and its related tools. It explains which part should own parsing, symbols, type solving, diagnostics, output, and interfaces such as the language server.

In plain words
What is it for?
Use it when planning or reviewing changes to the checker, solver, binder, emitter, language server, WebAssembly build, or command-line tool.
Why use it?
It reduces accidental boundary violations, duplicated logic, and fixes placed in the wrong layer. It also gives reviewers a consistent way to judge semantic changes.

Skill for Claude CodeCodex

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

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 →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/arch/arch_guard.py.

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-architecture/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-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/tsz-org/tsz/tsz-architecture/github.svg)](https://agentmods.dev/skills/tsz-org/tsz/tsz-architecture)
Your own site
<a href="https://agentmods.dev/skills/tsz-org/tsz/tsz-architecture"><img src="https://agentmods.dev/badge/skills/tsz-org/tsz/tsz-architecture/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-architecture

Your own site · 80×15
<a href="https://agentmods.dev/skills/tsz-org/tsz/tsz-architecture"><img src="https://agentmods.dev/badge/skills/tsz-org/tsz/tsz-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 520 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.00066 $0.00520
Opus 5.5 $0.00026 $0.00208
Sonnet 5.5 $0.00013 $0.00104
Haiku 4.5 $0.00007 $0.00052

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

Security

Grade A, and why

tsz-architecture 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-architecture/SKILL.md · 56 lines

What it actually says

TSZ Architecture

Use for ownership-boundary work. Default direction: solver-first semantics, thin checker, syntax parser, symbol/flow binder, output-only emitter.

Rules

  • Read AGENTS.md and docs/plan/ROADMAP.md for conformance, emit, performance, architecture, LSP/WASM, Sound Mode, or DRY cleanup work.
  • Inspect overlapping PRs/issues.
  • State: When <structural condition>, tsc does X; tsz does X through <owner>.
  • No fixture paths, user names, source snippets, rendered strings, or single test names as decision inputs.
  • Prefer one query/boundary helper over local checker branches.

Owners

  • Scanner: tokens and interning.
  • Parser: syntax-only AST.
  • Binder: symbols, scopes, hoisting, flow graph.
  • Solver: relations, evaluation, inference, instantiation, operations, narrowing, semantic caches.
  • Checker: orchestration, diagnostics, source spans.
  • Emitter: JS/DTS output and transform scheduling.
  • LSP/WASM/CLI: API consumers.

Boundary Workflow

  1. Classify as WHAT (solver/query boundary) or WHERE (checker location/ diagnostic orchestration).
  2. Search existing boundaries: rg "struct .*Request|RelationRequest|query_boundaries|TypeData" crates/tsz-checker/src crates/tsz-solver/src
  3. Put checker-facing semantic adapters under crates/tsz-checker/src/query_boundaries/.
  4. Avoid new checker TypeKey matching, direct CompatChecker, raw interning, or type-shape recursion.
  5. Add owning-crate tests and adjacent cases varying names/wrappers.

Guards

python3 scripts/arch/arch_guard.py
scripts/arch/check-checker-boundaries.sh
python3 scripts/arch/test_arch_guard.py

Use targeted cargo nextest run; wrap heavy runs with scripts/safe-run.sh.

PR notes: structural rule, owner layer, adjacent matrix, guard/tests, temporary debt/removal condition.

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 · 56 lines · 66 tokens per session scan A 36e9db5b06f9

Subscribe to this mod's changes

tsz-architecture is a skill published in the GitHub repository tsz-org/tsz (577 stars, last pushed today), licensed Apache-2.0. It adds 66 tokens to every session and 520 once invoked, about $0.0003 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.