typescript-testing

typescript-testing is a skill for Claude Code from shinpr/ai-coding-project-boilerplate. It costs 31 tokens per session (1,575 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 Code

Written for Claude Code: installed under .claude/.

Good fit Use it when adding or reviewing unit tests for critical paths, business logic, external input, environment values, and external services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shinpr/ai-coding-project-boilerplate/typescript-testing
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.

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.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for typescript-testing

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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,575 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00031 $0.01575
Opus 5.5 $0.00012 $0.00630
Sonnet 5.5 $0.00006 $0.00315
Haiku 4.5 $0.00003 $0.00158

Measured 3d ago against content hash 90e1c25bc90c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3d 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 · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 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
  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

    • When a new feature reaches a shared integration point, continuity of the existing feature becomes a proof obligation if its failure would break a primary user journey or public contract, or degrade a secondary observable behavior. Prove it at the cheapest boundary that can expose its failure
    • 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 · 121 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. 3d ago Changed · -1 lines 90e1c25bc90c
  2. 24d ago Changed · -1 lines 412bc2650a2f
  3. 1mo 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 (234 stars, last pushed 3d ago), licensed MIT. It adds 31 tokens to every session and 1,575 once invoked, about $0.0001 per session on Opus 5.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.