ralph-loop: Skill for Claude Code

.agent/skills/frontend-testing/SKILL.md

frontend-testing is a skill for Claude Code, Codex from PageAI-Pro/ralph-loop. It costs 48 tokens per session (2,297 once invoked), scanned A, original, MIT.

A skill for generating tests for React frontend code with Vitest and React Testing Library. It covers components, reusable hooks, and utility functions; unit tests check small pieces, while integration tests check how pieces work together.

In plain words
What is it for?
Use it to write or review tests for React components, hooks, and utilities, or to improve coverage. It is intended for Vitest and React Testing Library tests, not browser end-to-end tests such as Playwright.
Why use it?
It helps developers add useful test coverage without having to design every test pattern from scratch. It focuses on frontend behavior and follows the project's existing conventions where available.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is PageAI-Pro/ralph-loop's own configuration. It tells Claude Code and Codex how to work on ralph-loop itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ralph-loop configures →

Reuse

Borrowing it

Nothing to install: this file belongs to PageAI-Pro/ralph-loop. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/PageAI-Pro/ralph-loop/main/.agent/skills/frontend-testing/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/PageAI-Pro/ralph-loop

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/pageai-pro/ralph-loop/frontend-testing/github.svg)](https://agentmods.dev/skills/pageai-pro/ralph-loop/frontend-testing)
Your own site
<a href="https://agentmods.dev/skills/pageai-pro/ralph-loop/frontend-testing"><img src="https://agentmods.dev/badge/skills/pageai-pro/ralph-loop/frontend-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 frontend-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/pageai-pro/ralph-loop/frontend-testing"><img src="https://agentmods.dev/badge/skills/pageai-pro/ralph-loop/frontend-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,297 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 warn 7 Sept 2026
SkillSpector: 11 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Prompt Injection · line 39
    Subtle instructions detected that may alter agent decision-making or introduce hidden biases.
    Fix: Review content for implicit steering or bias. Ensure instructions are explicit and align with the skill's stated purpose.
  • medium MCP Rug Pull · line 43
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 46
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 49
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 50
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 53
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 56
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 59
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 68
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 71
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 74
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
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.00048 $0.02297
Opus 5.5 $0.00019 $0.00919
Sonnet 5.5 $0.00010 $0.00459
Haiku 4.5 $0.00005 $0.00230

Measured 1mo ago against content hash fc56500f072f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

frontend-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 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (assets/hook-test.template.ts, assets/utility-test.template.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.agent/skills/frontend-testing/SKILL.md · 317 lines

How it starts

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

This skill enables Claude to generate high-quality, comprehensive frontend tests following established conventions and best practices.

When to Apply This Skill

Apply this skill when the user:

  • Asks to write tests for a component, hook, or utility
  • Asks to review existing tests for completeness
  • Mentions Vitest, React Testing Library, RTL, or spec files
  • Requests test coverage improvement
  • Mentions testing, unit tests, or integration tests for frontend code
  • Wants to understand testing patterns in the frontend codebase

Do NOT apply when:

  • User is asking about E2E tests (Playwright)
  • User is only asking conceptual questions without code context

Quick Reference

Tech Stack

Tool Version Purpose
Vitest 4+ Test runner
React Testing Library 16+ Component testing
jsdom - Test environment
TypeScript 5+ Type safety

Note: keep this list up to date with the project's dependencies.

Key Commands

Always prefer running specific tests over the entire suite for faster feedback:

# Run ALL tests (avoid during development)
npx vitest run

# ✅ PREFERRED: Run specific file
npx vitest run src/components/Button.spec.tsx

# ✅ PREFERRED: Run tests matching a pattern
npx vitest run --grep "Button"
npx vitest run -t "should render"

# ✅ PREFERRED: Run specific describe block
npx vitest run --grep "Button > Rendering"

# ✅ Run tests in a directory
npx vitest run src/components/

# ✅ Run single test by name
npx vitest run -t "should disable button when loading"

Watch Mode (Background Testing)

Use watch mode for efficient iterative development:

# ✅ Watch mode - reruns on file changes
npx vitest

# ✅ Watch specific file
npx vitest src/components/Button.spec.tsx

# ✅ Watch tests matching pattern
npx vitest --grep "Button"

Read the full file on GitHub · 317 lines

Files

What ships with it

8 files 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. 1mo ago First seen · 317 lines · 48 tokens per session scan A fc56500f072f

Subscribe to this mod's changes

frontend-testing is a skill published in the GitHub repository PageAI-Pro/ralph-loop (328 stars, last pushed 1mo ago), licensed MIT. It adds 48 tokens to every session and 2,297 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

test-component

Write React Testing Library tests for an existing component, following the project's RTL conventions (prefer role/label queries, mock at network boundary, no act()). Invoke when the user asks to test, add tests for, or cover a component.

MuhammadUsmanGM/claude-code-best-practices · 50 tokens

agent-tester

Agent skill for tester - invoke with $agent-tester.

ruvnet/ruflo · 15 tokens

web3-testing

Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking. Use when testing Solidity contracts, setting up blockchain test suites, or validating DeFi protocols.

wshobson/agents · 46 tokens

temporal-python-testing

Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.

wshobson/agents · 45 tokens

data-quality-frameworks

Implement data quality validation with Great Expectations, dbt tests, and data contracts. Use when building data quality pipelines, implementing validation rules, or establishing data contracts.

wshobson/agents · 37 tokens

dbt-transformation-patterns

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

wshobson/agents · 47 tokens