typescript-testing

typescript-testing is a skill for Claude Code, Codex from shinpr/ai-coding-project-boilerplate. It costs 31 tokens per session (1,573 once invoked), scanned A, original, MIT.

A set of rules for writing and reviewing TypeScript tests, with framework-specific guidance when the repository uses Vitest. It focuses on testing observable behavior with independent and repeatable tests.

In plain words
What is it for?
Use it when adding or reviewing unit tests for critical paths, business logic, external input, environment values, and external services.
Why use it?
It helps prevent tests that pass only because of shared state, uncontrolled time or randomness, or mocked behavior that does not reflect the real boundary.

Skill for Claude CodeCodex

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/shinpr/ai-coding-project-boilerplate/typescript-testing
Any agent
npx skills add shinpr/ai-coding-project-boilerplate --skill typescript-testing
Clone the repo
git clone --depth 1 https://github.com/shinpr/ai-coding-project-boilerplate

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 typescript-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/shinpr/ai-coding-project-boilerplate/typescript-testing.svg)](https://agentmods.dev/skills/shinpr/ai-coding-project-boilerplate/typescript-testing)
Your own site
<a href="https://agentmods.dev/skills/shinpr/ai-coding-project-boilerplate/typescript-testing"><img src="https://agentmods.dev/badge/skills/shinpr/ai-coding-project-boilerplate/typescript-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,573 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00031 $0.01573
Opus 5 $0.00015 $0.00787
Sonnet 5 $0.00006 $0.00315
Haiku 4.5 $0.00003 $0.00157

Measured 4d ago against content hash 89a847981883, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

typescript-testing 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.

.claude/skills-en/typescript-testing/SKILL.md · 123 lines

How it starts

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

TypeScript Testing Rules

Prerequisite Detection

Inspect package.json, the lockfile, test configuration, and existing test imports before selecting a framework or command. Apply Vitest-specific rules only when Vitest is configured; otherwise use the repository's configured TypeScript test harness while preserving the behavior, isolation, and evidence rules below. If no runnable harness is identifiable, report the inspected paths and missing command or configuration.

Test Framework

  • Vitest: Use when selected by repository configuration or existing tests
  • Test imports: import { describe, it, expect, beforeEach, vi } from 'vitest'
  • Mock creation: Use vi.mock()

Basic Testing Policy

Quality Requirements

  • Regression protection: concentrate tests on critical paths, business logic, and behavior whose regression would matter. Add a test when an unguarded behavior creates a material regression risk
  • Independence: Each test can run independently without depending on other tests
  • Reproducibility: Control time, randomness, environment values, and external I/O so identical inputs produce the same observable result
  • Readability: Each test names one behavior, separates setup/action/assertion, and keeps fixtures limited to values used by that behavior

Test Types and Scope

  1. Unit Tests

    • Verify behavior of individual functions or classes
    • Mock all external dependencies
    • Most numerous, implemented with fine granularity
  2. Integration Tests

    • Verify coordination between multiple components
    • Use real in-process components that are part of the behavior under test; for external I/O see Mock Scope Decision
    • Verify flows that implement a primary acceptance criterion or cross an in-process component boundary
  3. Cross-functional Verification in E2E Tests

    • Mandatory verification of impact on existing features when adding new features
    • Classify each integration point: High when failure breaks a primary user journey or public contract, Medium when failure degrades a secondary observable behavior. Cover High and Medium
    • Verification pattern: Existing feature operation -> Enable new feature -> Verify continuity of existing features
    • Success criteria: Preserve the response fields and observable behavior named by the source acceptance criteria; apply a processing-time threshold only when a requirement or project configuration defines its value and measurement method
    • Designed for automatic execution in CI/CD pipelines

Read the full file on GitHub · 123 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. 4d ago First seen · 123 lines · 31 tokens per session scan A 89a847981883

Subscribe to this mod's changes

typescript-testing is a skill published in the GitHub repository shinpr/ai-coding-project-boilerplate (227 stars, last pushed 6d ago), licensed MIT. It adds 31 tokens to every session and 1,573 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-08-30.

Related

Other skills, from other repositories

python-testing

Guidelines for writing and running tests in the Agent Framework Python codebase. Use this when creating, modifying, or running tests.

microsoft/agent-framework · 29 tokens

xberg-typescript-toolchain

Work on Xberg TypeScript or JavaScript packages with the repository's actual poly, pnpm, npm, Vitest, napi-rs, wasm-pack, and integration-package boundaries. Load for TS/JS tooling or package changes, not Rust-only binding generation.

xberg-io/xberg · 60 tokens

test-bridge

Bridge Server (TypeScript) のテスト実行・型チェック・テスト記述ガイド.

K9i-0/ccpocket · 25 tokens

typescript-tests

Apply, review, and explain testing conventions from the TypeScript Style Guide. Use automatically for TypeScript and TSX test tasks involving test design, AAA, mocking, isolation, black-box testing, Testing Library queries, test descriptions, or snapshots.

mkosir/typescript-style-guide · 52 tokens

rspec-conventions

Rootstrap RSpec conventions. Use when writing, reviewing, or editing RSpec test files (spec//spec.rb, spec/railshelper.rb, spec/spechelper.rb, spec/support//.rb) or factories. Covers describe/context structure, let/subject, matchers, factories, mocking/stubbing, shared examples, and spec types (model, request…

rootstrap/rails_api_base · 82 tokens

angular

Use when building, refactoring, or debugging Angular (v20/21+): standalone components, signals, zoneless change detection, @if/@for/@defer control flow, inject() DI, resource()/httpResource(), RxJS interop, NgRx SignalStore, ng CLI. NOT React (that is react), NOT Next.js (that is nextjs), NOT a TypeScript language…

ericrisco/rsc-harness · 89 tokens