New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Set of security rules that guides code toward safe defaults across XSS, auth, CSP, and data handling.

skills.sh installs
298
GitHub stars
11
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers XSS and injection prevention, authentication and authorization, browser security APIs, data handling, and supply chain risk
  • Includes guidance to avoid dangerouslySetInnerHTML, prefer HTTP-only secure cookies over localStorage, and restrict scripts with CSP
  • Enforces server-side authorization, input validation at boundaries, and treating third-party packages as untrusted input
  • Designed for developers building web applications who want restrictive, secure-by-default choices when uncertain

Install

$ npx -y skills add academind/ai-config --skill web-security -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Web Security

We treat web security as a core requirement, not an afterthought. Assume hostile input and untrusted environments by default.

Core Principles

  • NEVER trust user input
  • ALWAYS validate and sanitize data at boundaries
  • Prefer secure defaults over configurability

XSS & Injection

  • AVOID dangerouslySetInnerHTML and raw HTML injection
  • Escape and encode dynamic content properly
  • Never interpolate untrusted data into HTML, CSS, or JS contexts
  • Ensure SQL injection protection

Authentication & Authorization

  • Do not store secrets or tokens in insecure locations
  • AVOID localStorage for sensitive credentials when possible
  • Use HTTP-only, secure cookies where applicable
  • Always enforce authorization on the server

Browser Security APIs

  • Respect CORS, CSP, and browser security boundaries
  • Use Content Security Policy to restrict script and resource execution
  • Avoid inline scripts and styles when CSP is enabled

Data Handling

  • Minimize data exposure
  • Do not log sensitive information

Dependencies & Supply Chain

  • Avoid unnecessary packages
  • Treat third-party code as untrusted input

General Principles

Details

Repository
github.com/academind/ai-config
Categories
Security, Frontend & UI Code
First seen
Jun 3, 2026

Similar to Web Security

More Security