agentleFS
shreyam1008shreyam1008/shre-skills/skills/security/SKILL.md

security

Skill0 starsChanged 48 days agoMITView on GitHub

Reviews and implements web security boundaries, authorization, output encoding, session protection, and secret handling. Use for security-sensitive changes or a requested security review.

  • Reads credentials

We split this skill into the rules it gives an agent

9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 102 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Never put untrusted data into javascript:/data: URLs or DOM sink APIs without sanitizing.

    line 27
  2. Distinctive:

    Parameterized queries / prepared statements only: Never string-concatenate input into SQL or shell commands.

    line 33
  3. Distinctive:

    Use safe APIs over shelling out.

    line 34
  4. Distinctive:

    Use the framework's CSRF protection for cookie-authenticated state changes.

    line 39
  5. Distinctive:

    Don't roll your own crypto or auth — use a vetted provider/library.

    line 45
  6. Very specific:

    Use constant-time comparison for secrets/tokens/signatures.

    line 49
  7. Very specific:

    Never commit secrets, keys, tokens, .env, or DB URLs.

    line 53
  8. Distinctive:

    Never log secrets, bearer tokens, passwords, or full auth headers.

    line 54
  9. Distinctive:

    Verify integrity (lockfile, SRI for third-party scripts).

    line 65

“Common” is measured: kept by at least 6 in 10 of the 102 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Security

Security is a default posture, not a feature you add later. Two rules underpin everything:

  1. Never trust input — validate on the server, at the boundary, every time.
  2. Fail closed — on any doubt (auth, config, verification), deny.

Lean on your framework's built-in protections first; only hand-roll when you understand the gap.

Input validation

  • Validate on the server — client validation is UX, not security.
  • Allowlist, not denylist: accept known-good shapes (type, length, range, format, enum) and reject the rest. Use a schema validator (Zod, etc.).
  • Validate and normalize (canonicalize) before checks to defeat encoding tricks.
  • Bound everything: clamp numbers, cap string/array lengths, restrict file types/sizes.

Output encoding — stop XSS

  • Encode on output, contextually: HTML body, HTML attribute, JS, URL, and CSS each need different encoding.
  • In React/Vue/Angular, default text binding auto-escapes — the danger is the escape hatches: dangerouslySetInnerHTML, v-html, [innerHTML], eval, Function, injecting into <script>/<style>.
  • Never put untrusted data into javascript:/data: URLs or DOM sink APIs without sanitizing.
  • Sanitize rich/user HTML with a vetted library (DOMPurify) — don't regex it.
  • Defense in depth: a strict Content-Security-Policy (avoid unsafe-inline/unsafe-eval).

Injection (SQL/NoSQL/command/LDAP)

  • Parameterized queries / prepared statements only. Never string-concatenate input into SQL or shell commands.
  • Use safe APIs over shelling out; if you must, pass args as an array, never a constructed string.
  • Apply least-privilege DB accounts.

CSRF

  • Use the framework's CSRF protection for cookie-authenticated state changes. If implementing tokens, validate a secret, unpredictable token bound to the session; per-request tokens are an option, not a universal requirement.
  • Set cookies SameSite=Lax/Strict, Secure, HttpOnly.
  • Validate request origin where appropriate and configure CORS with explicit trusted origins. CORS is not CSRF protection: browsers can send some cross-origin requests even when scripts cannot read the response.

AuthN / AuthZ

  • Don't roll your own crypto or auth — use a vetted provider/library.
  • Passwords: use a maintained password-hashing implementation, preferably Argon2id (or scrypt where unavailable), with tuned work factors and per-user salt. Retain bcrypt for compatible legacy systems while accounting for its input-length limit. Never store plaintext or fast hashes.
  • Enforce authorization on every request server-side (object-level too — don't trust IDs from the client → IDOR).
  • Sessions: rotate on privilege change, expire, invalidate on logout; short-lived tokens + refresh.
  • Use constant-time comparison for secrets/tokens/signatures.

Secrets

  • Never commit secrets, keys, tokens, .env, or DB URLs. Keep them in a secret manager / platform env.
  • Never log secrets, bearer tokens, passwords, or full auth headers. Sanitize test fixtures.
  • Rotate on exposure; scope keys to least privilege.

Transport & headers

  • HTTPS everywhere; HSTS. Set Content-Security-Policy, X-Content-Type-Options: nosniff, Referrer-Policy, X-Frame-Options/frame-ancestors.
  • Validate redirect targets (no open redirects); validate outbound URLs to prevent SSRF (block internal ranges/metadata endpoints).

Dependencies & supply chain

  • Pin + lock versions; run npm audit/Dependabot/SCA; update knowingly.
  • Verify integrity (lockfile, SRI for third-party scripts); minimize third-party JS.

Review checklist

  • All external input validated server-side (allowlist) and bounded.
  • Output encoded for its context; no unsafe HTML sinks with raw input.
  • Parameterized queries everywhere; no shell string-building.
  • AuthZ enforced per request incl. object ownership.
  • CSRF protection + secure cookies on state-changing routes.
  • No secrets in code/logs/fixtures; constant-time secret compares.
  • Security headers + HTTPS/HSTS; redirects/outbound URLs validated.

Reference

  • OWASP: CSRF prevention, password storage, Input Validation, XSS Prevention, SQL Injection, Auth, Secrets Management.
  • MDN: CSP, SameSite cookies, Subresource Integrity.

Download now (ZIP)

  • Other versions123 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 123

    1. BuilderIO/agent-native★ 7.4ksame name
    2. parcadei/Continuous-Claude★ 3.9ksame name
    3. parcadei/Continuous-Claude-v2★ 3.9ksame name
    4. parcadei/Continuous-Claude-v3★ 3.9ksame name
    5. gridaco/grida★ 2.7ksame name
    6. static-web-server/static-web-server★ 2.4ksame name
    7. BankrBot/skills★ 1.2ksame name
    8. BankrBot/openclaw-skills★ 1.2ksame name
    9. alinaqi/maggy★ 711same name
    10. alinaqi/claude-bootstrap★ 708same name

    113 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use cost-reducer, scalability and 4 more.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • huyvpSkill

      cost-reducer

      Reduce cloud, infrastructure, and operational costs while maintaining performance. Use when writing database queries, configuring cloud resources, optimizing bundles, setting up caching, choosing between services, sizing instances, configuring CDN, managing storage, or reviewing code for cost inefficiencies. Covers AWS/GCP/Vercel pricing, database optimization, serverless tuning, image pipelines, observability costs, and FinOps practices.

      Also in 12 projects that use this

    • ffsshhttiikkSkill

      scalability

      Core foundational concepts and principles for Scalability

      Also in 11 projects that use this

    • xfstudioSkill

      trigger-dev

      Trigger.dev expert for background jobs, AI workflows, and reliable async execution with excellent developer experience and TypeScript-first design. Use when: trigger.dev, trigger dev, background task, ai background job, long running task.

      Also in 11 projects that use this

    • xfstudioSkill

      customer-support

      Elite AI-powered customer support specialist mastering

      Also in 12 projects that use this

    • h-mascotSkill

      self-healing

      Wrap long-running or fragile OpenClaw work in checkpointed retries, watchdogs, fallback models, and proof-of-completion so failed subagents can resume instead of silently dying.

      Also in 12 projects that use this

    • parcadeiSkill

      agent-context-isolation

      Agent Context Isolation

      Also in 3 projects that use this

  • In this repository21 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.