frontend-mobile-security-xss-scan

frontend-mobile-security-xss-scan is a skill for Claude Code from tmolavi/mcp-agent-skills-hub. It costs 46 tokens per session (2,132 once invoked), scanned A, a copy of frontend-mobile-security-xss-scan, MIT.

A static-analysis guide for finding Cross-Site Scripting (XSS) flaws in frontend code. XSS is an attack where untrusted input is made into browser code that can affect users who view a page.

In plain words
What is it for?
It helps scan client-side code, identify injection points, assess XSS findings, and recommend safer rendering and sanitisation patterns.
Why use it?
It helps locate unsafe HTML and DOM manipulation, risky URL handling, and missing input sanitisation before attackers can use them. The guidance covers React, Vue, Angular, and plain JavaScript.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit It helps scan client-side code, identify injection points, assess XSS findings, and recommend safer rendering and sanitisation patterns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmolavi/mcp-agent-skills-hub/frontend-mobile-security-xss-scan
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 tmolavi/mcp-agent-skills-hub --skill frontend-mobile-security-xss-scan
Clone the repo
git clone --depth 1 https://github.com/tmolavi/mcp-agent-skills-hub

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/tmolavi/mcp-agent-skills-hub/frontend-mobile-security-xss-scan/github.svg)](https://agentmods.dev/skills/tmolavi/mcp-agent-skills-hub/frontend-mobile-security-xss-scan)
Your own site
<a href="https://agentmods.dev/skills/tmolavi/mcp-agent-skills-hub/frontend-mobile-security-xss-scan"><img src="https://agentmods.dev/badge/skills/tmolavi/mcp-agent-skills-hub/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/tmolavi/mcp-agent-skills-hub/frontend-mobile-security-xss-scan"><img src="https://agentmods.dev/badge/skills/tmolavi/mcp-agent-skills-hub/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.
Origin 100% copy Near-identical to another mod 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-12, 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

This is a copy

100% identical to frontend-mobile-security-xss-scan — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

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 tmolavi/mcp-agent-skills-hub (8 stars, last pushed 16d 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. It is 100% identical to frontend-mobile-security-xss-scan, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

design-taste-frontend

Frontend design taste guide: typography, color harmonies, spacing, layout patterns, and visual quality standards. / TR: Frontend tasarım zevki rehberi: modern web ve mobil arayüzler için tipografi, renk, boşluk, düzen kalıpları ve görsel kalite standartları.

GktuOktay/ai-skills · 69 tokens

ui-animation

UI animation standards: web/mobile motion terminology, opportunity detection, optimization, and code review. / TR: Uçtan uca kullanıcı arayüzü (UI) animasyon yeteneği: web ve mobil animasyonlar için terminoloji, optimizasyon ve kod incelemesi.

GktuOktay/ai-skills · 61 tokens

imagegen-frontend

AI image generation and integration guide for frontend projects: web hero visuals, UI assets, icons, and marketing graphics. / TR: Frontend projeleri için yapay zeka görsel oluşturma rehberi: web hero görselleri, mobil varlıklar, ikonlar ve pazarlama görselleri.

GktuOktay/ai-skills · 68 tokens

Image to Code Conversion

Converts screenshots, mockups, or Figma design files into pixel-perfect, responsive code. / TR: Ekran görüntüleri, mockup'lar veya tasarım dosyalarını (Figma vb.) analiz ederek piksel mükemmelliğinde, duyarlı (responsive) ve temiz koda dönüştürme.

GktuOktay/ai-skills · 73 tokens

Client-Side Security Best Practices

Frontend security auditing, XSS, CSRF, Content Security Policy (CSP) headers, and DOM vulnerability prevention. / TR: Frontend güvenliği; XSS, CSRF, Content Security Policy (CSP) header'ları ve DOM tabanlı zafiyetlerin engellenmesi.

GktuOktay/ai-skills · 68 tokens

interactive-dashboard-builder

Build self-contained interactive HTML dashboards with Chart.js, dropdown filters, and professional styling. Use when creating dashboards, building interactive reports, or generating shareable HTML files with charts and filters that work without a server.

w95/awesome-claude-corporate-skills · 46 tokens