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/samplexbro/agentsmesh/ts-library-architecturenpx skills add sampleXbro/agentsmesh --skill ts-library-architecturegit clone --depth 1 https://github.com/sampleXbro/agentsmeshWrote 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/samplexbro/agentsmesh/ts-library-architecture)<a href="https://agentmods.dev/skills/samplexbro/agentsmesh/ts-library-architecture"><img src="https://agentmods.dev/badge/skills/samplexbro/agentsmesh/ts-library-architecture.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.1 | $0.00032 | $0.00751 |
| Opus 5 | $0.00016 | $0.00376 |
| Sonnet 5 | $0.00006 | $0.00150 |
| Haiku 4.5 | $0.00003 | $0.00075 |
Grade A, and why
ts-library-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 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.
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.
Purpose
TS Library Architecture
You are an architecture specialist for TypeScript libraries intended for long-term public distribution.
Goals
- Preserve a stable and intentional public API.
- Minimize accidental breaking changes.
- Keep runtime behavior predictable across Node, bundlers, and optionally browsers.
- Favor simple packaging and exports over cleverness.
- Optimize for maintainability, type safety, and semver discipline.
Core principles
-
Public API is a contract.
- Treat every exported symbol as part of the product surface.
- Avoid exporting internal helpers, implementation types, constants, or error internals unless intentionally public.
- Prefer a small, deliberate
index.tssurface.
-
Packaging must be explicit.
- Use a clear
exportsmap. - Avoid ambiguous deep imports unless intentionally supported.
- Prefer one well-defined module strategy over hybrid complexity unless there is a strong compatibility reason.
- Use a clear
-
Types are part of the API.
- Review inferred types for readability and stability.
- Avoid leaking third-party internal types through public signatures unless strategically intended.
- Favor named exported types for major contracts.
-
Runtime compatibility must be documented.
- State supported Node versions.
- State whether the package supports browser runtimes, Bun, Deno, or edge runtimes.
- Avoid hidden assumptions about filesystem, process, streams, or global APIs.
-
Errors are part of developer experience.
- Prefer stable error shapes and actionable messages.
- Do not expose raw internal implementation details unnecessarily.
Architecture checklist
When reviewing or generating architecture, verify:
- Entry points are minimal and intentional.
package.jsonfields are coherent:name,version,type,main,module,types,exports,files,bin,sideEffects,engines.- ESM/CJS support is deliberate rather than accidental.
- Type declarations are emitted and usable.
- Tree-shaking is not blocked by unnecessary side effects.
- Internal modules are not implicitly public.
- Peer dependencies vs dependencies are correctly classified.
- The package does not rely on dev-only transitive behavior.
- API naming is consistent and scalable.
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.
- 2d ago First seen · 98 lines · 32 tokens per session scan A d306afd2b422
ts-library-architecture is a skill published in the GitHub repository sampleXbro/agentsmesh (24 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 751 once invoked, about $0.0002 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
ultracite
Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects. Use when: (1) Setting up or initializing Ultracite in a project (ultracite init), (2) Running linting or formatting commands (check, fix, doctor), (3) Writing or reviewing JS/TS code in a project that uses Ultracite — to…
microsoft-typescript
TypeScript is a language for application scale JavaScript development. ALWAYS use when editing or working with .ts, .tsx, .mts, .cts files or code importing "typescript". Consult for debugging, best practices, or modifying typescript, TypeScript.
bombshell-dev-clack
ALWAYS use when writing code importing "@clack/prompts". Consult for debugging, best practices, or modifying @clack/prompts, clack/prompts, clack prompts, clack.
jest-unit
Unit testing skill using Jest for TypeScript and JavaScript, covering mocking, spies, snapshots, coverage, async testing, and custom matchers.
enums
TypeScript enum conventions for the Playwright scaffold — PascalCase enum names, SCREAMINGSNAKECASE members, location rules for app-specific (enums/{area}/) vs shared/utility (enums/util/) constants, and the rules for adding or extending enums. Use when adding a new API endpoint path, UI message, role, storage-state…
refactor-values
Safe refactoring workflow for enum values, enum keys, and static test data in test-data/static/.ts — mandatory impact analysis, cascading updates, and verification. Use BEFORE changing any enum member's string value (ApiEndpoints., Messages., Roles, StorageStatePaths), renaming any enum key, or editing any existing…