Agent skill

Security Threat Model

by majiayu000 in majiayu000/spellbook

Threat-model product features, APIs, data flows, secrets, permissions, supply-chain changes, auth boundaries, and risky code paths before or during implementation.

MITAuto-check passedBackend & APIs

Install Security Threat Model

skills CLI
$ npx skills add majiayu000/spellbook --skill security-threat-model -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/spellbook security-threat-model --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/security-threat-model .claude/skills/security-threat-model && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
security-threat-model
GitHub stars
287
Token cost
~561 tokens
SKILL.md length
218 words
Files
2
Skills in repo
97
Repo updated
First seen
Licence
MIT

At a glance

Threat-model product features, APIs, data flows, secrets, permissions, supply-chain changes, auth boundaries, and risky code paths before or during implementation.

  • Works in 5 steps: Assets: credentials, tokens, user data,… → Actors: anonymous user, authenticated… → Trust boundaries: browser/server,… → …
  • Touching authentication
  • SKILL.md covers Purpose, Scope First, Threat Checklist and Required Controls, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Security Threat Model is an agent skill from majiayu000/spellbook. Threat-model product features, APIs, data flows, secrets, permissions, supply-chain changes, auth boundaries, and risky code paths before or during implementation. Use when touching authentication, authorization, payments, secrets, user data, uploads, webhooks, admin tools, innerHTML/eval/exec, dependency upgrades, or cross-tenant access.

Its SKILL.md is about 560 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Backend & APIs, covering Threat modeling, Webhooks and Supply chain security. The repository describes itself as: Cross-runtime skills for Claude Code, Codex, and multi-agent workflows. The licence is MIT.

When your agent uses it

  • Touching authentication
  • InnerHTML/eval/exec
  • Dependency upgrades
  • Cross-tenant access

Example prompts

  • “/security-threat-model”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Assets: credentials, tokens, user data, tenant data, money movement, admin actions.
  2. Actors: anonymous user, authenticated user, tenant admin, internal operator, compromised dependency.
  3. Trust boundaries: browser/server, service/service, tenant/tenant, CI/runtime, third-party callbacks.
  4. Entry points: API routes, CLI commands, jobs, webhooks, uploads, config files.
  5. Existing controls: validation, authz, rate limits, audit logs, secret storage.

What it can do on your machine

Read from SKILL.md and the folder at commit ed52af7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Security Threat Model loads about 561 tokens when it runs. Until then it costs about 91 tokens; SKILL.md has 218 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~561

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from majiayu000/spellbook at commit ed52af7, republished under its MIT licence (© majiayu000). 218 words, ~561 tokens.

Download SKILL.mdSave it as .claude/skills/security-threat-model/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
security-threat-model
description
Threat-model product features, APIs, data flows, secrets, permissions, supply-chain changes, auth boundaries, and risky code paths before or during implementation. Use when touching authentication, authorization, payments, secrets, user data, uploads, webhooks, admin tools, innerHTML/eval/exec, dependency upgrades, or cross-tenant access.

Security Threat Model

Purpose

Use this skill before implementing or approving security-sensitive changes. It complements auth-security and server-security by mapping assets, attackers, trust boundaries, and concrete controls.

Scope First

Identify:

  1. Assets: credentials, tokens, user data, tenant data, money movement, admin actions.
  2. Actors: anonymous user, authenticated user, tenant admin, internal operator, compromised dependency.
  3. Trust boundaries: browser/server, service/service, tenant/tenant, CI/runtime, third-party callbacks.
  4. Entry points: API routes, CLI commands, jobs, webhooks, uploads, config files.
  5. Existing controls: validation, authz, rate limits, audit logs, secret storage.

Threat Checklist

Check at least:

  • Spoofing: can an identity, tenant, callback, or service be forged?
  • Tampering: can payloads, configs, migrations, artifacts, or logs be altered?
  • Repudiation: is there an audit trail for sensitive actions?
  • Information disclosure: can secrets, PII, logs, or tenant data leak?
  • Denial of service: can expensive paths be amplified?
  • Elevation of privilege: can user or service permissions expand?
  • Supply chain: can dependencies, scripts, CI, or generated files introduce risk?

Required Controls

Every finding needs one of:

  • preventive control in production code,
  • detective control with alerting,
  • compensating manual control with owner and expiry,
  • explicit accepted risk with rationale.

Do not accept "warn and continue" for authz, secrets, tenant isolation, injection, or payment/security-critical failures.

Output Shape

text
scope:
assets:
trust_boundaries:
entry_points:
threats:
required_controls:
tests_or_probes:
residual_risks:
review_gate:

For implementation work, include exact files and verification commands that prove the controls are active.

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/security-threat-model of majiayu000/spellbook.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit ed52af7

Compare with similar skills

Security Threat Model next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Security Threat Model compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Security Threat Model this skillmajiayu000/spellbook287—~561Automated safety check: PassMIT
Sec Checkwaynesutton/markdown-site627—~753Automated safety check: PassMIT
Security Threat Modelingdevcodex-labs/devcodex439—~771Automated safety check: PassAGPL-3.0
Securitytelagod/code-abyss244—~907Automated safety check: PassMIT
Clickup Security Basicsjeremylongshore/tons-of-skills-marketplace2.8k—~1kAutomated safety check: PassMIT
Flexport Security Basicsjeremylongshore/tons-of-skills-marketplace2.8k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Sec Check

    waynesutton/markdown-site

    Security review checklist for Convex functions, auth logic, public queries, admin routes, webhooks, uploads, and AI-generated code.

    627 GitHub stars~753 tokensUpdated 4 mo ago
    Backend & APIsAuto-check passed
  • Security Threat Modeling

    devcodex-labs/devcodex

    安全威胁建模专家 Owner — 当任务涉及权限、认证、授权、输入输出信任边界、密钥策略、审计、攻击面、Webhook/OAuth、敏感操作或用户要求安全专家视角时使用;要求识别滥用路径并绑定缓解验证。

    439 GitHub stars~771 tokensUpdated 24 days ago
    Backend & APIsAuto-check passed
  • Security

    telagod/code-abyss

    Defensive security engineering judgment, distilled from a stronger model - invoke when THREAT MODELING a system or feature; making security-relevant design decisions (auth, crypto, trust boundaries…

    244 GitHub stars~907 tokensUpdated 2 mo ago
    SecurityAuto-check passed
  • Clickup Security Basics

    jeremylongshore/tons-of-skills-marketplace

    Harden ClickUp credentials, OAuth callbacks, Workspace boundaries, webhooks, logging, and incident response with least-privilege controls.

    2.8k GitHub stars~1k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Flexport Security Basics

    jeremylongshore/tons-of-skills-marketplace

    Analyze and harden Flexport credentials, tokens, webhook verification, data exposure, and mutation controls.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Ideogram Security Basics

    jeremylongshore/tons-of-skills-marketplace

    Harden an Ideogram integration across credentials, untrusted media, content safety, copyright controls, storage, and tenant authorization.

    2.8k GitHub stars~1.2k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from majiayu000/spellbook

All 97 skills in this repo
  • Skill Ecosystem Doctor

    majiayu000/spellbook

    Audits and repairs how coding-agent Skills are owned, copied and exposed across runtimes, from canonical sources to quarantine and retirement.

    287 GitHub stars~3k tokensUpdated 2 days ago
    Auto-check passed
  • AGENTS.md Scaffold

    majiayu000/spellbook

    Scans a repository for real evidence and proposes, or on request writes, a small stack of root and scoped AGENTS.md files with validation commands and generated-file boundaries.

    287 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Product Demo Builder

    majiayu000/spellbook

    Plans, produces or diagnoses evidence-backed product demo videos: script, capture plan, pacing checks and verified final media built on real product behavior.

    287 GitHub stars~3.3k tokensUpdated 2 days ago
    Auto-check passed
  • Flowguard Task Guard

    majiayu000/spellbook

    Single entry point that routes long or ambiguous agent tasks, checks live state, bounds autonomous loops and leaves a resumable handoff.

    287 GitHub stars~2.1k tokensUpdated 2 days ago
    Auto-check passed
  • npm Supply Chain Check

    majiayu000/spellbook

    Scans a repository, its lockfiles and node_modules for known malicious npm package versions and install-time indicators, using a read-only Python scanner.

    287 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Product Manager Toolkit

    majiayu000/spellbook

    Product management helpers: a RICE scoring script, an interview transcript analyzer and PRD templates for prioritizing features, synthesizing research and writing requirements.

    287 GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed

Questions about Security Threat Model

What does Security Threat Model do?

Threat-model product features, APIs, data flows, secrets, permissions, supply-chain changes, auth boundaries, and risky code paths before or during implementation. Security Threat Model is an agent skill from majiayu000/spellbook. Threat-model product features, APIs, data flows, secrets, permissions, supply-chain changes, auth boundaries, and risky code paths before or during implementation.

When should I use Security Threat Model?

Security Threat Model fits situations like: touching authentication; innerHTML/eval/exec; dependency upgrades; cross-tenant access.

How do I install Security Threat Model in Claude Code?

Run `npx skills add majiayu000/spellbook --skill security-threat-model -a claude-code`. Or copy the skill folder (skills/security-threat-model in majiayu000/spellbook) into .claude/skills/security-threat-model in your project. Claude Code loads it when a task matches its description.

How do I install Security Threat Model in Codex?

Run `npx skills add majiayu000/spellbook --skill security-threat-model -a codex`. Or copy the skill folder (skills/security-threat-model in majiayu000/spellbook) into .agents/skills/security-threat-model in your project. Codex loads it when a task matches its description.

Can I use Security Threat Model in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/spellbook --skill security-threat-model -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/security-threat-model, .gemini/skills/security-threat-model, .github/skills/security-threat-model and .opencode/skills/security-threat-model in your project.

What does Security Threat Model need to run?

SKILL.md names no scripts, command-line tools or credentials: Security Threat Model is instructions for the agent only.

Does Security Threat Model access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Security Threat Model safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Security Threat Model use?

Security Threat Model is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Security Threat Model use?

About 561 tokens (SKILL.md is roughly 2.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Security Threat Model?

Skills that share tags, products or a category with Security Threat Model: Sec Check (waynesutton/markdown-site, 627 stars), Security Threat Modeling (devcodex-labs/devcodex, 439 stars), Security (telagod/code-abyss, 244 stars) and Clickup Security Basics (jeremylongshore/tons-of-skills-marketplace, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Security Threat Model?

majiayu000 (a GitHub user) maintains it in majiayu000/spellbook, which has 287 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on October 8, 2026.

Source: majiayu000/spellbook on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.