frontend-typescript-testing

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

A set of rules for writing tests for React and other TypeScript front ends, using the testing tools already configured in a project. It covers component tests, API-related tests, and browser-based end-to-end tests when those tools are available.

In plain words
What is it for?
Use it when adding or reviewing tests for React components, mocked API responses, user interactions, integrations, or complete front-end flows in a browser.
Why use it?
It prevents test code from assuming the wrong framework or command. It also helps check loading, error, interaction, integration, and full browser behavior consistently.

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/frontend-typescript-testing
Any agent
npx skills add shinpr/ai-coding-project-boilerplate --skill frontend-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 frontend-typescript-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/shinpr/ai-coding-project-boilerplate/frontend-typescript-testing.svg)](https://agentmods.dev/skills/shinpr/ai-coding-project-boilerplate/frontend-typescript-testing)
Your own site
<a href="https://agentmods.dev/skills/shinpr/ai-coding-project-boilerplate/frontend-typescript-testing"><img src="https://agentmods.dev/badge/skills/shinpr/ai-coding-project-boilerplate/frontend-typescript-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,217 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.00056 $0.01217
Opus 5 $0.00028 $0.00609
Sonnet 5 $0.00011 $0.00243
Haiku 4.5 $0.00006 $0.00122

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

Security

Grade A, and why

frontend-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 5d 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/frontend-typescript-testing/SKILL.md · 85 lines

How it starts

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

TypeScript Testing Rules (Frontend)

Prerequisite Detection

Inspect package.json, the lockfile, test configuration, and existing test imports before selecting a framework or command. Apply Vitest, React Testing Library, MSW, or Playwright rules only when the dependency/configuration is present. Use the repository's configured equivalent when different. If no runnable harness can be identified, report the inspected paths and the missing framework or command instead of inventing one.

References

Test Type Reference When to Use
Unit / Integration This document Implementing React component tests with RTL + Vitest + MSW
E2E references/e2e.md Implementing browser-level E2E tests with Playwright

Test Framework

  • Vitest: Use when the repository config or existing tests select Vitest
  • React Testing Library: For component testing
  • MSW (Mock Service Worker): For API mocking
  • Test imports: import { describe, it, expect, beforeEach, vi } from 'vitest'
  • Component test imports: import { render, screen } from '@testing-library/react'
  • User interaction: import userEvent from '@testing-library/user-event'
  • Mock creation: Use vi.mock()

Basic Testing Policy

Quality Requirements

  • Regression protection: assert the named acceptance result, public branch, or failure state on critical paths and high-reuse components
  • Independence: Each test can run independently without depending on other tests
  • Reproducibility: Control time, randomness, environment values, network responses, and browser state so identical inputs produce the same observable result
  • Readability: Each test names one user-visible behavior, separates setup/action/assertion, and keeps fixtures limited to values used by that behavior

Where to concentrate test rigor

For shared components, custom hooks, and utilities reused across features, cover their public branches, error states, and boundary contracts because their regression blast radius is wider. Verify page-level composition through integration/E2E tests when the behavior depends on multiple rendered units.

Read the full file on GitHub · 85 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 85 lines · 56 tokens per session scan A 2551dafb6049

Subscribe to this mod's changes

frontend-typescript-testing is a skill published in the GitHub repository shinpr/ai-coding-project-boilerplate (228 stars, last pushed today), licensed MIT. It adds 56 tokens to every session and 1,217 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.

Related

Other skills, from other repositories

V3 CLI Modernization

CLI modernization and hooks system enhancement for claude-flow v3. Implements interactive prompts, command decomposition, enhanced hooks integration, and intelligent workflow automation.

ruvnet/ruflo · 35 tokens

update-screenshots

Update the committed blocks-ci screenshot hashes after the "Screenshots & Tests" check fails, or investigate a screenshot diff reported on a PR. Use when asked to update, accept, or refresh component screenshot baselines from CI. This skill should be run as a subagent.

microsoft/vscode · 60 tokens

generate-run-commands

Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.

microsoft/vscode · 36 tokens

release

Cut a versioned release and publish everos to PyPI via the tag-triggered workflow.

EverMind-AI/EverOS · 20 tokens

computer-use

Read and drive native desktop applications through the accessibility layer — list on-screen apps, snapshot one window as a numbered element tree, then click / type / set a value / scroll / drag / run a named action, by element index or by screen coordinates. Use for work in a desktop app rather than a web page. Full…

kirodotdev/KiroCrew · 105 tokens

technical-writing

Write, edit, review, or audit user-facing documentation for the eve repository. Use for changes under docs/, documentation tied to eve APIs or CLI behavior, docs work based on Slack or support feedback, and requests to make eve docs clearer, more natural, or less AI-patterned while verifying claims against current…

vercel/eve · 78 tokens