security-and-hardening

security-and-hardening is a skill for Claude Code, Cursor from mamahoos/dot-files. It costs 116 tokens per session (3,882 once invoked), scanned B, a copy of security-and-hardening, MIT.

A security guide for software that accepts outside data, manages accounts, stores sensitive information, or connects to other services. It treats inputs as untrusted and requires deliberate checks around access and secrets.

In plain words
What is it for?
Use it to threat-model and harden features involving user input, login sessions, file uploads, webhooks, external APIs, payments, or personal data.
Why use it?
It helps expose and reduce vulnerabilities before attackers can exploit weak input handling, authentication, authorization, or data protection.

Skill for Claude CodeCursor

Written for Claude Code and Cursor: disable-model-invocation in frontmatter, but also installed under .cursor/.

Good fit Use it to threat-model and harden features involving user input, login sessions, file uploads, webhooks, external APIs, payments, or personal data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mamahoos/dot-files/security-and-hardening
Install

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.

Any agent
npx skills add mamahoos/dot-files --skill security-and-hardening
Clone the repo
git clone --depth 1 https://github.com/mamahoos/dot-files

Made for: Claude Code, Cursor.

Wrote 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.

agentmods badge for security-and-hardening

README.md
[![agentmods](https://agentmods.dev/badge/skills/mamahoos/dot-files/security-and-hardening/github.svg)](https://agentmods.dev/skills/mamahoos/dot-files/security-and-hardening)
Your own site
<a href="https://agentmods.dev/skills/mamahoos/dot-files/security-and-hardening"><img src="https://agentmods.dev/badge/skills/mamahoos/dot-files/security-and-hardening/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for security-and-hardening

Your own site · 80×15
<a href="https://agentmods.dev/skills/mamahoos/dot-files/security-and-hardening"><img src="https://agentmods.dev/badge/skills/mamahoos/dot-files/security-and-hardening.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,882 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00116 $0.03882
Opus 5.5 $0.00046 $0.01553
Sonnet 5.5 $0.00023 $0.00776
Haiku 4.5 $0.00012 $0.00388

Measured 3d ago against content hash 23b816fa1dfa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

security-and-hardening scanned grade B with 1 finding 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 3d 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.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

Any URL the user influences — webhooks, import-from-URL, image proxies, link previews — can be aimed at internal services. Allowlist scheme and host, resolve **all** DNS records and reject any private or reserved address

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Origin

This is a copy

100% identical to security-and-hardening — 1 line differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

home/.cursor/skills/security-and-hardening/SKILL.md · 218 lines

How it starts

The opening of the file, as written. The whole thing — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security and Hardening

Overview

Security-first development practices for web applications. Treat every external input as hostile, every secret as sacred, and every authorization check as mandatory. Security isn't a phase — it's a constraint on every line of code that touches user data, authentication, or external systems.

When to Use

  • Building anything that accepts user input
  • Implementing authentication or authorization
  • Storing or transmitting sensitive data
  • Integrating with external APIs or services
  • Adding file uploads, webhooks, or callbacks
  • Handling payment or PII data

Process: Threat Model First

Controls bolted on without a threat model are guesses. Before hardening, spend five minutes thinking like an attacker:

  1. Map the trust boundaries. Where does untrusted data cross into your system? HTTP requests, form fields, file uploads, webhooks, third-party APIs, message queues, and LLM output — plus the local values that look internal because the OS handed them to you: another process's command line or environment, filenames on a shared volume, a path in a job payload. Trust follows who wrote a value, not which channel delivered it. Every boundary is attack surface.
  2. Name the assets. What's worth stealing or breaking? Credentials, PII, payment data, admin actions, money movement.
  3. Run STRIDE over each boundary — a quick lens, not a ceremony:
Threat Ask Typical mitigation
Spoofing Can someone impersonate a user/service? Authentication, signature verification
Tampering Can data be altered in transit or at rest? Integrity checks, parameterized queries, HTTPS
Repudiation Can an action be denied later? Audit logging of security events
Information disclosure Can data leak? Encryption, field allowlists, generic errors
Denial of service Can it be overwhelmed? Rate limiting, input size caps, timeouts
Elevation of privilege Can a user gain rights they shouldn't? Authorization checks, least privilege

Read the full file on GitHub · 218 lines

Files

What ships with it

2 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.

Changes

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.

  1. 3d ago Changed 23b816fa1dfa
  2. 13d ago Changed 1c7bdbed0a42
  3. 26d ago Changed · +3 tokens per session 8fc67f63ccd6
  4. 2mo ago Changed 5bd6b747944b
  5. 2mo ago Changed · -308 lines 3704d5afbf80
  6. 2mo ago Changed · +23 tokens per session c2129d14d7aa
  7. 2mo ago Changed · +11 lines e22bb1eb27ad
  8. 2mo ago Changed · +14 lines · +25 tokens per session 9c11cdd59cf6
  9. 3mo ago First seen · 501 lines · 65 tokens per session scan B 16722c4b5226

Subscribe to this mod's changes

security-and-hardening is a skill published in the GitHub repository mamahoos/dot-files (6 stars, last pushed yesterday), licensed MIT. It adds 116 tokens to every session and 3,882 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it B with 1 finding (cloud metadata endpoint). It is 100% identical to security-and-hardening, differing in 1 line, and is treated as a copy.

Related

security-and-hardening compared with skills from other repositories

security-and-hardening next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
security-and-hardeningmamahoos/dot-filesSkill6yesterdayMITB116Claude Code, Cursor
golang-stylefredrikaverpil/dotfilesSkill261todayMITA23Claude Code
github-reposfredrikaverpil/dotfilesSkill261todayMITA27Claude Code
gh-clifredrikaverpil/dotfilesSkill261todayMITA46Claude Code
gh-prfredrikaverpil/dotfilesSkill261todayMITA39Claude Code
plan-loopfredrikaverpil/dotfilesSkill261todayMITA52Claude Code
mbo-plansfc-gh-eraigosa/dotfilesSkill57todayApache-2.0A260Claude Code, Codex