security-patterns

security-patterns is a skill for Claude Code from mnthe/hardworker-marketplace. It costs 35 tokens per session (3,805 once invoked), scanned B, original, MIT.

A collection of secure coding guidance for authentication, user input, secrets, APIs, file uploads, and sensitive information, based partly on OWASP security risks.

In plain words
What is it for?
Use it while designing or reviewing features that accept input, handle accounts, expose endpoints, store secrets, or connect to outside services.
Why use it?
It helps developers avoid common weaknesses such as unauthorized access, injection attacks, and exposed credentials.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: positional $N argument.

Part of the ultrawork plugin — 15 skills, 9 commands shipped together

Good fit Use it while designing or reviewing features that accept input, handle accounts, expose endpoints, store secrets, or connect to outside services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mnthe/hardworker-marketplace/security-patterns
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 mnthe/hardworker-marketplace --skill security-patterns
Clone the repo
git clone --depth 1 https://github.com/mnthe/hardworker-marketplace

Made for: Claude Code.

Or install ultrawork, the plugin that ships this one along with the rest of its 15 skills, 9 commands.

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-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/mnthe/hardworker-marketplace/security-patterns/github.svg)](https://agentmods.dev/skills/mnthe/hardworker-marketplace/security-patterns)
Your own site
<a href="https://agentmods.dev/skills/mnthe/hardworker-marketplace/security-patterns"><img src="https://agentmods.dev/badge/skills/mnthe/hardworker-marketplace/security-patterns/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-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/mnthe/hardworker-marketplace/security-patterns"><img src="https://agentmods.dev/badge/skills/mnthe/hardworker-marketplace/security-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,805 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.00035 $0.03805
Opus 5.5 $0.00014 $0.01522
Sonnet 5.5 $0.00007 $0.00761
Haiku 4.5 $0.00003 $0.00380

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

Security

Grade B, and why

security-patterns scanned grade B with 2 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 3mo 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.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

// Vulnerable to: file.txt; rm -rf /

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

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

import { exec } from 'child_process'
plugins/ultrawork/skills/security-patterns/SKILL.md · 578 lines

How it starts

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

Security Patterns

Comprehensive security patterns and best practices for secure application development.

When to Use

  • Implementing authentication or authorization
  • Handling user input or file uploads
  • Working with secrets or environment variables
  • Creating API endpoints
  • Storing or transmitting sensitive data
  • Integrating third-party services

OWASP Top 10 Patterns

1. Broken Access Control

❌ WRONG: Missing Authorization
export async function DELETE(request: Request) {
  const { userId } = await request.json()

  // No authorization check - anyone can delete any user
  await db.users.delete({ where: { id: userId } })

  return NextResponse.json({ success: true })
}
✅ CORRECT: Proper Authorization
export async function DELETE(request: Request) {
  const session = await getSession(request)
  const { userId } = await request.json()

  // Check if user is authorized
  if (session.userId !== userId && session.role !== 'admin') {
    return NextResponse.json(
      { error: 'Unauthorized' },
      { status: 403 }
    )
  }

  await db.users.delete({ where: { id: userId } })
  return NextResponse.json({ success: true })
}

2. Cryptographic Failures

❌ WRONG: Hardcoded Secrets
const JWT_SECRET = "my-super-secret-key"
const API_KEY = "sk-proj-xxxxxxxxxxxxx"
const DATABASE_URL = "postgresql://user:password@localhost/db"
✅ CORRECT: Environment Variables
// .env.local (never commit this file)
JWT_SECRET=use-a-strong-randomly-generated-secret
OPENAI_API_KEY=sk-proj-xxxxxxxxxxxxx
DATABASE_URL=postgresql://user:password@host/db

// app code
const jwtSecret = process.env.JWT_SECRET
if (!jwtSecret) {
  throw new Error('JWT_SECRET environment variable not set')
}

const apiKey = process.env.OPENAI_API_KEY
if (!apiKey) {
  throw new Error('OPENAI_API_KEY not configured')
}

Verification Steps:

  • No secrets in source code
  • .env.local in .gitignore
  • Secrets validated at startup
  • Production secrets in hosting platform (Vercel, Railway)
  • No secrets in git history (git log --all --full-history --source -- .env*)

Read the full file on GitHub · 578 lines

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. 3mo ago First seen · 578 lines · 35 tokens per session scan B df97f3f6d4ea

Subscribe to this mod's changes

security-patterns is a skill published in the GitHub repository mnthe/hardworker-marketplace (4 stars, last pushed 7mo ago), licensed MIT. It adds 35 tokens to every session and 3,805 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 2 findings (recursive force delete, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

security-patterns compared with skills from other repositories

security-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
security-patternsmnthe/hardworker-marketplaceSkill47mo agoMITB35Claude Code
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15kyesterdayCC0-1.0A113Claude Code, Codex
systematic-debuggingobra/superpowersSkill331k4d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code