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.5 | $0.00101 | $0.01250 |
| Sonnet 5.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 3mo 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.
- 3mo 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 4mo ago), licensed Apache-2.0. It adds 252 tokens to every session and 3,124 once invoked, about $0.0010 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-31.
hcc-frontend-unit-test-writer compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| hcc-frontend-unit-test-writerRedHatInsights/platform-frontend-ai-toolkit | Agent | 5 | 4mo ago | Apache-2.0 | A | 252 | Claude Code |
| ai-hygiene-auditorathola/claude-night-market | Agent | 358 | today | MIT | A | 48 | Claude Code |
| test-gapswesammustafa/Claude-Code-Everything-You-Need-to-Know | Agent | 3.7k | 5d ago | none | A | 38 | Claude Code |
| pydantic-ai-validatorcoleam00/context-engineering-intro | Agent | 14k | 8mo ago | MIT | A | 46 | Claude Code |
| testerInsajin/autopus-adk | Agent | 111 | 2mo ago | MIT | A | 38 | Claude Code |
| test-engineerashrafmusa/agenticana | Agent | 2 | 3d ago | MIT | A | 49 | Claude Code |
| fix-verifierXRenSiu/claude-code-forge | Agent | 2 | 12d ago | MIT | A | 132 | Claude Code |