Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/cosmix/loom/loom-typescriptnpx skills add cosmix/loom --skill loom-typescriptgit clone --depth 1 https://github.com/cosmix/loomWrote 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/cosmix/loom/loom-typescript)<a href="https://agentmods.dev/skills/cosmix/loom/loom-typescript"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-typescript.svg" alt="Measured on agentmods" 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 | $0.00016 | $0.10325 |
| Opus 5 | $0.00008 | $0.05163 |
| Sonnet 5 | $0.00003 | $0.02065 |
| Haiku 4.5 | $0.00002 | $0.01033 |
Grade A, and why
loom-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 yesterday.
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 — 808 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript Language Expertise
Overview
Type-safe, production-quality TypeScript: the type system's sharp edges, strict-mode config that actually moves the needle, the type-vs-runtime boundary, and framework patterns (zod/tRPC/Prisma/React/Express). Assumes fluency with JS and basic TS — this is reference for the traps and idioms that bite experienced engineers.
Toolchain assumed throughout: Bun (install/run/test), Vite (app dev server and bundler — Rolldown bundling, Oxc transforms and minifier, Lightning CSS), tsdown (library bundler on Rolldown), oxlint (lint), oxfmt (format), tsc --noEmit (type-check). ESLint, Prettier, esbuild, and Babel are the legacy equivalents — do not add them to a project that has this stack. See Toolchain below.
Type System Essentials
Generics
// Constraints + default type param; `this` return for fluent chaining
interface HasId { id: string }
class Repo<T extends HasId = HasId> {
private items = new Map<string, T>();
save(item: T): this { this.items.set(item.id, item); return this; }
find(id: string): T | undefined { return this.items.get(id); }
}
// Return `as const` to preserve a tuple/literal shape instead of widening
function pair<A, B>(a: A, b: B) { return [a, b] as const; } // readonly [A, B]
Utility types
| Utility | Result |
|---|---|
Partial<T> / Required<T> |
all props optional / required |
Readonly<T> |
all props readonly (shallow) |
Pick<T,K> / Omit<T,K> |
keep / drop keys K |
Record<K,V> |
object with keys K, values V |
Extract<U,V> / Exclude<U,V> |
keep / drop union members of U assignable to V |
NonNullable<T> |
strip null / undefined |
ReturnType<F> / Parameters<F> |
function return type / param tuple |
Awaited<T> |
recursively unwrap Promise (prefer over a hand-rolled Unwrap) |
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.
- yesterday First seen · 808 lines · 16 tokens per session scan A 20bfcc87b60b
loom-typescript is a skill published in the GitHub repository cosmix/loom (54 stars, last pushed today), licensed MIT. It adds 16 tokens to every session and 10,325 once invoked, about $0.0001 per session on Opus 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-03.
Other skills, from other repositories
js-gof
Apply Gang of Four and related design patterns in JavaScript and TypeScript. Use when implementing creational, structural, or behavioral patterns, or when the user mentions factories, builder, prototype, flyweight, singleton, object pool, adapter, wrapper, decorator, proxy, bridge, composite, facade, chain of…
error-handling
Apply error handling and recovery patterns in JavaScript/TypeScript or Node.js. Use when implementing error handling, retry logic, or when the user mentions domain errors, error recovery, error escalation.
js-conventions
Apply Metarhia JavaScript style. Use when writing or editing .js, .mjs, .ts files (with certain corrections for typescript), formatting code, or when the user asks about code style or linting.
apple-cktool-js
Builds and troubleshoots CloudKit automation with Apple's CKTool JS packages, including @apple/cktool.database, @apple/cktool.target.nodejs, and @apple/cktool.target.browser. Use when Codex needs typed JavaScript or TypeScript for CloudKit schema import, export, validation, or reset; container and team discovery…
autovault-skill
Understand AutoVault-managed skills and how to install or update them. Use when a skill is visible via symlink, when authoring or editing SKILL.md, or before touching /.autovault/skills. Vault writes must go through autovault add-local or MCP proposeskill/updateskill so AutoVault re-signs; never hand-edit vaulted…
bun-script
Use when writing a TypeScript script with Bun. Covers the template, conventions, and required patterns.