frontend-mobile-security-xss-scan

frontend-mobile-security-xss-scan is a skill for Claude Code from rmyndharis/antigravity-skills. It costs 46 tokens per session (2,132 once invoked), scanned A, original, MIT.

A code-scanning guide for finding Cross-Site Scripting (XSS) risks in React, Vue, Angular, and plain JavaScript. XSS is an attack where unsafe page code lets someone run unwanted scripts in a visitor’s browser.

In plain words
What is it for?
Use it to review frontend code for unsafe HTML or DOM changes, weak input sanitization, and framework-specific XSS patterns.
Why use it?
It helps spot places where user input is inserted into pages or URLs unsafely, before attackers can exploit them.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to review frontend code for unsafe HTML or DOM changes, weak input sanitization, and framework-specific XSS patterns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rmyndharis/antigravity-skills/frontend-mobile-security-xss-scan
About the project

Antigravity Skill Vault is a collection of reusable Agent Skills for Google Antigravity, covering software development, operations, security, and business work. It is for people who want Antigravity agents to follow specialized expertise, personas, and structured workflows. The catalogue skills are entries from this collection.

rmyndharis/antigravity-skills · 1,522 stars · on GitHub

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 rmyndharis/antigravity-skills --skill frontend-mobile-security-xss-scan
Clone the repo
git clone --depth 1 https://github.com/rmyndharis/antigravity-skills

Made for: Claude Code.

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-mobile-security-xss-scan

