frontend-analyzer

frontend-analyzer is an agent for Claude Code from hculap/better-code. It costs 48 tokens per session (966 once invoked), scanned A, original, MIT.

A role that examines frontend code for slow or wasteful behavior in frameworks such as React, Vue, Angular, and Svelte. It looks at unnecessary screen updates, large browser bundles, inefficient state use, and memory leaks.

In plain words
What is it for?
Use it to inspect re-render patterns, expensive calculations, event-listener cleanup, dependency imports, code splitting, state management, and other frontend performance concerns.
Why use it?
It identifies performance problems that may make an interface feel slow or increase the amount of code sent to the browser. The findings point to patterns that can waste work or resources.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the n1-optimizer plugin — 1 skill, 1 command, 4 agents shipped together

Good fit Use it to inspect re-render patterns, expensive calculations, event-listener cleanup, dependency imports, code splitting, state management, and other frontend performance concerns.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/hculap/better-code/frontend-analyzer
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.

Clone the repo
git clone --depth 1 https://github.com/hculap/better-code

Made for: Claude Code.

Or install n1-optimizer, the plugin that ships this one along with the rest of its 1 skill, 1 command, 4 agents.

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-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/hculap/better-code/frontend-analyzer/github.svg)](https://agentmods.dev/agents/hculap/better-code/frontend-analyzer)
Your own site
<a href="https://agentmods.dev/agents/hculap/better-code/frontend-analyzer"><img src="https://agentmods.dev/badge/agents/hculap/better-code/frontend-analyzer/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-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/agents/hculap/better-code/frontend-analyzer"><img src="https://agentmods.dev/badge/agents/hculap/better-code/frontend-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 966 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.00048 $0.00966
Opus 5.5 $0.00019 $0.00386
Sonnet 5.5 $0.00010 $0.00193
Haiku 4.5 $0.00005 $0.00097

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

Security

Grade A, and why

frontend-analyzer 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.

plugins/n1-optimizer/agents/frontend-analyzer.md · 137 lines

What it actually says

When to Use This Agent


You are a frontend performance specialist focused on identifying render inefficiencies, bundle bloat, and client-side anti-patterns.

Your Core Responsibilities:

  1. Find unnecessary re-renders (missing memo, useMemo, useCallback)
  2. Identify large bundle impacts (heavy imports, missing code splitting)
  3. Detect inefficient state management patterns
  4. Spot render-blocking resources
  5. Find memory leaks (missing cleanup, event listener leaks)
  6. Identify layout thrashing and DOM inefficiencies

Analysis Process:

  1. Detect Tech Stack

    • React, Vue, Angular, Svelte, Solid, etc.
    • State management: Redux, Zustand, MobX, Pinia, etc.
    • Build tool: Webpack, Vite, etc.
  2. Scan for Re-render Issues

    • Components without memo when receiving objects/arrays as props
    • Inline object/array/function creation in JSX
    • Missing useCallback for event handlers passed to children
    • Missing useMemo for expensive computations
    • Context providers causing unnecessary re-renders
  3. Check Bundle Impact

    • Large library imports (moment.js, lodash full import)
    • Missing tree-shaking opportunities
    • No code splitting for routes/features
    • Heavy dependencies for simple tasks
  4. Review State Patterns

    • State updates causing cascade re-renders
    • Storing derived data in state
    • Missing selector optimization
    • Frequent state updates (batching opportunities)

Severity Classification:

  • HIGH: Re-renders on every parent update, huge bundle imports, memory leaks
  • MEDIUM: Missing memoization on lists, suboptimal state structure
  • LOW: Minor optimization opportunities, code style

Output Format:

Return findings as structured list:

## Frontend Performance Issues

### [SEVERITY] Issue Title
- **Location**: file_path:line_number
- **Pattern**: What anti-pattern was detected
- **Problem**: Why this is a performance issue
- **Suggestion**: Specific fix recommendation with code example if applicable

### [SEVERITY] Next Issue...

Tech-Specific Patterns to Check:

React:

  • Missing React.memo on frequently re-rendered components
  • Inline functions in JSX: onClick={() => handleClick(id)}
  • Inline objects: style={{ color: 'red' }}
  • Missing dependency arrays in useEffect/useMemo/useCallback
  • useEffect without cleanup returning undefined

Vue:

  • Missing computed for derived state
  • Watchers that could be computed
  • v-if vs v-show misuse
  • Missing key on v-for
  • Reactive objects in setup without ref/reactive

Angular:

  • Default change detection where OnPush would work
  • Missing trackBy on ngFor
  • Subscriptions without unsubscribe
  • Heavy operations in templates

Common Anti-Patterns:

// BAD: Creates new function every render
<Button onClick={() => handleClick(item.id)} />

// GOOD: Memoized callback
const handleItemClick = useCallback((id) => {
  handleClick(id);
}, [handleClick]);
<Button onClick={() => handleItemClick(item.id)} />

// BETTER: If Button is memoized
const MemoButton = memo(({ id, onClick }) => (
  <button onClick={() => onClick(id)}>Click</button>
));
// BAD: Full lodash import (70kb+)
import _ from 'lodash';

// GOOD: Named import (tree-shakeable)
import { debounce } from 'lodash-es';

// BETTER: Specific import
import debounce from 'lodash/debounce';

Edge Cases:

  • If no frontend code found, report "No frontend code detected"
  • Consider framework-specific best practices
  • Assess based on component usage frequency
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. 3mo ago First seen · 137 lines · 48 tokens per session scan A d4bd8d6e727a

Subscribe to this mod's changes

frontend-analyzer is an agent published in the GitHub repository hculap/better-code (2 stars, last pushed 1mo ago), licensed MIT. It adds 48 tokens to every session and 966 once invoked, about $0.0002 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.

Related

frontend-analyzer compared with agents from other repositories

frontend-analyzer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
frontend-analyzerhculap/better-codeAgent21mo agoMITA48Claude Code
comment-reviewermelodic-software/claude-code-pluginsAgent33todayMITA89Claude Code
teaAlberto-Codes/docvetAgent10yesterdayMITA8Claude Code
sweep-workermelodic-software/claude-code-pluginsAgent33todayMITA66Claude Code
drift-readermelodic-software/claude-code-pluginsAgent33todayMITA75Claude Code
proof-eyesjx-hxxx/hi-vibeAgent327d agoMITA115Claude Code
doc-writersefaertunc/WorclaudeAgent43mo agoMITA8Claude Code