dev-security-patterns

dev-security-patterns is a skill for Claude Code from joaoguirunas/team-os. It costs 68 tokens per session (3,195 once invoked), scanned A, original, MIT.

A set of software security patterns covering login, permissions, database row-level security, input checks, secret storage, and the OWASP Top 10 list of common web risks.

In plain words
What is it for?
It is for designing authentication and authorization, protecting database rows, validating user input, managing secrets, and checking for common web vulnerabilities.
Why use it?
It helps prevent common security mistakes when building complex software and handling sensitive data.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit It is for designing authentication and authorization, protecting database rows, validating user input, managing secrets, and checking for common web vulnerabilities.

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

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/joaoguirunas/team-os/dev-security-patterns"><img src="https://agentmods.dev/badge/skills/joaoguirunas/team-os/dev-security-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,195 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00068 $0.03195
Opus 5.5 $0.00027 $0.01278
Sonnet 5.5 $0.00014 $0.00639
Haiku 4.5 $0.00007 $0.00319

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

Security

Grade A, and why

dev-security-patterns scanned grade A with 0 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 16d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/dev-security-patterns/SKILL.md · 241 lines

How it starts

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

Security Patterns — Software Complexo

JWT — Autenticação

// Geração
const accessToken = jwt.sign(
  { userId: user.id, role: user.role },
  process.env.JWT_SECRET!,
  { expiresIn: '15m' }   // curto
)
const refreshToken = jwt.sign(
  { userId: user.id },
  process.env.JWT_REFRESH_SECRET!,
  { expiresIn: '7d' }
)

// Validação em middleware
const verifyToken = (req, res, next) => {
  const token = req.headers.authorization?.split(' ')[1]
  if (!token) return res.status(401).json({ error: { code: 'UNAUTHORIZED', requestId: req.requestId } })
  try {
    req.user = jwt.verify(token, process.env.JWT_SECRET!)
    next()
  } catch {
    return res.status(401).json({ error: { code: 'UNAUTHORIZED', requestId: req.requestId } })
  }
}

Regras: Access token 15min. Refresh token 7 dias com rotação. Nunca localStorage — usar httpOnly cookie. Secret mínimo 256 bits.

Autorização — RBAC

const requireRole = (...roles: string[]) => (req, res, next) => {
  if (!roles.includes(req.user.role)) {
    return res.status(403).json({ error: { code: 'FORBIDDEN', requestId: req.requestId } })
  }
  next()
}

// Uso
router.delete('/users/:id', verifyToken, requireRole('admin'), deleteUser)

Row Level Security (RLS — Supabase/Postgres)

-- Habilitar RLS
ALTER TABLE orders ENABLE ROW LEVEL SECURITY;

-- Usuário vê apenas seus dados
CREATE POLICY "user_own_orders" ON orders
  FOR ALL USING (auth.uid() = user_id);

-- Admin vê tudo — papel vem de app_metadata (só o servidor escreve)
CREATE POLICY "admin_all_orders" ON orders
  FOR ALL USING ((auth.jwt() -> 'app_metadata' ->> 'role') = 'admin');

RLS é a última linha de defesa — aplicar em todas as tabelas com dados de usuário.

  • auth.jwt() ->> 'role' (claim de topo) é o papel do Postgres (authenticated/anon), não o papel da aplicação — política escrita assim nunca casa.
  • Nunca autorizar por user_metadata (raw_user_meta_data): o próprio usuário edita esse campo pela API de auth e se dá qualquer papel. Papel de aplicação mora em app_metadata ou numa tabela de papéis.
  • "RLS ativo" não prova nada: RLS ligado sem policy nega tudo; RLS com USING (true) libera tudo. Leia a policy.
  • Bucket do Storage é tabela também (storage.objects) — USING (true) ali expõe todos os arquivos.

Read the full file on GitHub · 241 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. 16d ago Changed · +63 lines · +32 tokens per session 35c03207436e
  2. 27d ago Changed 7b766e47d107
  3. 1mo ago First seen · 178 lines · 36 tokens per session scan A a58028daceb7

Subscribe to this mod's changes

dev-security-patterns is a skill published in the GitHub repository joaoguirunas/team-os (5 stars, last pushed 3d ago), licensed MIT. It adds 68 tokens to every session and 3,195 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

analytics-strategy

Design measurement frameworks including event taxonomy, KPI hierarchy, dashboard architecture, attribution models, and analytics implementation strategy. Use this skill whenever the user wants to plan analytics, design dashboards, build event taxonomies, define KPIs, set up tracking, or audit existing measurement.…

rampstackco/claude-skills · 126 tokens

review-work

Post-implementation gate review: run manual QA on the real surface yourself, then launch ONE gate reviewer (never a panel) to audit goal, constraints, code quality, security, missed context, and QA evidence. Use before a PR handoff or when the user explicitly asks to review completed work.

code-yeongyu/oh-my-openagent · 63 tokens

jtbd-framing

The Jobs-to-be-Done framework as applied product methodology. Job statements, struggling moments, hire and fire criteria, the difference between feature-thinking and job-thinking. Honest about where JTBD adds clarity (discovery, prioritization, positioning) and where it becomes performative ritual (job-statement…

rampstackco/claude-skills · 164 tokens

jev-integrate

Wire a System One model (Jev, or an open reproduction like Von) into a product feature — routing, guardrails, scoring, classification. Use when replacing an LLM call that returns a label rather than prose, when adding a typed decision to an agent loop, or when deciding between the hosted Jev API and a local open…

OneWave-AI/claude-skills · 98 tokens

mcp-server-builder

Use to build, wire up, or debug an MCP (Model Context Protocol) server that gives Claude access to an internal API, database, or SaaS tool. Trigger when the user wants Claude to connect to their own system, asks for an MCP server, needs custom tools for Claude Code or the Claude app, or an existing server's tools are…

OneWave-AI/claude-skills · 79 tokens

email-template-generator

Generate professional email templates for various business scenarios including sales outreach, customer support, internal communications, follow-ups, and apologies. Creates personalized, tone-appropriate templates with subject lines and formatting. Use when users need to write business emails, cold outreach, or…

OneWave-AI/claude-skills · 57 tokens