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.
npx agentmods add agents/hculap/better-code/frontend-analyzergit clone --depth 1 https://github.com/hculap/better-codeWhat 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 | $0.00048 | $0.00966 |
| Opus 5 | $0.00024 | $0.00483 |
| Sonnet 5 | $0.00010 | $0.00193 |
| Haiku 4.5 | $0.00005 | $0.00097 |
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 yesterday.
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.
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:
- Find unnecessary re-renders (missing memo, useMemo, useCallback)
- Identify large bundle impacts (heavy imports, missing code splitting)
- Detect inefficient state management patterns
- Spot render-blocking resources
- Find memory leaks (missing cleanup, event listener leaks)
- Identify layout thrashing and DOM inefficiencies
Analysis Process:
-
Detect Tech Stack
- React, Vue, Angular, Svelte, Solid, etc.
- State management: Redux, Zustand, MobX, Pinia, etc.
- Build tool: Webpack, Vite, etc.
-
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
-
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
-
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
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.
- yesterday First seen · 137 lines · 48 tokens per session scan A d4bd8d6e727a
frontend-analyzer is an agent published in the GitHub repository hculap/better-code (2 stars, last pushed 7mo ago), licensed MIT. It adds 48 tokens to every session and 966 once invoked, about $0.0002 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
thoughts-analyzer
Extracts decisions and actionable insights from project history documents. Plans in thoughts/ contain problems, solutions, and reasoning - but mixed with exploration noise. Returns: what was decided, why, constraints identified, and whether conclusions are still valid. Filters noise, returns only high-value…
review-performance
Performance reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-performance with artifact paths. Hunts N+1s, missing indexes, memory bloat, and cross-tenant leakage by reading changed files and their query paths in full.
review-tests-rspec
RSpec test quality and coverage reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-tests-rspec in repos that test with RSpec. Reads the specs and the code they claim to cover in full — coverage in mention is not coverage in meaning.
review-ticket-delivery
Ticket-delivery reviewer for PR audits. Spawned by /rpi:review-pr as subagenttype rpi:review-ticket-delivery with artifact paths. Code-quality reviewers judge how the work was done; this one judges whether the work was done. Runs on every review; carries the always-on security sweep.
documcp-test
Write tests for DocuMCP following established patterns.
documcp-memory
Work with DocuMCP's Knowledge Graph memory system.