claude-workspace: Skill for Claude Code

.claude/skills/security-audit/SKILL.md

security-audit is a skill for Claude Code from Piyush8296/claude-workspace. It costs 43 tokens per session (1,664 once invoked), scanned A, original, MIT.

A checklist for finding common security weaknesses in frontend applications, such as unsafe handling of browser input, exposed secrets, and weak request protection.

In plain words
What is it for?
Use it to review React or other frontend code for cross-site scripting (XSS), injection, cross-site request forgery (CSRF), unsafe redirects, clickjacking, leaked keys, vulnerable packages, and authentication issues.
Why use it?
It helps identify problems that could let attackers run code, steal data, perform actions as users, or misuse exposed accounts and dependencies.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is Piyush8296/claude-workspace's own configuration. It tells Claude Code how to work on claude-workspace itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-workspace configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Piyush8296/claude-workspace. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Piyush8296/claude-workspace/main/.claude/skills/security-audit/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Piyush8296/claude-workspace

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/piyush8296/claude-workspace/security-audit/github.svg)](https://agentmods.dev/skills/piyush8296/claude-workspace/security-audit)
Your own site
<a href="https://agentmods.dev/skills/piyush8296/claude-workspace/security-audit"><img src="https://agentmods.dev/badge/skills/piyush8296/claude-workspace/security-audit/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 security-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/piyush8296/claude-workspace/security-audit"><img src="https://agentmods.dev/badge/skills/piyush8296/claude-workspace/security-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,664 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.00043 $0.01664
Opus 5 $0.00022 $0.00832
Sonnet 5 $0.00009 $0.00333
Haiku 4.5 $0.00004 $0.00166

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

Security

Grade A, and why

security-audit 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 9d 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.

.claude/skills/security-audit/SKILL.md · 210 lines

How it starts

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

Frontend Security Audit

Threat Model for Frontend Apps

Threat Vector Impact
XSS User input rendered as HTML/JS Session hijack, data theft, defacement
Injection Dynamic URLs, eval(), innerHTML Code execution, redirects
CSRF Forged requests from other sites Unauthorized actions
Secrets Exposure API keys in client bundle Account compromise, billing abuse
Dependency Vulns Outdated packages with CVEs Supply chain attacks
Clickjacking Iframe embedding UI redress attacks
Open Redirects Unvalidated redirect URLs Phishing, credential theft

Audit Checklist

1. XSS Prevention

# Find dangerouslySetInnerHTML usage
grep -rn 'dangerouslySetInnerHTML' src/ --include='*.tsx' --include='*.jsx'

# Find direct DOM manipulation
grep -rn 'innerHTML\|outerHTML\|document\.write' src/ --include='*.ts' --include='*.tsx'

# Find eval and dynamic code execution
grep -rn 'eval(\|new Function(\|setTimeout.*string' src/ --include='*.ts' --include='*.tsx'

Rules:

  • Never use dangerouslySetInnerHTML without DOMPurify sanitization
  • Never use eval(), new Function(), or string-based setTimeout
  • Always escape user input before rendering
  • Use React's built-in escaping (JSX expressions auto-escape)
// BAD: direct HTML injection
<div dangerouslySetInnerHTML={{ __html: userInput }} />

// GOOD: sanitized
import DOMPurify from 'dompurify';
<div dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(userInput) }} />

// BEST: avoid entirely, use structured data
<div>{userInput}</div>  // React auto-escapes

2. Secrets & API Keys

# Scan for hardcoded secrets
grep -rn 'sk_live\|pk_live\|AKIA\|ghp_\|password\s*=\|secret\s*=' src/ --include='*.ts' --include='*.tsx' --include='*.js'

# Check for secrets in client-accessible env vars
grep -rn 'NEXT_PUBLIC_.*SECRET\|NEXT_PUBLIC_.*KEY\|VITE_.*SECRET' .env* 2>/dev/null

# Check if .env is gitignored
grep -q '.env' .gitignore || echo "WARNING: .env not in .gitignore"

Read the full file on GitHub · 210 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. 9d ago First seen · 210 lines · 43 tokens per session scan A 382475a9f723

Subscribe to this mod's changes

security-audit is a skill published in the GitHub repository Piyush8296/claude-workspace (2 stars, last pushed 4mo ago), licensed MIT. It adds 43 tokens to every session and 1,664 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-08-31.

Related

Other skills, from other repositories

thinking-theory-of-constraints

When throughput or latency is pipeline-limited, identify the single binding constraint and exploit, subordinate, elevate, then recheck—ignore non-constraints.

tjboudreaux/cc-thinking-skills · 37 tokens

Vizra ADK Memory System

Implement persistent memory, session context, and vector memory (RAG) for AI agents.

vizra-ai/vizra-adk · 24 tokens

foundation-models

On-device LLM integration using Apple's Foundation Models framework. Use when implementing AI text generation, structured output, or tool calling.

rshankras/claude-code-apple-skills · 29 tokens

analytics-interpretation

Interpret app metrics and make data-driven decisions. Covers DAU/MAU, retention, LTV, ARPU, App Store Connect analytics, AARRR funnel analysis, cohort analysis, and diagnostic decision trees. Use when user wants to understand their metrics, diagnose problems, or build a data-driven growth plan.

rshankras/claude-code-apple-skills · 68 tokens

app-namer

Turn an app idea into validated, App-Store-ready name candidates. Use when the user says "name my app", "what should I call it", "app name ideas", "help me name this app", "is this name available", or needs to pick a brandable, ownable name before reserving it in App Store Connect.

rshankras/claude-code-apple-skills · 73 tokens

in-app-events

Generates In-App Event metadata templates for App Store Connect — event names, descriptions, badge types, image specs, and deep link configuration. Use when creating events for App Store visibility, engagement campaigns, or seasonal promotions.

rshankras/claude-code-apple-skills · 48 tokens