ts-library

ts-library is a skill for Claude Code, Codex from sampleXbro/agentsmesh. It costs 65 tokens per session (1,203 once invoked), scanned A, a copy of ts-library, MIT.

A toolkit of guidance for building TypeScript libraries and npm packages. It covers project setup, package exports, build tools, type-safe APIs, testing, and publishing.

In plain words
What is it for?
Use it to start a library, configure CommonJS and ES modules, design typed APIs, set up tests, or prepare releases to npm.
Why use it?
It brings the main decisions involved in creating and releasing a reusable TypeScript package into one place.

Skill for Claude CodeCodex

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

Install

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.

agentmods
npx agentmods add skills/samplexbro/agentsmesh/ts-library
Any agent
npx skills add sampleXbro/agentsmesh --skill ts-library
Clone the repo
git clone --depth 1 https://github.com/sampleXbro/agentsmesh

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 ts-library

README.md
[![agentmods](https://agentmods.dev/badge/skills/samplexbro/agentsmesh/ts-library.svg)](https://agentmods.dev/skills/samplexbro/agentsmesh/ts-library)
Your own site
<a href="https://agentmods.dev/skills/samplexbro/agentsmesh/ts-library"><img src="https://agentmods.dev/badge/skills/samplexbro/agentsmesh/ts-library.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,203 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 95% copy Near-identical to another mod 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.00065 $0.01203
Opus 5 $0.00032 $0.00602
Sonnet 5 $0.00013 $0.00241
Haiku 4.5 $0.00006 $0.00120

Measured 2d ago against content hash 5637a8ee27db, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ts-library 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 2d 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.

Origin

This is a copy

95% identical to ts-library — 61 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/ts-library/SKILL.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Purpose

TypeScript Library Development

Patterns for authoring high-quality TypeScript libraries, extracted from studying unocss, shiki, unplugin, vite, vitest, vueuse, zod, trpc, drizzle-orm, and more.

When to Use

  • Starting a new TypeScript library (single or monorepo)
  • Setting up package.json exports for dual CJS/ESM
  • Configuring tsconfig for library development
  • Choosing build tools (tsdown, unbuild)
  • Designing type-safe APIs (builder, factory, plugin patterns)
  • Writing advanced TypeScript types
  • Setting up vitest for library testing
  • Configuring release workflow and CI

For Nuxt module development: use nuxt-modules skill

Quick Reference

Working on... Load file
New project setup ./references/project-setup.md
Package exports ./references/package-exports.md
tsconfig options ./references/typescript-config.md
Build configuration ./references/build-tooling.md
ESLint config ./references/eslint-config.md
API design patterns ./references/api-design.md
Type inference tricks ./references/type-patterns.md
Testing setup ./references/testing.md
Release workflow ./references/release.md
CI/CD setup ./references/ci-workflows.md

Loading Files

Consider loading these reference files based on your task:

Read the full file on GitHub · 106 lines

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. 2d ago First seen · 106 lines · 65 tokens per session scan A 5637a8ee27db

Subscribe to this mod's changes

ts-library is a skill published in the GitHub repository sampleXbro/agentsmesh (24 stars, last pushed yesterday), licensed MIT. It adds 65 tokens to every session and 1,203 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to ts-library, differing in 61 lines, and is treated as a copy.