frontend-security

frontend-security is a skill for Claude Code from makigjuro/cloudstack-ai-plugins. It costs 49 tokens per session (755 once invoked), scanned A, original, MIT.

A set of security rules for React and TypeScript frontend code. It covers preventing unsafe HTML, handling login tokens, browser storage, secrets, cross-origin requests, errors, and content security.

In plain words
What is it for?
Use it when rendering user or API content, implementing login, storing browser data, handling 401 or 403 responses, or configuring frontend dependencies and API access.
Why use it?
It reduces common risks such as cross-site scripting, leaked credentials, unsafe token storage, and incorrect handling of unauthorized requests. The rules apply while code is being written, not only during a later review.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the react-developer plugin — 6 skills, 1 agent shipped together

Good fit Use it when rendering user or API content, implementing login, storing browser data, handling 401 or 403 responses, or configuring frontend dependencies and API access.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makigjuro/cloudstack-ai-plugins/frontend-security
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.

Any agent
npx skills add makigjuro/cloudstack-ai-plugins --skill frontend-security
Clone the repo
git clone --depth 1 https://github.com/makigjuro/cloudstack-ai-plugins

Made for: Claude Code.

Or install react-developer, the plugin that ships this one along with the rest of its 6 skills, 1 agent.

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/makigjuro/cloudstack-ai-plugins/frontend-security/github.svg)](https://agentmods.dev/skills/makigjuro/cloudstack-ai-plugins/frontend-security)
Your own site
<a href="https://agentmods.dev/skills/makigjuro/cloudstack-ai-plugins/frontend-security"><img src="https://agentmods.dev/badge/skills/makigjuro/cloudstack-ai-plugins/frontend-security/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-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/makigjuro/cloudstack-ai-plugins/frontend-security"><img src="https://agentmods.dev/badge/skills/makigjuro/cloudstack-ai-plugins/frontend-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 755 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.00049 $0.00755
Opus 5.5 $0.00020 $0.00302
Sonnet 5.5 $0.00010 $0.00151
Haiku 4.5 $0.00005 $0.00076

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

Security

Grade A, and why

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

plugins/react-developer/skills/frontend-security/SKILL.md · 70 lines

How it starts

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

Frontend Security Rules

Apply these rules while writing frontend code, not just during review.

XSS Prevention

  • Never use dangerouslySetInnerHTML without DOMPurify sanitization
  • Sanitize any user-generated content before rendering: DOMPurify.sanitize(userContent)
  • Avoid injecting raw HTML from API responses — parse and render structured data instead
  • When rendering markdown, use a library that sanitizes by default (e.g., react-markdown with rehype-sanitize)

Authentication & Token Handling

  • Never hardcode API keys, tokens, secrets, or credentials in frontend source code
  • Auth tokens should be managed by the auth library (OIDC client, MSAL, etc.) with automatic silent renewal
  • API key mode is acceptable for local development only — production must use a proper auth flow (OIDC, OAuth2)
  • On 401 response from the API: clear auth state and redirect to /login?redirect={currentPath}
  • On 403 response: show an access denied message, do not retry or redirect to login

localStorage / sessionStorage

  • Only store auth tokens and user preferences in localStorage — never store sensitive PII, full user profiles, or secrets
  • Use sessionStorage for data that should not persist across tabs (if applicable)
  • When using Zustand persist middleware (or similar), use partialize to explicitly select which fields are stored
  • Clear auth storage on logout — call localStorage.removeItem() for all auth-related keys

No Hardcoded Secrets

  • Never commit .env files with real API keys or secrets
  • Use .env.example with placeholder values for documentation
  • Environment variables exposed to the frontend (e.g., VITE_API_URL) must never contain secrets — they are visible in the browser bundle
  • Validate: no string literals matching patterns like sk_, pk_, api_key_, bearer, password= in committed code

CORS Configuration

  • Only allow specific origins in production CORS configuration, never Access-Control-Allow-Origin: *
  • CORS is a server-side concern, but frontend developers should be aware of it when configuring API clients
  • If hitting CORS errors locally, fix the server CORS config rather than using a proxy that masks the issue in dev

Read the full file on GitHub · 70 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. 1mo ago First seen · 70 lines · 49 tokens per session scan A 387cc2cf581c

Subscribe to this mod's changes

frontend-security is a skill published in the GitHub repository makigjuro/cloudstack-ai-plugins (1 stars, last pushed 29d ago), licensed MIT. It adds 49 tokens to every session and 755 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-10-21.

Related

frontend-security compared with skills from other repositories

frontend-security next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
frontend-securitymakigjuro/cloudstack-ai-pluginsSkill129d agoMITA49Claude Code
react-frontendiliaal/whetstoneSkill37todayMITA57Claude Code, Codex
testing-reactiliaal/whetstoneSkill37todayMITA57Claude Code, Codex
frontendJoncik91/ucaiSkill283mo agoMITA40Claude Code
svg-masterylukaskellerstein/claude-my-marketplaceSkill313d agononeA276Claude Code
ia-react-frontendiliaal/whetstoneSkill37todayMITA73Claude Code
css-architecturelukaskellerstein/claude-my-marketplaceSkill313d agononeA91Claude Code