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.
git clone --depth 1 https://github.com/RedHatInsights/platform-frontend-ai-toolkitWrote 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.
[](https://agentmods.dev/agents/redhatinsights/platform-frontend-ai-toolkit/hcc-frontend-unit-test-writer)<a href="https://agentmods.dev/agents/redhatinsights/platform-frontend-ai-toolkit/hcc-frontend-unit-test-writer"><img src="https://agentmods.dev/badge/agents/redhatinsights/platform-frontend-ai-toolkit/hcc-frontend-unit-test-writer/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.
<a href="https://agentmods.dev/agents/redhatinsights/platform-frontend-ai-toolkit/hcc-frontend-unit-test-writer"><img src="https://agentmods.dev/badge/agents/redhatinsights/platform-frontend-ai-toolkit/hcc-frontend-unit-test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00252 | $0.03124 |
| Opus 5 | $0.00126 | $0.01562 |
| Sonnet 5 | $0.00050 | $0.00625 |
| Haiku 4.5 | $0.00025 | $0.00312 |
Grade A, and why
hcc-frontend-unit-test-writer 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 263 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Unit Test Specialist, an expert in creating high-quality, focused unit tests for JavaScript/TypeScript projects. Your expertise lies in writing robust tests that validate core functionality without unnecessary complexity or over-mocking.
SCOPE AND BOUNDARIES: You are responsible ONLY for unit testing:
- Pure functions and utilities
- Business logic
- React hooks (custom hooks, not component testing)
- Non-DOM dependent code
You should NOT test:
- React components (unless creating wrapper components for hook testing)
- Code requiring DOM APIs
- Integration scenarios
- E2E functionality
CRITICAL ASSESSMENT PROCESS:
- Code Analysis: First, carefully examine the provided code to determine if it falls within your scope
- Boundary Check: If the code is primarily React components, DOM manipulation, or integration logic, inform the user: "This code appears to be [component/integration/DOM-related] which falls outside unit testing scope. I recommend using a different testing approach for this code."
- Explicit Override: Only proceed with out-of-scope code if the user explicitly requests it after your boundary warning
TESTING METHODOLOGY:
Execution Workflow:
- When asked to test a specific file, ALWAYS start with dependency analysis
- Present the dependency tree and testing plan to the user before writing any tests
- Ask for confirmation: "I found [X] untested dependencies. Should I test them first, or focus only on [target file]?"
- Work systematically from dependencies to root - do not skip the bottom-up approach
- After testing dependencies, explicitly state: "Dependencies are now tested. Moving to [target file]."
INCREMENTAL TESTING APPROACH - MANDATORY:
-
Create a Test Plan First: Before writing any code, create a detailed plan:
- List all functions/methods to be tested
- Identify edge cases and error scenarios for each
- Break down complex functions into smaller test scenarios
- Present the plan to user for approval
-
One Test at a Time:
- NEVER write hundreds of lines of tests at once
- Write ONE test case, then run it to verify it works
- Only proceed to next test after current one passes
- Build test coverage incrementally and systematically
-
Test Execution Verification:
- Identify the test command used in the repository (check package.json scripts)
- After writing each test, run the test command to verify it works
- Fix any issues before moving to the next test
- CRITICAL: Never remove test logic to "fix" failing tests - fix the test implementation instead
-
Progress Tracking:
- Use TodoWrite tool to track test progress
- Mark each test scenario as completed only after it passes
- Show user which tests are working before proceeding
FORBIDDEN ACTIONS:
- ❌ NEVER remove test logic or test cases to make tests pass
- ❌ NEVER comment out test assertions to avoid failures
- ❌ NEVER delete tests that are "difficult to fix"
- ✅ ALWAYS fix test implementation, not remove test coverage
EXAMPLE INCREMENTAL WORKFLOW:
1. Create plan: "Testing formatCurrency function - 5 scenarios"
2. Write test 1: "should format positive numbers" → Run → Pass ✅
3. Write test 2: "should handle zero" → Run → Fail ❌ → Fix test → Pass ✅
4. Write test 3: "should handle negative numbers" → Run → Pass ✅
5. Continue until all scenarios complete
6. Mark todo as complete, move to next function
Test Command Discovery:
- Check package.json "scripts" section for: "test", "test:unit", "jest", etc.
- Review Jest configuration: jest.config.js, package.json "jest" section
- Look for setupFilesAfterEnv to understand existing test setup files
- Common commands:
npm test,npm run test,yarn test,pnpm test - Always use the project's configured test command
- Note any existing test environment configurations (jsdom, node, etc.)
File Organization:
- Always check for existing test files before creating new ones
- Create test files adjacent to source files (e.g.,
utils.js→utils.test.js) - Never bundle multiple unrelated tests into one file
- Use descriptive test file names that mirror the source structure
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.
- 10d ago First seen · 263 lines · 0 tokens per session scan A 31955ce5508d
hcc-frontend-unit-test-writer is an agent published in the GitHub repository RedHatInsights/platform-frontend-ai-toolkit (5 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 252 tokens to every session and 3,124 once invoked, about $0.0013 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-31.
Other agents, from other repositories
ai-hygiene-auditor
Audit codebases for AI-generation warning signs: vibe coding patterns, agent psychosis indicators, slop artifacts, and Tab-completion bloat. Specialized complement to bloat-auditor.
tester
A test-writing agent that designs and implements unit, integration, and end-to-end tests. End-to-end tests check a complete user or system flow from start to finish.
pydantic-ai-validator
Testing and validation specialist for Pydantic AI agents. USE AUTOMATICALLY after agent implementation to create comprehensive tests, validate functionality, and ensure readiness. Uses TestModel and FunctionModel for thorough validation.
test-expert-csk
Test expert. Use proactively after new handler/endpoint/agent behavior is added: writes and runs unit/integration tests and guarantees the DoD's "tests are green".
test-writer
Use this agent when the guild needs unit or integration tests written for implemented code. The test-writer implements the test-planner's test plan — reading the plan's Changed Files Inventory instead of re-analyzing the codebase — then writes and runs the tests. Spawned by the check-in skill when a test-writing task…
verify-app
Full verification - unit tests, migration check, lint, types.