Borrowing it
Nothing to install: this file belongs to shift-editor/shift. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shift-editor/shift/main/.agents/skills/typescript/SKILL.mdgit clone --depth 1 https://github.com/shift-editor/shiftWrote 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.
[](https://agentmods.dev/skills/shift-editor/shift/typescript)<a href="https://agentmods.dev/skills/shift-editor/shift/typescript"><img src="https://agentmods.dev/badge/skills/shift-editor/shift/typescript/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.
<a href="https://agentmods.dev/skills/shift-editor/shift/typescript"><img src="https://agentmods.dev/badge/skills/shift-editor/shift/typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00108 | $0.02676 |
| Opus 5.5 | $0.00043 | $0.01070 |
| Sonnet 5.5 | $0.00022 | $0.00535 |
| Haiku 4.5 | $0.00011 | $0.00268 |
Grade A, and why
typescript 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/typescript — How TypeScript is written in Shift
TypeScript makes { points?: … }, ?. and ?? [] free to write, so a vague type never pays for itself; every caller does. An audit found 350 ?? null / ?? [] fallbacks, about 70 hand-written "take the first item" sequences and 95 calls that filtered the scene again for what they wanted. Each was a caller making up for a type or owner that did not answer its question. The rules below put the answer on the type, once.
The rule
When callers repeat the same fallback, filter or chain, the type they are reading is missing a method or is shaped wrong. Fix the type, then call it by name.
Collections
- A collection field is never optional. An empty collection means "none".
PositionTargetscarriespointsandanchorsalways, so readers writetargets.points, nottargets.points ?? [], and asktargets.hasAnchors. Keep an optional collection only where absence differs from empty (an option that falls back to a default, a wire field mirroring Rust'sOption<Vec<_>>), and say why in the disable comment. Enforced byshift/no-optional-collection-field. - Lookups return
T | null, neverundefined. Hold id-keyed collections inEntityMapfrom@shift/types:getreturnsnull,requirethrows a namedEntityNotFoundErrorwhen absence is a bug for that caller, andwhere(predicate)filters in insertion order. Expose indexes asReadonlyEntityMap. Enforced byshift/no-map-get-to-null;no-mutable-collection-fieldtreatsEntityMapfields likeMapfields. - Ask first: does Rust already compute this, or could another consumer need the same answer? Rust means shift-font and its libraries (fontc, fea-rs, fontdrasil, harfrust, line breaking); the other consumers are the CLI, export, the window's engine, the utility process, the SDK and agents. If yes, it has one implementation, in Rust, and every consumer calls it: expose it from shift-font through the engine and make the TypeScript method a one-line call (
Kerning.between→engine.kerningRun; shaping → harfrust through the shaping module; feature compiling → fea-rs; interpolation → fontdrasil). Never write it in TypeScript "for now": two copies drift. If no (a lookup by id or name, a count, stored order, reactivity, UI state), the TypeScript model owns it, beside its siblings: before writingfont.sources.find(({ name }) => name === n)outside the owner, look for the query there (Font.entryForName,recordForId,source(id),layerIdFor), and if none exists add it (Font.sourceNamed(name)next tosource(id)) and point every caller at it. Unsure → Rust.scan:ts --kind model-rulelists model methods that compute without the engine;--kind repeated-filterlists predicates repeated across files. - Prove "at least one" in the type. When a list is never empty, type it
readonly [T, ...T[]]and readlist[0]without a fallback. - Use the built-ins before spreading. Query an iterator directly (
map.values().filter(…).toArray();.some/.every/.findneed no array), copy-sort withtoSorted, merge sets withunion/intersection/difference, group withMap.groupBy. Enforced byshift/prefer-iterator-helpers. - A combined collection used in several places is a type.
ThemeCatalogbuilds the shipped-then-user theme list once;KerningGroups.atPositionsorts once per change. Spread to build a value once, not at every read. - Pass a maybe-value straight through. Write
x: v === undefined ? undefined : f(v); never spread conditionally to leave a key out, and don't add a helper function to build it. Where a stored shape must tell a missing key from an undefined one, keep the spread with a disable comment giving the reason. Enforced byshift/no-conditional-spread.
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.
- today Changed · +6 lines 2d53d5a1f43a
- 5d ago First seen · 92 lines · 108 tokens per session scan A 2679afcb801f
typescript is a skill published in the GitHub repository shift-editor/shift (379 stars, last pushed today), licensed Apache-2.0. It adds 108 tokens to every session and 2,676 once invoked, about $0.0004 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-10-25.
Other skills, from other repositories
ax-rust-signature
Use when writing Rust code with axllm for string signatures, field descriptors, JSON schema output, validation, and typed tool argument shapes.
dd-code-generation
Use pup CLI for immediate Datadog operations or generate code for integration into applications.
ax-rust-llm
Use when writing Rust code with axllm for using the generated Ax package, factory functions, package docs, examples, and API reference.
solana-toolkit-guide
Guide to the Solana Wallet Toolkit — vanity address generation with multi-threaded search, official Solana Labs libraries, Rust and TypeScript implementations. Includes wallet generation, custom address prefixes, and OG names on the blockchain.
solana
Use when working on Solana software, including one or more of: Solana client code using TypeScript, Rust libraries that use Solana crates, Anchor programs, Quasar programs, LiteSVM tests, including Rust program files, TypeScript tests, and Anchor.toml or Quasar.toml configuration. Designed to create minimal, reusable…
docstring-generator
Generate and update language-idiomatic doc comments for TypeScript (TSDoc/JSDoc) and Rust (Rustdoc). Use when asked to "add docs", "document this file", "generate docstrings", "add JSDoc", "add Rustdoc", "write TSDoc", or when working with TypeScript or Rust source files that need documentation comments. Supports…