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.
npx agentmods add skills/shieldnet-360/secure-vibe/frontend-securitynpx skills add ShieldNet-360/secure-vibe --skill frontend-securitygit clone --depth 1 https://github.com/ShieldNet-360/secure-vibeWrote 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.
[](https://agentmods.dev/skills/shieldnet-360/secure-vibe/frontend-security)<a href="https://agentmods.dev/skills/shieldnet-360/secure-vibe/frontend-security"><img src="https://agentmods.dev/badge/skills/shieldnet-360/secure-vibe/frontend-security.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00086 | $0.02364 |
| Opus 5 | $0.00043 | $0.01182 |
| Sonnet 5 | $0.00017 | $0.00473 |
| Haiku 4.5 | $0.00009 | $0.00236 |
Grade A, and why
frontend-security 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Frontend Security
Rules (for AI agents)
ALWAYS
- Render untrusted data through the framework's ordinary text interpolation, which escapes for the output context. Do not reach for a raw-HTML API merely to display user data. Where rich HTML genuinely must be rendered, put it through a maintained sanitizer (DOMPurify) with an explicit allowlist first.
- Validate URL-bearing attributes per sink, not against one global scheme list. A
navigation target (
href,action,formaction, an<iframe src>) and an image source do not share a trust model:javascript:is never acceptable anywhere, while a narrowly constraineddata:image/…orblob:may be exactly what an image sink requires. Decide the permitted schemes for each sink and check against that list. - Read security-sensitive configuration and control-flow values from lexical variables
or an object you own — never from a named
window/documentproperty (window.config,document.redirectTo, an implicit global). The browser exposes elements byidandnameas named properties, so injected markup can shadow the value your code expected. An explicitgetElementById()lookup is not the problem; trusting an ambient global is. Type-check what you read before using it in a privileged way. - Build the
Content-Security-Policyaround a nonce or hash as the trust root:script-src 'nonce-{value}' 'strict-dynamic'; object-src 'none'; base-uri 'none'. Keeping'self'beside the nonce means every same-origin script is still trusted — that is a host-allowlist policy wearing a nonce, which may be the right trade-off but is not a strict CSP, so do not call it one. Generate the nonce from a CSPRNG afresh for every HTML response, and apply it only to scripts the server itself authorizes. - Where you deploy Trusted Types, enforce
require-trusted-types-for 'script'and restrict which policies may exist with thetrusted-typesdirective. The first makes DOM sinks demand a typed value; without the second, any code can mint a pass-through policy (createHTML: s => s) and the guarantee is gone. Keep policies few, named, and centrally reviewed. - Load third-party scripts and stylesheets from version-pinned, immutable URLs
with
integrity="sha384-…"andcrossorigin="anonymous". A hash pinned against a mutable URL breaks the page the first time the provider ships a legitimate update, which is how integrity checks come to be quietly deleted. If a provider cannot offer stable bytes with CORS, self-host rather than drop SRI. - Sandbox every
<iframe>, starting from no capability tokens and adding only what the embedded content needs. Do not combineallow-scriptswithallow-same-origin: together they let the framed document reach the parent and remove its ownsandboxattribute, so the sandbox stops meaning anything. If the content genuinely needs both, isolate it on a separate origin instead. - On
postMessage, name an explicittargetOriginwhen sending — never*— and on receipt verifyevent.originagainst an allowlist, validate the message's shape before reading any field, and where the channel expects one particular frame, checkevent.sourceas well. Origin, schema and sender are three separate checks. - Set
X-Content-Type-Options: nosniff,Referrer-Policy: strict-origin-when-cross-originor stricter,Permissions-Policydropping unused features, andCross-Origin-Opener-Policy: same-originto sever the opener relationship at the document level. Remove framework version banners here too (X-Powered-By, a detailedServer). Note thatno-referrer-when-downgradeis weaker than the current browser default — configuring it is a step backwards. - Send HSTS on production HTTPS. Add
includeSubDomainsonly after confirming every subdomain serves HTTPS, andpreloadonly as a deliberate, hard-to-reverse commitment for the registrable domain: the token makes a domain eligible for the preload list, it does not enrol it, and reversing it is slow. - Keep authentication secrets out of JavaScript-readable storage — no access tokens,
refresh tokens, JWTs, or sensitive personal or business data in
localStorageorsessionStorage, where a single XSS reads all of it — and clear authenticated client-side state on logout. Server-issued session cookies are the alternative:Secure,HttpOnly, an application-appropriateSameSite, and the__Host-prefix for host-only cookies atPath=/.auth-securityowns issuing them; this rule exists so a frontend review recognises an auth value that has escaped into JavaScript's reach.
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago First seen · 157 lines · 86 tokens per session scan A 333ca258e51f
frontend-security is a skill published in the GitHub repository ShieldNet-360/secure-vibe (22 stars, last pushed 22d ago), licensed MIT. It adds 86 tokens to every session and 2,364 once invoked, about $0.0004 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-30.
Other skills, from other repositories
documenter-vitepress
Use when setting up or developing a Julia based documentation site with DocumenterVitepress.jl. Also use when the user mentions DocumenterVitepress, VitePress for Julia docs, or wants to preview docs locally with hot reload.
agent-teacher
Teach a concept through a runnable code example plus a structured walkthrough, instead of a wall of definitions. Trigger whenever the user wants to understand a technical concept — phrases like "解释一下 X / X 是什么 / 教我 X / X 怎么工作 / 这个 X 是啥 / 我不太懂 X", or "explain X / what is X / teach me X / how does X work / help me…
offensive-crypto-attacks
Systematic methodology for identifying and exploiting cryptographic implementation weaknesses in real-world applications. Covers padding oracle attacks against CBC-mode ciphers with PKCS7 padding (Vaudenay's original attack through modern padbuster automation), ECB mode exploitation including block cut-and-paste and…
offensive-parameter-pollution
HTTP parameter pollution (HPP) checklist: duplicate parameter injection, backend vs frontend parsing differences, WAF bypass via HPP, server-side vs client-side HPP, and practical exploitation patterns. Use when testing web applications for parameter handling flaws.
offensive-z-wave
Z-Wave attack methodology — sniffing with Z-Force / EZ-Wave / RTL-SDR + ZniffMobile, S0 (legacy) network-key derivation flaw and key reuse, S2 (modern) ECDH commissioning analysis, replay/injection on unauthenticated nodes, default-key brute-force on test deployments, and home-automation hub pivots. Use when targeting…
seo
Optimize for search engine visibility and ranking. Use when asked to "improve SEO", "optimize for search", "fix meta tags", "add structured data", "sitemap optimization", or "search engine optimization".