README.md
[![agentmods](https://agentmods.dev/badge/skills/rmyndharis/antigravity-skills/frontend-mobile-security-xss-scan/github.svg)](https://agentmods.dev/skills/rmyndharis/antigravity-skills/frontend-mobile-security-xss-scan)
Your own site
<a href="https://agentmods.dev/skills/rmyndharis/antigravity-skills/frontend-mobile-security-xss-scan"><img src="https://agentmods.dev/badge/skills/rmyndharis/antigravity-skills/frontend-mobile-security-xss-scan/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-mobile-security-xss-scan

Your own site · 80×15
<a href="https://agentmods.dev/skills/rmyndharis/antigravity-skills/frontend-mobile-security-xss-scan"><img src="https://agentmods.dev/badge/skills/rmyndharis/antigravity-skills/frontend-mobile-security-xss-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,132 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Output Handling · line 231
    Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.
    Fix: Validate and sanitize all model output before using it in downstream contexts. Use parameterized queries for SQL, shell quoting for commands, and HTML encoding for web output.
How audits are shown
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.00046 $0.02132
Opus 5 $0.00023 $0.01066
Sonnet 5 $0.00009 $0.00426
Haiku 4.5 $0.00005 $0.00213

Measured 8d ago against content hash eb86b9c2de2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

frontend-mobile-security-xss-scan 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 8d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/frontend-mobile-security-xss-scan/SKILL.md · 323 lines

How it starts

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

XSS Vulnerability Scanner for Frontend Code

You are a frontend security specialist focusing on Cross-Site Scripting (XSS) vulnerability detection and prevention. Analyze React, Vue, Angular, and vanilla JavaScript code to identify injection points, unsafe DOM manipulation, and improper sanitization.

Use this skill when

  • Working on xss vulnerability scanner for frontend code tasks or workflows
  • Needing guidance, best practices, or checklists for xss vulnerability scanner for frontend code

Do not use this skill when

  • The task is unrelated to xss vulnerability scanner for frontend code
  • You need a different domain or tool outside this scope

Context

The user needs comprehensive XSS vulnerability scanning for client-side code, identifying dangerous patterns like unsafe HTML manipulation, URL handling issues, and improper user input rendering. Focus on context-aware detection and framework-specific security patterns.

Requirements

$ARGUMENTS

Instructions

1. XSS Vulnerability Detection

Scan codebase for XSS vulnerabilities using static analysis:

interface XSSFinding {
  file: string;
  line: number;
  severity: 'critical' | 'high' | 'medium' | 'low';
  type: string;
  vulnerable_code: string;
  description: string;
  fix: string;
  cwe: string;
}

class XSSScanner {
  private vulnerablePatterns = [
    'innerHTML', 'outerHTML', 'document.write',
    'insertAdjacentHTML', 'location.href', 'window.open'
  ];

  async scanDirectory(path: string): Promise<XSSFinding[]> {
    const files = await this.findJavaScriptFiles(path);
    const findings: XSSFinding[] = [];

    for (const file of files) {
      const content = await fs.readFile(file, 'utf-8');
      findings.push(...this.scanFile(file, content));
    }

    return findings;
  }

  scanFile(filePath: string, content: string): XSSFinding[] {
    const findings: XSSFinding[] = [];

    findings.push(...this.detectHTMLManipulation(filePath, content));
    findings.push(...this.detectReactVulnerabilities(filePath, content));
    findings.push(...this.detectURLVulnerabilities(filePath, content));
    findings.push(...this.detectEventHandlerIssues(filePath, content));

    return findings;
  }

  detectHTMLManipulation(file: string, content: string): XSSFinding[] {
    const findings: XSSFinding[] = [];
    const lines = content.split('\n');

    lines.forEach((line, index) => {
      if (line.includes('innerHTML') && this.hasUserInput(line)) {
        findings.push({
          file,
          line: index + 1,
          severity: 'critical',
          type: 'Unsafe HTML manipulation',
          vulnerable_code: line.trim(),
          description: 'User-controlled data in HTML manipulation creates XSS risk',
          fix: 'Use textContent for plain text or sanitize with DOMPurify library',
          cwe: 'CWE-79'
        });
      }
    });

    return findings;
  }

  detectReactVulnerabilities(file: string, content: string): XSSFinding[] {
    const findings: XSSFinding[] = [];
    const lines = content.split('\n');

    lines.forEach((line, index) => {
      if (line.includes('dangerously') && !this.hasSanitization(content)) {
        findings.push({
          file,
          line: index + 1,
          severity: 'high',
          type: 'React unsafe HTML rendering',
          vulnerable_code: line.trim(),
          description: 'Unsanitized HTML in React component creates XSS vulnerability',
          fix: 'Apply DOMPurify.sanitize() before rendering or use safe alternatives',
          cwe: 'CWE-79'
        });
      }
    });

    return findings;
  }

  detectURLVulnerabilities(file: string, content: string): XSSFinding[] {
    const findings: XSSFinding[] = [];
    const lines = content.split('\n');

    lines.forEach((line, index) => {
      if (line.includes('location.') && this.hasUserInput(line)) {
        findings.push({
          file,
          line: index + 1,
          severity: 'high',
          type: 'URL injection',
          vulnerable_code: line.trim(),
          description: 'User input in URL assignment can execute malicious code',
          fix: 'Validate URLs and enforce http/https protocols only',
          cwe: 'CWE-79'
        });
      }
    });

    return findings;
  }

  hasUserInput(line: string): boolean {
    const indicators = ['props', 'state', 'params', 'query', 'input', 'formData'];
    return indicators.some(indicator => line.includes(indicator));
  }

  hasSanitization(content: string): boolean {
    return content.includes('DOMPurify') || content.includes('sanitize');
  }
}

Read the full file on GitHub · 323 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. 8d ago First seen · 323 lines · 46 tokens per session scan A eb86b9c2de2b

Subscribe to this mod's changes

frontend-mobile-security-xss-scan is a skill published in the GitHub repository rmyndharis/antigravity-skills (1,522 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 2,132 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-09-03.

Related

Other skills, from other repositories

electron-desktop-builder

Converts a web app (Express, React, Vite, Next.js) into an Electron desktop app. Use when starting a new Electron project from an existing web app, when setting up electron-builder for the first time, when creating main.ts/preload.ts boilerplate, when generating icon assets, or when configuring NSIS installers.…

smartbrainactivity/electron-desktop-builder · 109 tokens

angular-state-management

Master modern Angular state management with Signals, NgRx, and RxJS. Use when setting up global state, managing component stores, choosing between state solutions, or migrating from legacy patterns.

marysatasselshaped667/skills-collection-1 · 41 tokens

angular-best-practices

Angular performance optimization and best practices guide. Use when writing, reviewing, or refactoring Angular code for optimal performance, bundle size, and rendering efficiency.

marysatasselshaped667/skills-collection-1 · 36 tokens

3d-web-experience

You bring the third dimension to the web. You know when 3D enhances and when it's just showing off. You balance visual impact with performance. You make 3D accessible to users who've never touched a 3D app. You create moments of wonder without sacrificing usability.

marysatasselshaped667/skills-collection-1 · 62 tokens

flutter-developer

Build beautiful, performant Flutter applications for iOS, Android, and web. Covers state management, navigation, animations, platform channels, and deployment.

AtulPurohit/Antigravity-Awesome-Skills · 33 tokens

wordpress-developer

Develop professional WordPress sites, custom themes, and plugins. Covers WordPress best practices, hooks system, custom post types, WP REST API, and security.

AtulPurohit/Antigravity-Awesome-Skills · 36 tokens