Frontend Security
Use when the user asks how to prevent XSS and set a content security policy, CSP nonces, Trusted Types, DOMPurify, CSRF tokens, SRI, secure cookies, clickjacking or security headers for a web app. Produces frontend hardening code and header config. Not for server-side OWASP testing (use owasp-web-security) or login flows (use frontend-authentication).
Install
npx skills add j4flmao/agent-skills --skill frontend-securitygit clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/frontend/universal/security ~/.claude/skills/frontend-securityPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Frontend Security
## Purpose
Prevent XSS, CSRF, and injection attacks. CSP blocks unauthorized scripts. SRI ensures CDN integrity. Cookies locked down. All user output encoded.
## Agent Protocol
### Trigger
Exact user phrases: "XSS", "CSP", "CSRF", "SRI", "secure cookies", "security headers", "frontend security", "sanitize input", "content security policy", "cross-site scripting".
### Input Context
Before activating, verify:
- The framework and build tool (React, Vue, Vite, Next.js, etc.).
- Whether the focus is on a new feature, an audit, or a vulnerability fix.
### Output Artifact
No file output. Produces security guidance, header configs, or code fixes as text.
### Response Format
```
Issue: {description}
Severity: {critical/high/medium/low}
Config: {code block or header directive}
```
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
### Completion Criteria
- [ ] CSP header present and blocks inline scripts (nonce or hash only).
- [ ] SRI hashes on all external CSS/JS resources.
- [ ] Cookies use HttpOnly + Secure + SameSite=Lax or Strict.
- [ ] State-changing requests include CSRF token.
- [ ] All user-supplied data is escaped before rendering (no dangerouslySetInnerHTML without DOMPurify).
- [ ] Input sanitization on all form fields.
### Max Response Length
4096 tokens.
## Security Architecture / Decision Trees
### CSP Strategy Decision TreeDetails
- Skill name
frontend-security- Repository
- j4flmao/agent-skills
- Path
skills/frontend/universal/security/SKILL.md- License
- MIT
- Repo updated
- 17 November 2026
FAQ
What does the Frontend Security skill do?
Use when the user asks how to prevent XSS and set a content security policy, CSP nonces, Trusted Types, DOMPurify, CSRF tokens, SRI, secure cookies, clickjacking or security headers for a web app. Produces frontend hardening code and header config. Not for server-side OWASP testing (use owasp-web-security) or login flows (use frontend-authentication).
How do I install the Frontend Security skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add j4flmao/agent-skills --skill frontend-security. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Frontend Security popular?
It lives in j4flmao/agent-skills, which has 45 GitHub stars and 6 forks.
Related skills
Agent Observability
45j4flmao/agent-skills
Use when the user asks about agent observability, tracing agent reasoning, debugging an agent loop, OpenTelemetry GenAI spans for LLM calls, LLM cost tracking per agent, agent audit logs or hallucination/eval monitoring in production. Produces instrumentation config, trace schema, dashboards, alerts and cost attribution. Not for generic service tracing without LLMs (use devops-opentelemetry).
AI Agent Architectures
45j4flmao/agent-skills
Use when the user asks to build an AI agent, design an agent that calls tools and keeps memory, write an agent system prompt or pick an agent framework (Claude Agent SDK, OpenAI Agents SDK, LangGraph). Produces an architecture brief covering loop, tools, memory, guardrails and evals, routing depth to child skills. Not for workflow patterns (use ai-agentic-workflows).
AI Agent Core Loop
45j4flmao/agent-skills
Use when the user asks about the agent loop, ReAct vs plan-and-solve, re-planning, Reflexion, an agent stuck in a loop, max iterations or termination conditions. Produces a loop spec or patch with state, success predicate, caps and no-progress detection. Not for overall agent design (use ai-agent-architectures) or tool schemas (use tool-calling-principles).
Iot Protocols
45j4flmao/agent-skills
Use when the user asks about MQTT 5, QoS, retained messages, last will, CoAP, LwM2M, BLE GATT, LoRaWAN, Matter, Thread or device provisioning. Produces device-to-cloud protocol choice, topic design and TLS/DTLS security. Not for cloud stream processing (use data-streaming) or firmware drivers (use c-cpp-patterns).
Enterprise Compliance Audit
45j4flmao/agent-skills
Use when the user asks to prepare evidence for a SOC 2 audit, ISO 27001 certification, GDPR, HIPAA or PCI DSS compliance, control mapping, auditor requests or continuous compliance monitoring. Produces a control matrix, evidence plan and audit-readiness checklist. Not for vulnerability scanning (use dev-loop-security-auditor) or pentests (use pentesting).
Owasp Web Security
45j4flmao/agent-skills
Theoretical mechanics of critical web vulnerabilities, static analysis, and secure architecture remediation.
Browse the most popular Claude skills, all security skills, or write your own with the skills generator.