Agent skill

Typescript Testing

by shinpr in shinpr/ai-coding-project-boilerplate

Applies repository-aware TypeScript test design, behavior evidence, isolation, and mock-boundary criteria.

MITAuto-check passedTesting & QA

Install Typescript Testing

skills CLI
$ npx skills add shinpr/ai-coding-project-boilerplate --skill typescript-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install shinpr/ai-coding-project-boilerplate typescript-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/shinpr/ai-coding-project-boilerplate.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills-en/typescript-testing .claude/skills/typescript-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
typescript-testing
GitHub stars
232
Token cost
~2.1k tokens
SKILL.md length
1,097 words
Files
1
Skills in repo
42
Repo updated
First seen
Licence
MIT

At a glance

Applies repository-aware TypeScript test design, behavior evidence, isolation, and mock-boundary criteria.

  • Works in 3 steps: Unit Tests → Integration Tests → Cross-functional Verification
  • Reviewing unit tests
  • SKILL.md covers Prerequisite Detection, Test Framework, Basic Testing Policy and Test Implementation Conventions, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Typescript Testing is an agent skill from shinpr/ai-coding-project-boilerplate. Applies repository-aware TypeScript test design, behavior evidence, isolation, and mock-boundary criteria. Use when writing or reviewing unit tests.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Unit testing. It works with TypeScript and Vitest. The repository describes itself as: Agentic coding TypeScript boilerplate for Claude Code: sub-agent workflows with built-in quality checks and context engineering. The licence is MIT.

When your agent uses it

  • Reviewing unit tests
  • Tasks that involve Unit testing

Example prompts

  • “Use the typescript-testing skill to apply repository-aware TypeScript test design, behavior evidence, isolation, and mock-boundary criteria”
  • “/typescript-testing”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Unit Tests
  2. Integration Tests
  3. Cross-functional Verification

What it can do on your machine

Read from SKILL.md and the folder at commit 56913a2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Typescript Testing loads about 2.1k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 1,097 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from shinpr/ai-coding-project-boilerplate at commit 56913a2, republished under its MIT licence (© shinpr). 1,097 words, ~2,065 tokens.

