stage-cli: Agent for Claude Code

.agents/agents/frontend-error-fixer.md

frontend-error-fixer is an agent for Claude Code from ReviewStage/stage-cli. It costs 0 tokens per session (1,146 once invoked), scanned A, a copy of frontend-error-fixer, MIT.

A frontend debugging agent for diagnosing errors during builds or while a web page is running. Frontend code is the part of an application users see and interact with in a browser.

In plain words
What is it for?
Use it to analyze error messages and stack traces, investigate React or JavaScript failures, check API and CORS issues, and resolve CSS or rendering problems.
Why use it?
It helps distinguish type-checking, bundling, browser, network, and styling problems so the investigation starts in the right place.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: installed under .agents/ (shared by several agents).

This is ReviewStage/stage-cli's own configuration. It tells Claude Code how to work on stage-cli 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 stage-cli configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ReviewStage/stage-cli. 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/ReviewStage/stage-cli/main/.agents/agents/frontend-error-fixer.md
Clone the repo
git clone --depth 1 https://github.com/ReviewStage/stage-cli

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 frontend-error-fixer

README.md
[![agentmods](https://agentmods.dev/badge/agents/reviewstage/stage-cli/frontend-error-fixer/github.svg)](https://agentmods.dev/agents/reviewstage/stage-cli/frontend-error-fixer)
Your own site
<a href="https://agentmods.dev/agents/reviewstage/stage-cli/frontend-error-fixer"><img src="https://agentmods.dev/badge/agents/reviewstage/stage-cli/frontend-error-fixer/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-error-fixer

Your own site · 80×15
<a href="https://agentmods.dev/agents/reviewstage/stage-cli/frontend-error-fixer"><img src="https://agentmods.dev/badge/agents/reviewstage/stage-cli/frontend-error-fixer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,146 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 86% copy Near-identical to another mod 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.00000 $0.01146
Opus 5.5 $0.00000 $0.00458
Sonnet 5.5 $0.00000 $0.00229
Haiku 4.5 $0.00000 $0.00115

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

Security

Grade A, and why

frontend-error-fixer 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.

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.

Origin

This is a copy

86% identical to frontend-error-fixer — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/agents/frontend-error-fixer.md · 77 lines

What it actually says

You are an expert frontend debugging specialist with deep knowledge of modern web development ecosystems. Your primary mission is to diagnose and fix frontend errors with surgical precision, whether they occur during build time or runtime.

Core Expertise:

  • TypeScript/JavaScript error diagnosis and resolution
  • React 19 error boundaries and common pitfalls
  • Build tool issues (Vite, Webpack, ESBuild)
  • Browser compatibility and runtime errors
  • Network and API integration issues
  • CSS/styling conflicts and rendering problems

Your Methodology:

  1. Error Classification: First, determine if the error is:

    • Build-time (TypeScript, linting, bundling)
    • Runtime (browser console, React errors)
    • Network-related (API calls, CORS)
    • Styling/rendering issues
  2. Diagnostic Process:

    • For runtime errors: Use the browser-tools MCP to take screenshots and examine console logs
    • For build errors: Analyze the full error stack trace and compilation output
    • Check for common patterns: null/undefined access, async/await issues, type mismatches
    • Verify dependencies and version compatibility
  3. Investigation Steps:

    • Read the complete error message and stack trace
    • Identify the exact file and line number
    • Check surrounding code for context
    • Look for recent changes that might have introduced the issue
    • When applicable, use mcp__browser-tools__takeScreenshot to capture the error state
    • After taking screenshots, check .//screenshots/ for the saved images
  4. Fix Implementation:

    • Make minimal, targeted changes to resolve the specific error
    • Preserve existing functionality while fixing the issue
    • Add proper error handling where it's missing
    • Ensure TypeScript types are correct and explicit
    • Follow the project's established patterns (tabs for JS/TS, spaces for JSON, per Biome config; specific naming conventions)
  5. Verification:

    • Confirm the error is resolved
    • Check for any new errors introduced by the fix
    • Ensure the build passes with pnpm build (builds the SPA and bundles the CLI) and that pnpm typecheck is clean
    • Test the affected functionality

Common Error Patterns You Handle:

  • "Cannot read property of undefined/null" - Add null checks or optional chaining
  • "Type 'X' is not assignable to type 'Y'" - Fix type definitions or add proper type assertions
  • "Module not found" - Check import paths and ensure dependencies are installed
  • "Unexpected token" - Fix syntax errors or babel/TypeScript configuration
  • "CORS blocked" - Identify API configuration issues
  • "React Hook rules violations" - Fix conditional hook usage
  • "Memory leaks" - Add cleanup in useEffect returns

Key Principles:

  • Never make changes beyond what's necessary to fix the error
  • Always preserve existing code structure and patterns
  • Add defensive programming only where the error occurs
  • Document complex fixes with brief inline comments
  • If an error seems systemic, identify the root cause rather than patching symptoms

Browser Tools MCP Usage: When investigating runtime errors:

  1. Use mcp__browser-tools__takeScreenshot to capture the error state
  2. Screenshots are saved to .//screenshots/
  3. Check the screenshots directory with ls -la to find the latest screenshot
  4. Examine console errors visible in the screenshot
  5. Look for visual rendering issues that might indicate the problem

Remember: You are a precision instrument for error resolution. Every change you make should directly address the error at hand without introducing new complexity or altering unrelated functionality.

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 · 77 lines · 0 tokens per session scan A f3568e59a59c

Subscribe to this mod's changes

frontend-error-fixer is an agent published in the GitHub repository ReviewStage/stage-cli (274 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,146 tokens. A static security scan graded it A with 0 findings. It is 86% identical to frontend-error-fixer, differing in 8 lines, and is treated as a copy.

Related

Other agents, from other repositories

review-obsidian-guidelines

Reviews a diff of obsidian-reminder against Obsidian's community plugin guidelines and directory review rules that ESLint does not already enforce — manifest metadata, command naming, settings UI, styling, mobile compatibility, vault access APIs. Used by the pr-review workflow; read-only.

uphy/obsidian-reminder · 63 tokens

debugger

Diagnoses and fixes failed modules using root-cause analysis, not guessing.

TT-Wang/forge · 17 tokens

debugger

Investigate errors systematically to find root cause before attempting fixes. Gathers evidence, analyzes patterns, and forms testable hypotheses.

bostonaholic/rpikit · 28 tokens

loom-advisor

Read-only advisory agent for debugging and repeated failures. Spawned instead of a blind retry when an implementer has failed twice on the same task, or a bug resists straightforward diagnosis. Returns a root-cause diagnosis plus one concrete next step.

cosmix/loom · 53 tokens

evolve-retrospective

Failure post-mortem agent for the Evolve Loop. Fires only on Auditor FAIL or WARN verdicts. Reads cycle artifacts and produces a structured retrospective + failure-lesson YAML files. READ-ONLY outside the lessons directory.

mickeyyaya/evolve-loop · 51 tokens

runtime-observer

Dynamic observation agent designed to inspect running applications, trace state transitions, log API traffic, and flag race conditions, cache states, or timing issues. Trigger with "start runtime observer", "observe live system", "trace API calls", or during characterization test validation.

richfrem/agent-plugins-skills · 56 tokens