frontend-security

frontend-security is a skill for Claude Code, Codex from chadixearth/graphyloop. It costs 80 tokens per session (1,857 once invoked), scanned A, original, MIT.

A security review guide for code that runs in the browser, including React, Next, Vue, Svelte, and plain JavaScript. It checks how the code handles user data, credentials, APIs, and outside scripts.

In plain words
What is it for?
Use it when displaying user or API content, adding login features, storing tokens, embedding scripts or iframes, or reviewing related changes.
Why use it?
It helps find browser-side risks such as cross-site scripting, leaked keys, unsafe token storage, weak security headers, and untrusted messages or frames.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/chadixearth/graphyloop/frontend-security
Any agent
npx skills add chadixearth/graphyloop --skill frontend-security
Clone the repo
git clone --depth 1 https://github.com/chadixearth/graphyloop

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/chadixearth/graphyloop/frontend-security.svg)](https://agentmods.dev/skills/chadixearth/graphyloop/frontend-security)
Your own site
<a href="https://agentmods.dev/skills/chadixearth/graphyloop/frontend-security"><img src="https://agentmods.dev/badge/skills/chadixearth/graphyloop/frontend-security.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,857 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00080 $0.01857
Opus 5 $0.00040 $0.00928
Sonnet 5 $0.00016 $0.00371
Haiku 4.5 $0.00008 $0.00186

Measured 4d ago against content hash 9a7522f21fcb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

frontend-security scanned grade A with 1 finding 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 4d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sI https://host/ | grep -iE 'content-security-policy|x-frame|x-content-type|referrer|strict-transport|permissions-policy'
skills/frontend-security/SKILL.md · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Frontend security

Server-side review misses the frontend because the frontend "has no secrets" — and then a service-role key ships in a NEXT_PUBLIC_* var, a markdown renderer writes raw HTML into the DOM, and an access token sits in localStorage where any injected script can read it. This skill is the client-side pass: the sinks, the storage, the headers, and what to verify before calling it done.

When to activate

  • Rendering anything a user or an API supplied (HTML, markdown, SVG, URLs, filenames).
  • Auth in the browser: login, logout, token refresh, "remember me", role-based UI.
  • Adding an env var, an analytics/chat/payment script, an iframe, or a postMessage channel.
  • Reviewing a PR that touches any of the above, or a "make it work in the browser" fix.

The five checks, in order

  1. Secrets — no key that grants privilege may reach the bundle.
  2. Sinks — every place a string becomes markup, a URL, or code.
  3. Token storage — where credentials live between requests.
  4. Headers — CSP and friends, set where the app is actually served from.
  5. Third-party — scripts, iframes, and messages you did not write.

1. Secrets in the bundle

  • A var is public the moment its name is prefixed (NEXT_PUBLIC_, VITE_, PUBLIC_, REACT_APP_, EXPO_PUBLIC_) or referenced from a client component. Prefixing a server key does not make it safe — it publishes it.
  • Never prefix: service-role keys, admin/API secrets, webhook signing secrets, SMTP or DB credentials, private OAuth client secrets. See secrets-hygiene.
  • Grep before shipping: NEXT_PUBLIC_.*(SERVICE|SECRET|PRIVATE|ADMIN|TOKEN|PASSWORD), and search the built output (.next/static, dist/assets) for the last 8 characters of any server key you hold. A hit in the build is a leak, not a warning.
  • Anything the browser can call, an attacker can call with the same key. If a key must stay secret, the call belongs in a route handler / server action / edge function, and the client calls that.

Read the full file on GitHub · 129 lines

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. 4d ago First seen · 129 lines · 80 tokens per session scan A 9a7522f21fcb

Subscribe to this mod's changes

frontend-security is a skill published in the GitHub repository chadixearth/graphyloop (2 stars, last pushed 18d ago), licensed MIT. It adds 80 tokens to every session and 1,857 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agent-code-analyzer

Agent skill for code-analyzer - invoke with $agent-code-analyzer.

ruvnet/ruflo · 19 tokens

agui-dotnet-streaming-chat

Get started with the AG-UI .NET SDK: bootstrap and run your first streaming-chat app (client + server) with the AG-UI .NET NuGet packages (AGUI.Client, AGUI.Server, AGUI.Formatting, AGUI.Abstractions). USE FOR: which packages to install and how to wire them; constructing an AGUIChatClient against an endpoint and…

ag-ui-protocol/ag-ui · 223 tokens

agui-dotnet-sample-step

Add a GettingStarted sample Step (a Server/Client pair) to the AG-UI .NET SDK that demonstrates one protocol feature the way we want users to write it. USE FOR: adding a new samples/GettingStarted/StepNN Server+Client pair, wiring it into AGUI.slnx and the integration-test project, giving it a deterministic…

ag-ui-protocol/ag-ui · 168 tokens

agui-dotnet-protobuf

Use the protobuf wire transport (instead of the default Server-Sent Events) for an AG-UI connection with the AG-UI .NET SDK — a compact binary event stream negotiated via the Accept header. USE FOR: making an AGUIChatClient prefer protobuf by wiring an AGUIEventStreamHandler with ProtobufEventStreamFormatter (then…

ag-ui-protocol/ag-ui · 162 tokens

revdiff-plan

Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…

umputun/revdiff · 84 tokens

moai-ref-ui-polish

UI polish and interface-completion reference: the small visual details — concentric border radius, optical alignment, shadow-vs-border, motion easing, typography smoothing, tabular numbers, icon stroke weight, hit areas — that separate polished interfaces from generic ones. Agent-extending skill that amplifies…

modu-ai/moai-adk · 98 tokens