test-infrastructure

test-infrastructure is a skill for Claude Code from elevanaltd/HestAI-MCP. It costs 25 tokens per session (1,506 once invoked), scanned A, original, Apache-2.0.

Shared infrastructure for testing a TypeScript or JavaScript monorepo with Vitest, including configuration, mocks, browser API substitutes, and cleanup.

In plain words
What is it for?
Use it to organize unit, integration, and end-to-end tests, mock services such as Supabase, and standardize Vitest test behavior.
Why use it?
It provides common test setup so individual tests do not each need to configure the same environment and dependencies.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to organize unit, integration, and end-to-end tests, mock services such as Supabase, and standardize Vitest test behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/elevanaltd/hestai-mcp/test-infrastructure
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 elevanaltd/HestAI-MCP --skill test-infrastructure
Clone the repo
git clone --depth 1 https://github.com/elevanaltd/HestAI-MCP

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 test-infrastructure

README.md
[![agentmods](https://agentmods.dev/badge/skills/elevanaltd/hestai-mcp/test-infrastructure/github.svg)](https://agentmods.dev/skills/elevanaltd/hestai-mcp/test-infrastructure)
Your own site
<a href="https://agentmods.dev/skills/elevanaltd/hestai-mcp/test-infrastructure"><img src="https://agentmods.dev/badge/skills/elevanaltd/hestai-mcp/test-infrastructure/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 test-infrastructure

Your own site · 80×15
<a href="https://agentmods.dev/skills/elevanaltd/hestai-mcp/test-infrastructure"><img src="https://agentmods.dev/badge/skills/elevanaltd/hestai-mcp/test-infrastructure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,506 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.
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.00025 $0.01506
Opus 5 $0.00013 $0.00753
Sonnet 5 $0.00005 $0.00301
Haiku 4.5 $0.00003 $0.00151

Measured 7d ago against content hash 270c661502f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

test-infrastructure 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 7d 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.

src/hestai_mcp/_bundled_hub/library/skills/test-infrastructure/SKILL.md · 154 lines

How it starts

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

===TEST_INFRASTRUCTURE=== META: TYPE::SKILL VERSION::1.0 STATUS::ACTIVE COMPRESSION_TIER::AGGRESSIVE DOMAIN::ATHENA[quality]⊕HEPHAESTUS[craftsmanship]

§1::PRIMARY_SOURCE_MANDATORY_FIRST

SOURCE::.hestai/state/context/test-context/RULES.md PRINCIPLE::"POC-proven pattern post-it note - ALWAYS consult BEFORE infrastructure decisions"

CONTAINS::[ file_organization[co-located_tests], test_types[unit_vs_integration], TDD_discipline[RED->GREEN->REFACTOR], vitest_configuration, browser_api_polyfills, test_cleanup_patterns, coverage_targets[diagnostic≠blocking], TRACED_protocol ]

§2::DETAILED_DOCUMENTATION

TEST_STANDARDS::.hestai/state/context/test-context/STANDARDS.md->[file_naming[src/X.test.ts], coverage_thresholds[70%_min+80%_aspirational+90%_critical], test_categorization[unit/integration/e2e], violation_detection]

MOCKING_PATTERNS::.hestai/state/context/test-context/MOCKING-PATTERNS.md->[vitest_shared_config, testing_library_setup, supabase_client_mocking[unit], shared_utilities, mock_factories]

§3::POC_REFERENCE_WHEN_NEEDED

POC_INFRASTRUCTURE::/Volumes/HestAI-Projects/eav-ops/eav-apps/scripts-web/src/test/ FILES::[ setup.ts::"Global Vitest setup (BroadcastChannel polyfill, conditional mocks, cleanup)", factories.ts::"Test data factories" ]

§4::CORE_PATTERNS_POC_PROVEN

PATTERN_1::BROWSER_API_POLYFILLS::[ STUB::BroadcastChannel_for_supabase_auth, BECAUSE::"Node.js BroadcastChannel incompatible with Supabase Auth MessageEvent", IMPLEMENTATION::custom_EventTarget_stub_in_setup.ts, EVIDENCE::POC_src/test/setup.ts:41-71 ]

PATTERN_2::REALTIME_CLEANUP::[ PATTERN::afterAll[disconnect_realtime+removeAllChannels], BECAUSE::"Prevents CI hangs from orphaned WebSocket connections", CODE::"afterAll(async()=>{if(isIntegrationTest){await testSupabase.realtime.disconnect(); testSupabase.removeAllChannels()}})", EVIDENCE::POC_src/test/setup.ts:212-222 ]

PATTERN_3::CONDITIONAL_MOCK_SCOPE::[ FLAG::VITEST_INTEGRATION=true[real_supabase] VERSUS unset[mocked], BECAUSE::"Unit tests (mocked, fast) vs Integration tests (real DB, RLS validation)", CODE::"const isIntegrationTest=process.env.VITEST_INTEGRATION==='true'; if(!isIntegrationTest){vi.mock('@workspace/shared/client',...)}", EVIDENCE::POC_src/test/setup.ts:94-111 ]

§5::DIRECTORY_STRUCTURE_THREE_TIER

TIER_3::VITEST_TEST_INFRASTRUCTURE::[ packages/shared/src/test/::[ setup.ts::"Global Vitest setup (imported by vitest.config)", factories.ts::"Test data factories", vitest.config.base.ts::"Shared Vitest config" ], apps//src/test/-factories.ts::"App-specific test data", PURPOSE::vitest_infrastructure_utilities[NOT_test_files] ]

TIER_4::COLOCATED_TEST_FILES::[ PATTERN::src/components/Header.tsx+Header.test.tsx, PATTERN::src/core/state/useScriptMutations.tsx+useScriptMutations.test.tsx, PURPOSE::individual_test_files_next_to_source ]

§6::VITEST_CONFIGURATION

SHARED_BASE::packages/shared/src/test/vitest.config.base.ts::[ test::{globals:true, environment:jsdom, setupFiles:['./src/test/setup.ts']}, coverage::{provider:v8, reporter:[text,html], exclude:[**/.config.ts, **/.d.ts, /test/]} ]

APP_CONFIG::apps/*/vitest.config.ts->mergeConfig(baseConfig,{test:{app_specific_overrides}})

§7::COVERAGE_PHILOSOPHY_POC_PROVEN

PRINCIPLE::"Coverage is DIAGNOSTIC METRIC, not blocking gate"

RATIONALE::[ coverage_validates_tests_exist[NOT_tests_good], can_achieve_100%_with_bad_assertions, encourages_coverage_theater[tests≠behavior_validation] ]

TARGETS::[ 70%::minimum[aspirational≠blocking], 80%+::recommended[project_health_indicator], 90%+::critical_paths[auth+mutations+RLS]->enforced_via_code_review ]

SOURCE::.hestai/state/context/test-context/RULES.md

§8::TURBOREPO_CONFIGURATION

PIPELINE::[ typecheck::{dependsOn:[^typecheck]}, lint::{dependsOn:[^lint,typecheck]}, test::{dependsOn:[^test,lint], outputs:[coverage/]}, build::{dependsOn:[^build,test], outputs:[dist/]} ]

QUALITY_GATE_SEQUENCE::typecheck->lint->test->build[ALL_BLOCKING]

Read the full file on GitHub · 154 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. 7d ago First seen · 154 lines · 25 tokens per session scan A 270c661502f8

Subscribe to this mod's changes

test-infrastructure is a skill published in the GitHub repository elevanaltd/HestAI-MCP (0 stars, last pushed yesterday), licensed Apache-2.0. It adds 25 tokens to every session and 1,506 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

playwright-component-testing

Set up component testing with Playwright using a story gallery — scaffold stories and a gallery dev page driven by the built-in mount fixture, no dedicated component-testing runtime. Use when asked to test React or Vue components in isolation with Playwright, or to migrate off @playwright/experimental-ct-react / -vue.

microsoft/playwright · 69 tokens

next-partial-prefetching-optimizer

Optimize what selected Next.js client navigations include before the click under Partial Prefetching. Use after Cache Components and Partial Prefetching are adopted when the user wants selected URL-specific UI to be instant, wants reusable content to wait for navigation, or needs to choose between default, viewport…

vercel/next.js · 82 tokens

screen-reader-testing

Test web applications with screen readers including VoiceOver, NVDA, and JAWS. Use when validating screen reader compatibility, debugging accessibility issues, or ensuring assistive technology support.

wshobson/agents · 39 tokens

vscode-visual-regression

Write Storybook stories and visual regression tests for the Kilo VS Code extension webview UI.

Kilo-Org/kilocode · 25 tokens

verify

Build, launch, drive, and screenshot the OpenNOW Electron settings UI on Windows.

OpenCloudGaming/OpenNOW · 17 tokens