Skip to content
Skill

Frontend security

Audits React web code for authorization, bundle secrets, injection sinks and supply chain

Frontend security is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
19
Last commit
License
Apache-2.0
Listing updated

Similar skills

About Frontend security

This skill guides an agent through a security review of React web code, aimed at the boundary between browser and server. It asks the agent to check each Server Function, Server Action or route handler for authentication and object-level authorization inside the function itself, rather than relying on middleware or UI checks. It also covers what data is passed from server to client, whether secrets leak into built client JavaScript through public-prefixed environment variables, and how user-influenced HTML and URLs are handled at injection sinks.

The workflow is audit first, fix on request. The agent is asked to reproduce each weakness, apply the smallest fix, confirm the same request is now refused, and add a test. Findings without a reproduction are to be labelled as suspicions. The checklist is ordered with authorization first, followed by client data exposure, bundle secrets, injection sinks, and dependency supply chain. The skill includes a verification checklist and a set of rationalizations to resist, and it refers to two reference files for detailed Incorrect/Correct examples.

It expects a React web project and access to its code and, where relevant, its production build output for the secrets check. Its guidance relies on a mokata pipeline with run state commands, and it states that browser-support figures and CVE details must be verified against advisories before being quoted.

When your agent uses it

mokata · Frontend security for React web — authorization first, then secrets in bundles, injection sinks and supply chain; audit first, fix on request.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 3 files (11 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the mokata plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add JasGujral/mokata-oss
/plugin install mokata@mostack

Or copy only this skill to ~/.claude/skills/frontend-security:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/frontend-security &&
cp -R "$tmp/src/mokata/skills/frontend-security" ~/.claude/skills/frontend-security &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/frontend-security inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/frontend-security to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/frontend-security &&
cp -R "$tmp/src/mokata/skills/frontend-security" ~/.agents/skills/frontend-security &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/frontend-security inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/frontend-security to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/frontend-security &&
cp -R "$tmp/src/mokata/skills/frontend-security" ~/.cursor/skills/frontend-security &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/frontend-security inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/JasGujral/mokata-oss.git --path src/mokata/skills/frontend-security

Or copy the folder to ~/.gemini/skills/frontend-security yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/frontend-security:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/frontend-security &&
cp -R "$tmp/src/mokata/skills/frontend-security" ~/.copilot/skills/frontend-security &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/frontend-security inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/JasGujral/mokata-oss.git

Then copy mokata-oss/src/mokata/skills/frontend-security into your agent's skills folder as frontend-security. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Server entry point authorization
Checks that every Server Function and route handler authenticates the caller and authorizes the specific object.
Client data exposure review
Looks at props and return values sent to the browser to confirm only permitted fields are included.
Bundle secret detection
Inspects production build output for credentials inlined through public-prefixed environment variables.
Injection sink handling
Reviews dangerouslySetInnerHTML, unsafe URL attributes and direct DOM writes for sanitization.
Dependency supply chain checks
Reviews new dependencies, lockfile handling and framework advisory version floors.

Good for

  • Audit a React app's server actions for missing authorization checks
  • Find secrets accidentally exposed in a production JavaScript bundle
  • Review user-generated HTML rendering for XSS risks
  • Check a new npm dependency before adding it to a React project
  • Write a test that sends a forbidden request directly to a server function

Frontend security FAQ

What does Frontend security need to run?

It targets React web projects and expects access to the code and, for the secrets check, the production build output. If the build output is unavailable it falls back to reading the environment configuration and says so.

Does Frontend security change code on its own?

It is designed to audit first and fix only on request. Durable writes and recorded security decisions are gated for human approval.

When does Frontend security apply?

It applies to React web changes that add or change a server function, route handler, page reading protected data, client-exposed environment variable, or user-controlled HTML or URLs. It is not for backend-only services or React Native apps.

How do I install Frontend security in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/frontend-security to use it in all your projects, or to .claude/skills/frontend-security in one project. Or install the mokata plugin, which includes it: /plugin marketplace add JasGujral/mokata-oss, then /plugin install mokata@mostack.

Does Frontend security run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Frontend security?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Frontend security?

The closest alternatives to Frontend security are Security review, Security review, Security audit, Gha security review and Security.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from JasGujral/mokata-oss

  1. Makes the agent design API contracts first and check callers before changing them

    • Open source
    • 19 GitHub stars
    • Developer tools
  2. Gives an agent NestJS rules for guards, DTO validation, modules and tests

    • Open source
    • 19 GitHub stars
    • Developer tools
  3. Guides an agent through Socratic exploration of an approach before any spec or code

    • Open source
    • 19 GitHub stars
    • Developer tools
  4. Guides an agent to capture live browser console, network and page state for tests

    • Open source
    • 19 GitHub stars
    • Developer tools
  5. Guides the agent to reproduce a reported bug with a failing test before fixing it

    • Open source
    • 19 GitHub stars
    • Developer tools
  6. Guides an agent on CI/CD pipelines, release builds and pinned supply-chain posture

    • Open source
    • 19 GitHub stars
    • Developer tools