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/vybestack/llxprt-code/typescript-test-writingnpx skills add vybestack/llxprt-code --skill typescript-test-writinggit clone --depth 1 https://github.com/vybestack/llxprt-codeWrote 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/vybestack/llxprt-code/typescript-test-writing)<a href="https://agentmods.dev/skills/vybestack/llxprt-code/typescript-test-writing"><img src="https://agentmods.dev/badge/skills/vybestack/llxprt-code/typescript-test-writing.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.00066 | $0.01767 |
| Opus 5 | $0.00033 | $0.00883 |
| Sonnet 5 | $0.00013 | $0.00353 |
| Haiku 4.5 | $0.00007 | $0.00177 |
Grade A, and why
typescript-test-writing 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 4d 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 — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing TypeScript Tests in llxprt-code
Distilled from dev-docs/RULES.md. When in doubt, read RULES.md in full — it is the source of truth for development guidelines.
Core principle: TDD is mandatory
Every line of production code must be written in response to a failing test. No exceptions.
Red-Green-Refactor, followed strictly:
- RED: Write a failing test for the next small behavior.
- GREEN: Write ONLY enough code to make the test pass.
- REFACTOR: Only if it improves clarity.
- COMMIT: Feature + tests together; refactoring separately.
Stack rules (non-negotiable)
-
Bun +
bun:testONLY. Never create Vitest or Node test suites, and never add new.jsfiles — everything is TypeScript run with bun. -
TypeScript strict mode: no
any(useunknownwith type guards), no type assertions (use type predicates), explicit return types. -
Import pattern (bun:test re-exports
vi,mock, andMock):import { describe, it, expect, beforeEach, afterEach, vi, type Mock, } from 'bun:test'; -
Prefer immutable data in tests and fixtures (
{ ...cart, items: [...cart.items, item] }); never mutate shared fixtures between tests.
Test behavior, not implementation
✅ Test:
- Public API behavior
- Input → Output transformations
- Edge cases and error conditions
- Integration between units
- Schema validation
❌ Never test:
- Implementation details
- Private methods
- Third-party libraries
- Mock interactions
❌ Never enshrine bugs as specification: do not write a passing test that asserts incorrect behavior, even if that is what the code currently does. If you discover a bug while writing tests: (1) file an issue or ask the user, (2) write a failing test that asserts the CORRECT behavior, (3) fix the production code so the test passes. A suite that encodes bugs as passing tests is worse than no tests — it actively prevents future fixes.
Test structure
- describe: feature/component name.
- it: specific behavior in plain English.
- Arrange-Act-Assert: clear sections; one behavior per test.
- DRY setup: never copy-paste identical beforeEach/afterEach boilerplate
(e.g. temp-dir creation, cleanup) across describe blocks. Extract a shared
helper that wires the lifecycle hooks (e.g. a
useTempDir()helper that registers beforeEach/afterEach internally and returns a lazy accessor). Repeating 5+ lines of identical setup in N describe blocks is a maintenance hazard; one line of shared setup per describe block is the target.
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.
- 4d ago First seen · 174 lines · 66 tokens per session scan A 7a946a2997e1
typescript-test-writing is a skill published in the GitHub repository vybestack/llxprt-code (700 stars, last pushed today), licensed Apache-2.0. It adds 66 tokens to every session and 1,767 once invoked, about $0.0003 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-08-30.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…