Download SKILL.mdSave it as .claude/skills/typescript-testing/SKILL.md (or your agent's skills folder).
name
typescript-testing
description
Applies repository-aware TypeScript test design, behavior evidence, isolation, and mock-boundary criteria. Use when writing or reviewing unit tests.

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

    • 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

Test Implementation Conventions

Directory Structure and Naming
  • Tests live in a __tests__/ directory beside the module under test
  • Test files: {target-file-name}.test.ts
  • Integration test files: {target-file-name}.int.test.ts
  • Test suites: Names describing target features or situations
  • Test cases: Names describing expected behavior
Test Code Quality Rules

Keep every committed test active. Repair a test that protects current behavior; remove a test only when its behavior is no longer required and the source requirement or implementation contract confirms the removal.

Test Quality Criteria

Boundary and Error Case Coverage

Include boundary values and error cases alongside happy paths.

Literal Expected Values

Use expected values that are independent of the implementation calculation: state the contract's value directly as a literal, or take it from a separate authoritative fixture or specification. An expectation computed from the same constants or formula as the subject passes even when both are wrong. When a mock supplies the input, the expected value differs from the mock's return value wherever the implementation transforms it.

Result-Based Verification

Verify results, not invocation order or count.

Meaningful Assertions

Each test asserts the property its consumer depends on and the state the operation established, not merely that a value came back.

Capability Probe Postconditions

A probe that checks whether something works passes only when it uses the consumer's boundary and asserts the exact property the consumer needs.

Command exit status, successful import, and object existence show the thing is reachable, so treat them as the probe's preconditions and put the consumer-facing property in the assertion.

Probe intentSetup evidence (insufficient alone)Assert instead
The module is usableimport resolves, expect(mod).toBeDefined()Call the exported function through the consumer's entry point and assert its returned value or effect
The command worksExit code 0The output, file, or state change the caller consumes
The config is appliedThe config file parsesThe observable behavior the config is supposed to change
The migration ranThe command reported successA query through the real engine returns the migrated shape
Show full SKILL.md (436 more words)Show less
Mock Scope Decision

Use real implementations for every in-process component whose coordination is under test. Substitute a direct external I/O dependency when the test targets higher-layer behavior; use the real engine or a production-equivalent test instance when the external adapter, query, migration, or service contract itself is the target. When substituting, still assert the request the subject sends and the response shape it accepts, so the boundary contract stays verified.

Property-based Testing (fast-check)

Use fast-check in fc.assert(fc.property(...)) form when a Design Doc AC carries a Property annotation.

Mock Type Safety Enforcement

Type a mock to the surface the subject under test actually consumes — Pick<T, 'usedMethod'> — rather than the full interface, so an unused method changing shape does not break the test and a consumed one does. Constrain mock object literals with satisfies against that picked type so an extra or misnamed property fails at compile time.

Data Layer Testing

What Mocks Cannot Verify

Mocks validate call patterns, so these data-layer properties pass through undetected under mock-only testing:

  • Schema mismatches (table names, column names, data types)
  • Query correctness (joins, filters, aggregations, grouping)
  • Database constraints (NOT NULL, UNIQUE, foreign keys)
  • Migration compatibility (schema changes that leave code out of sync)

Routing rule: when one of these properties is the target — including the repository or data-access implementation itself — verify against a real engine per the ladder below. When data access is a dependency rather than the subject, mocks are correct: business logic receiving data (mock the repository, test the service), error-handling paths (connection failures, timeouts), and unit tests where the data layer is not under test.

Real Database Testing (Environment-Dependent)

Options for verifying data layer correctness against a real database engine:

  • Containerized databases for CI environments
  • In-memory databases for fast feedback (note: dialect differences may mask issues)
  • Dedicated test databases with seed data

Select the first option that matches repository evidence:

  1. Use the CI-configured database harness when present.
  2. Otherwise use the same database engine in a container when container execution is available.
  3. Use an in-memory database only when the verified behavior is dialect-independent; record the dialect behavior left unproven.
  4. Use a dedicated test database when the repository already provisions and isolates one.

When none is available and data-layer correctness is the target, stop and report the missing environment prerequisite. A mock-only result is not evidence of query, schema, constraint, or migration correctness.

AI-Generated Code and Schema Awareness

Generated data-access code can be syntactically correct while referencing schema elements that do not exist, and mock-based tests pass either way. Design Docs therefore carry explicit schema references, so review can cross-check documented schema against the data-access code.

© shinpr, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills-en/typescript-testing of shinpr/ai-coding-project-boilerplate.

Open the folder on GitHubat commit 56913a2

Compare with similar skills

Typescript Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Typescript Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Typescript Testing this skillshinpr/ai-coding-project-boilerplate232—~2.1kAutomated safety check: PassMIT
Test Writing WorkflowiOfficeAI/AionUi33k1 repos~1.2kAutomated safety check: PassApache-2.0
Creating A Packagec15t/c15t1.9k—~913Automated safety check: PassApache-2.0
Svelte Testingspences10/sveltest113—~579Automated safety check: PassMIT
Effect TStellahq/opensession392—~3.7kAutomated safety check: PassMIT
Ha Frontend Testinghome-assistant/frontend5.7k—~1.7kAutomated safety check: PassApache-2.0

Similar skills

  • Test Writing Workflow

    iOfficeAI/AionUi

    Sets the test-writing workflow for the repository: risk-first scenario lists, behavior-focused Vitest tests, a full run before each commit and a coverage target.

    33k GitHub starsUsed in 1 repo~1.2k tokens
    Testing & QAAuto-check passed
  • Scaffold a new workspace package in the c15t monorepo. An agent skill from c15t/c15t.

    1.9k GitHub stars~913 tokensUpdated today
    Testing & QAAuto-check passed
  • Svelte Testing

    spences10/sveltest

    Fix and create Svelte 5 tests with vitest-browser-svelte and Playwright.

    113 GitHub stars~579 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Effect TS

    tellahq/opensession

    Write idiomatic Effect v4 TypeScript verified against the pinned effect@4.0.0-rc.112 source.

    392 GitHub stars~3.7k tokensUpdated today
    Testing & QAAuto-check passed
  • Ha Frontend Testing

    home-assistant/frontend

    Home Assistant frontend testing and validation workflow. An agent skill from home-assistant/frontend.

    5.7k GitHub stars~1.7k tokensUpdated today
    Testing & QAAuto-check passed
  • Eslint Vitest Rule Tester

    antfu-collective/eslint-vitest-rule-tester

    Help users test ESLint rules with Vitest, supporting snapshot testing and custom assertions

    142 GitHub stars~1.3k tokensUpdated 27 days ago
    Testing & QAAuto-check passed

More from shinpr/ai-coding-project-boilerplate

All 42 skills in this repo
  • Integration E2E Testing

    shinpr/ai-coding-project-boilerplate

    Selects and designs the smallest integration/E2E test set that proves accepted behavior at an observable boundary.

    232 GitHub stars~2.8k tokensUpdated 3 days ago
    Auto-check passed
  • Skill Optimization

    shinpr/ai-coding-project-boilerplate

    Evaluates and optimizes skill file quality using 9 content patterns and 10 editing principles.

    232 GitHub stars~3.5k tokensUpdated 3 days ago
    Auto-check passed
  • Frontend Technical Spec

    shinpr/ai-coding-project-boilerplate

    Defines React environment, component architecture, state/data flow, build verification, and frontend non-functional criteria from repository evidence.

    232 GitHub stars~1.9k tokensUpdated 3 days ago
    Auto-check: notes
  • Frontend Typescript Rules

    shinpr/ai-coding-project-boilerplate

    Applies React/TypeScript type safety, component design, and state management rules.

    232 GitHub stars~1.7k tokensUpdated 3 days ago
    Auto-check passed
  • Implementation Approach

    shinpr/ai-coding-project-boilerplate

    Selects implementation strategy (vertical slice, horizontal, or hybrid) with risk assessment.

    232 GitHub stars~3.2k tokensUpdated 3 days ago
    Auto-check passed
  • Subagents Orchestration Guide

    shinpr/ai-coding-project-boilerplate

    Coordinates subagents through scale-based planning, approval, implementation, verification, and escalation flows.

    232 GitHub stars~8k tokensUpdated 3 days ago
    Auto-check passed

Categories

Questions about Typescript Testing

What does Typescript Testing do?

Applies repository-aware TypeScript test design, behavior evidence, isolation, and mock-boundary criteria. Typescript Testing is an agent skill from shinpr/ai-coding-project-boilerplate. Applies repository-aware TypeScript test design, behavior evidence, isolation, and mock-boundary criteria.

When should I use Typescript Testing?

Typescript Testing fits situations like: reviewing unit tests; tasks that involve Unit testing.

How do I install Typescript Testing in Claude Code?

Run `npx skills add shinpr/ai-coding-project-boilerplate --skill typescript-testing -a claude-code`. Or copy the skill folder (.claude/skills-en/typescript-testing in shinpr/ai-coding-project-boilerplate) into .claude/skills/typescript-testing in your project. Claude Code loads it when a task matches its description.

How do I install Typescript Testing in Codex?

Run `npx skills add shinpr/ai-coding-project-boilerplate --skill typescript-testing -a codex`. Or copy the skill folder (.claude/skills-en/typescript-testing in shinpr/ai-coding-project-boilerplate) into .agents/skills/typescript-testing in your project. Codex loads it when a task matches its description.

Can I use Typescript Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add shinpr/ai-coding-project-boilerplate --skill typescript-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/typescript-testing, .gemini/skills/typescript-testing, .github/skills/typescript-testing and .opencode/skills/typescript-testing in your project.

What does Typescript Testing need to run?

SKILL.md names no scripts, command-line tools or credentials: Typescript Testing is instructions for the agent only.

Does Typescript Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Typescript Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Typescript Testing use?

Typescript Testing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Typescript Testing use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Typescript Testing?

Skills that share tags, products or a category with Typescript Testing: Test Writing Workflow (iOfficeAI/AionUi, 33k stars), Creating A Package (c15t/c15t, 1.9k stars), Svelte Testing (spences10/sveltest, 113 stars) and Effect TS (tellahq/opensession, 392 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Typescript Testing?

shinpr (a GitHub user) maintains it in shinpr/ai-coding-project-boilerplate, which has 232 GitHub stars. The repository holds 42 skills in this directory. The repository was last updated on October 4, 2026.

Source: shinpr/ai-coding-project-boilerplate on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.