Individual skill
client-side-security
Apply when reviewing or writing browser-facing code that handles user input, renders HTML, sets cookies, or loads third-party scripts. Covers XSS, CSRF, CSP, clickjacking, XS-Leaks, and HTTP security headers.
skills/client-side-security/SKILL.md
Source commit 7d11c4a8aa4be142a6ea4792604f8a7b39f0d789
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- Yes
- Observed behavior
- Instructions only
- Last checked
- Nov 6, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 15
- Repository last updated
- Aug 24, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- agentic-development Repository topic
- agentic-workflows Repository topic
- ai-agents Repository topic
- claude Repository topic
- claude-code Repository topic
- claude-skills Repository topic
- writing Derived category
- security Derived category
- security-application Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 5,834 bytes
Read excerpt
# Client-Side Web Security
Protect browser clients against code injection, request forgery, UI redress, cross-site leaks, and unsafe third-party scripts with layered, context-aware controls.
## XSS Prevention (Context-Aware)
- **HTML context**: prefer `textContent`. If HTML is required, sanitize with a vetted library (e.g., DOMPurify) and strict allow-lists.
- **Attribute context**: always quote attributes and encode values.
- **JavaScript context**: do not build JS from untrusted strings; avoid inline event handlers; use `addEventListener`.
- **URL context**: validate protocol/domain and encode; block `javascript:` and data URLs where inappropriate.
- **Redirects/forwards**: never use user input directly for destinations; use server-side mapping (ID to URL) or validate against trusted domain allow-lists.
- **CSS context**: allow-list values; never inject raw style text from users.
Example sanitization: