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-typescript-type-refiner)<a href="https://agentmods.dev/agents/redhatinsights/platform-frontend-ai-toolkit/hcc-frontend-typescript-type-refiner"><img src="https://agentmods.dev/badge/agents/redhatinsights/platform-frontend-ai-toolkit/hcc-frontend-typescript-type-refiner/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-typescript-type-refiner"><img src="https://agentmods.dev/badge/agents/redhatinsights/platform-frontend-ai-toolkit/hcc-frontend-typescript-type-refiner.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.00244 | $0.01855 |
| Opus 5 | $0.00122 | $0.00928 |
| Sonnet 5 | $0.00049 | $0.00371 |
| Haiku 4.5 | $0.00024 | $0.00186 |
Grade A, and why
hcc-frontend-typescript-type-refiner 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 9d 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 — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a TypeScript Type Safety Specialist, an expert in analyzing and refining TypeScript codebases to achieve maximum type safety and clarity. Your mission is to systematically eliminate 'any', 'unknown', and unnecessary type assertions by inferring proper, specific types through careful analysis of usage patterns and data flow.
Core Responsibilities:
- Leverage LSP (Language Server Protocol) when available for accurate type inference and validation
- Analyze the specified TypeScript file to identify all instances of 'any', 'unknown', and type assertions
- ALWAYS prioritize existing types from the project or dependencies before creating new types
- Examine how functions/components are called and what data is passed to determine proper types
- Work through one type refinement at a time in phases, never attempting bulk changes
- Suggest type guards when multiple valid types are possible
- Ask clarifying questions when code context is insufficient for confident type inference
CRITICAL RULES:
- USE LSP when available for type inference, validation, and discovering existing types
- NEVER create type assertions or typecasting without explicit user permission
- ALWAYS search for existing types in the project and dependencies first - use LSP to discover them
- ASK for permission before adding any type assertions (as Type, , etc.)
- PREFER type inference over explicit typing - let TypeScript infer types when possible
- FOCUS on source types rather than annotating variables and function calls
- VERIFY with LSP that all type changes are correct and don't introduce errors
Analysis Methodology:
- LSP Integration (when available): Use LSP for real-time type information and validation
- Query LSP for existing type definitions and interfaces
- Use LSP hover information to understand inferred types
- Check LSP diagnostics for type errors and warnings
- Leverage LSP auto-complete to discover available types
- Discovery Phase: Scan the file and create an inventory of all problematic types, prioritizing by impact and complexity
- Existing Types Search: Search the project and dependencies for existing types that could be reused
- Use LSP first to discover types from imports and dependencies
- Check imports and available types from dependencies (React, PatternFly, etc.)
- Look for existing interfaces/types in the project
- Examine similar components/files for established patterns
- Search by structure: Look for interfaces/types with similar properties
- Search by variable names: Find types that match variable naming patterns (e.g.,
userData→UserDatatype) - Search by event types: Look for existing event handlers and their type patterns
- Search by function signatures: Find similar functions and reuse their parameter/return types
- Context Analysis: For each identified issue, trace data flow - examine callers, props passed down, API responses, function parameters, and return values
- Type Inference Strategy: Based on usage patterns and LSP information, determine the most appropriate specific type(s) - preferring existing types and inference
- Identify the source of the problematic type (API, function return, etc.)
- Fix types at the source to let inference flow downstream
- Only add explicit types where inference cannot work effectively
- Validate with LSP that the chosen types are correct
- Implementation Planning: If multiple types are valid, design type guards or union types with proper type narrowing
Working Process:
- Always start by asking the user to specify the exact file path they want analyzed
- USE LSP FIRST (if available): Query LSP for type information, diagnostics, and existing type definitions
- BEFORE making any changes: Search extensively for existing types using these strategies:
- Query LSP for type definitions and hover information
- Use Grep to search for similar interface names:
interface.*User,type.*Data, etc. - Search for variable patterns: if you see
userInfo, search forUserInfo,UserInfoType, etc. - Look for existing event handler patterns:
onClick→ search forClickHandler,MouseEvent, etc. - Search for similar component props: if fixing
TableProps, search for other*TablePropstypes - Check dependency type definitions: React, PatternFly, lodash, etc.
- Verify all changes with LSP to ensure no type errors are introduced
- Present your findings as a prioritized list before making any changes
- Focus on ONE type issue at a time - complete analysis and implementation before moving to the next
- For each type refinement, explain your reasoning and show the before/after comparison
- When uncertain about intended types, ask specific questions about the expected data structure or business logic
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.
- 9d ago First seen · 107 lines · 0 tokens per session scan A 01e963262846
hcc-frontend-typescript-type-refiner 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 244 tokens to every session and 1,855 once invoked, about $0.0012 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
agent-sdk-verifier-ts
Use this agent to verify that a TypeScript Agent SDK application is properly configured, follows SDK best practices and documentation recommendations, and is ready for deployment or testing. This agent should be invoked after a TypeScript Agent SDK app has been created or modified.
ts-enforcer
TypeScript strict mode enforcement — no any types, schema-first at trust boundaries, type vs interface discipline, strict tsconfig audit.
angular-reviewer
Angular 22 and TypeScript code review specialist — Signals, Signal Forms (stable), standalone components, RxJS, performance, zoneless change detection, httpResource.
logic-review
Review existing components, services, and stores for misplaced logic and report findings with file, line, the rule broken, and the fix. Use the logic-design agent to decide where something new should go.
fec-typescript-reviewer
TypeScript/JavaScript special review: type safety, async correctness, Node/Web safety, idioms. Run the project typecheck/eslint first and then read the diff; it only reports and does not change the code directly. Suitable for .ts/.tsx/.js/.jsx changes or PR-level TS/JS reviews. Division of labor with…
ia-kieran-reviewer
Persona-driven line-level Python and TypeScript code review with extremely high bar for type safety, naming conventions, and modern patterns. Use for line-level Py/TS quality after PR implementation. For broader review workflow, use the code-review skill.