Agent skill

Security Threat Modeling

by devcodex-labs in devcodex-labs/devcodex

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

AGPL-3.0Auto-check passedSecurity

Install Security Threat Modeling

skills CLI
$ npx skills add devcodex-labs/devcodex --skill security-threat-modeling -a claude-code

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

GitHub CLI
$ gh skill install devcodex-labs/devcodex security-threat-modeling --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/devcodex-labs/devcodex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/content/skills/security-threat-modeling .claude/skills/security-threat-modeling && 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-modeling
GitHub stars
439
Token cost
~771 tokens
SKILL.md length
124 words
Files
2
Skills in repo
70
Repo updated
First seen
Licence
AGPL-3.0

At a glance

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

  • Works in 6 steps: 画出信任边界和资产:用户、系统、外部 provider、数据、密钥、文件。 → 枚举威胁场景:越权、重放、注入、伪造、泄漏、误操作、审计缺失。 → 设计权限和输入输出校验边界,不重复框架已承担的能力。 → …
  • Tasks that involve Threat modeling
  • SKILL.md covers 定位, 触发条件, 核心门禁 and 执行步骤, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

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

Its SKILL.md is about 770 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `intent.json`).

It sits in Security, covering Threat modeling, Webhooks and OAuth and OpenID Connect. The repository describes itself as: Intent-driven AI coding workflow runtime for consistent context, skills, approvals, validation, and handoffs across six AI coding hosts. The licence is AGPL-3.0.

When your agent uses it

  • Tasks that involve Threat modeling
  • Tasks that involve Webhooks
  • Tasks that involve OAuth and OpenID Connect

Example prompts

  • “/security-threat-modeling”

Workflow steps

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

  1. 画出信任边界和资产:用户、系统、外部 provider、数据、密钥、文件。
  2. 枚举威胁场景:越权、重放、注入、伪造、泄漏、误操作、审计缺失。
  3. 设计权限和输入输出校验边界,不重复框架已承担的能力。
  4. 按 S02 判断密钥和明文策略,不主动引入 env/secretRef。
  5. 为每项缓解绑定测试、日志、审计或人工证据。
  6. 授权本地安全审查执行可见层/隔离探针分离;发生安全提示时写 SafetyInterruptionCard 并从最近有效检查点恢复。

What it can do on your machine

Read from SKILL.md and the folder at commit 1dd4525. 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 (its code samples are markdown).

    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 Modeling loads about 771 tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 124 words of instructions outside code blocks.

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

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 devcodex-labs/devcodex at commit 1dd4525, republished under its AGPL-3.0 licence (© devcodex-labs). 124 words, ~771 tokens.

Download SKILL.mdSave it as .claude/skills/security-threat-modeling/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
security-threat-modeling
description
安全威胁建模专家 Owner — 当任务涉及权限、认证、授权、输入输出信任边界、密钥策略、审计、攻击面、Webhook/OAuth、敏感操作或用户要求安全专家视角时使用;要求识别滥用路径并绑定缓解验证。

Security Threat Modeling Skill

定位

本 Skill 负责安全威胁建模 Owner 视角。它不默认改变 S02 用户策略,而是把信任边界、滥用路径、权限、审计和缓解验证说清楚。

触发条件

场景是否触发
认证、授权、权限、敏感操作、输入输出信任边界、审计、密钥策略必须
OAuth、Webhook、外部集成、admin、脚本执行、文件系统、数据库写入、发布凭据必须
复审发现权限绕过、越权、注入、重放、审计缺失或风险误判必须
纯文案或无安全边界变化N/A + skipReason

核心门禁

Gate要求证据
SecurityThreatModelingGate信任边界、威胁场景、权限滥用、密钥策略、审计和缓解验证必须成矩阵trustBoundary、threatScenario
TrustBoundaryGate输入、输出、调用方、外部系统和持久化边界必须明确trustBoundary
PermissionAbuseCaseGate权限滥用、越权、绕过和敏感操作必须有负向样例permissionAbuseCase
SecretPolicyRespectGate必须遵循 S02 用户 / 项目策略,不得自行加严secretPolicy
AuditMitigationGate缓解措施必须有日志、审计或测试证据auditLogging、mitigationVerification
AuthorizedLocalSecurityAuditPresentationGate用户自有/明确授权的本地安全审查也要分离“真实本地探针”与“用户可见呈现”;明确防御目标、最小必要证据和中断恢复,不得宣称绕过宿主安全控制authorizationContext、visibleEvidenceBudget、safetyInterruptionCard
AuthorizedLocalSecurityAuditPresentationGate

当安全审查目标是用户自有仓库、本地环境或已明确授权系统时,先记录 authorizationContext(所有权/授权、目标范围、允许动作、排除动作)与 defensiveObjective(识别、预防、修复、验证或恢复)。授权不能替代平台安全控制,也不能扩大用户未授权的外部目标。

  • 用户可见回复和报告只保留结论、影响、脱敏或最小必要证据、修复/验证路线;非必要利用细节、完整可执行载荷和敏感输入留在授权范围内的隔离本地探针,且探针输出最小化。
  • 若宿主显示内容不可用或触发额外安全检查,保存 SafetyInterruptionCard:exact message、surface/model、date/time/timezone、requestId(若有)、redacted task summary、workspace/org、last accepted checkpoint、resume evidence。
  • 恢复时从 audit-state、review checklist、报告和文件真相源重建;必要时提供官方反馈信息或评估 Trusted Access。不得通过同义改写、拆分载荷或其他方式承诺规避/绕过安全控制,也不得保证以后不会触发检查。
  • 本 Gate 只规范审查证据呈现和连续性,不改变 S02 的项目/用户明文策略;凭据、认证码等是否回显仍按用户/项目明确策略和外部平台要求处理。

执行步骤

  1. 画出信任边界和资产:用户、系统、外部 provider、数据、密钥、文件。
  2. 枚举威胁场景:越权、重放、注入、伪造、泄漏、误操作、审计缺失。
  3. 设计权限和输入输出校验边界,不重复框架已承担的能力。
  4. 按 S02 判断密钥和明文策略,不主动引入 env/secretRef。
  5. 为每项缓解绑定测试、日志、审计或人工证据。
  6. 授权本地安全审查执行可见层/隔离探针分离;发生安全提示时写 SafetyInterruptionCard 并从最近有效检查点恢复。

输出字段

markdown
## SecurityThreatModelingGate

| 字段 | 内容 |
|------|------|
| trustBoundary | 用户/系统/外部/数据/密钥边界 |
| threatScenario | 威胁场景、攻击面、失败路径 |
| permissionAbuseCase | 越权、绕过、滥用、敏感操作 |
| secretPolicy | S02 用户/项目策略、明文/硬编码/env 边界 |
| auditLogging | 审计、日志、追踪、证据保留 |
| mitigationVerification | 缓解措施和负向验证 |
| authorizationContext | 本地所有权/授权、允许与排除范围;N/A 时写 skipReason |
| defensiveObjective | 防御目标 |
| visibleEvidenceBudget | 用户可见证据边界与隔离探针位置 |
| safetyInterruptionCard | 提示上下文、最近检查点与恢复/反馈路线;未触发时写 N/A |
| evidenceMatrix | 判断 -> 代码 / policy / tests / logs / docs |

反模式

反模式修正
一看到密钥就默认改 env先执行 S02 策略判断
权限只测 happy path补 permissionAbuseCase 负向样例
安全建议无验证补 mitigationVerification
把框架已有鉴权重复写进业务层先查框架/项目原生能力
为避免内容提示而改写/拆分攻击载荷聚焦防御结果和最小证据;不得绕过平台控制
把“无法显示”直接判为违规或直接丢弃进度保留 SafetyInterruptionCard,从文件真相和审查状态恢复

与其他 Skill 的关系

  • external-integration-architecture:OAuth/Webhook/签名需要联合审查。
  • backend-domain-architecture:权限模型和领域不变量需要一致。
  • audit-project:安全 finding 进入工程审查和测试路线。

© devcodex-labs, AGPL-3.0. 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 content/skills/security-threat-modeling of devcodex-labs/devcodex.

  • SKILL.md
  • intent.json

Open the folder on GitHubat commit 1dd4525

Compare with similar skills

Security Threat Modeling 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 Modeling compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Security Threat Modeling this skilldevcodex-labs/devcodex439—~771Automated safety check: PassAGPL-3.0
Ramp Security Basicsjeremylongshore/tons-of-skills-marketplace2.8k—~1.3kAutomated safety check: PassMIT
Clickup Security Basicsjeremylongshore/tons-of-skills-marketplace2.8k—~1kAutomated safety check: PassMIT
Bamboohr Security Basicsjeremylongshore/tons-of-skills-marketplace2.8k—~1.1kAutomated safety check: PassMIT
Canva Security Basicsjeremylongshore/tons-of-skills-marketplace2.8k—~1.1kAutomated safety check: PassMIT
Linear Security Basicsjeremylongshore/tons-of-skills-marketplace2.8k—~1.3kAutomated safety check: PassMIT

Similar skills

  • Ramp Security Basics

    jeremylongshore/tons-of-skills-marketplace

    Establish least-privilege OAuth, secret, webhook, data, card, and financial-write controls for a Ramp integration.

    2.8k GitHub stars~1.3k tokensUpdated today
    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 today
    Backend & APIsAuto-check passed
  • Bamboohr Security Basics

    jeremylongshore/tons-of-skills-marketplace

    Threat-model and harden a BambooHR integration that handles employee PII, OAuth tokens, API keys, files, and webhooks.

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

    jeremylongshore/tons-of-skills-marketplace

    Implement the Canva Connect security baseline for backend OAuth, least privilege, tenant isolation, logging, revocation, and preview webhook verification.

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

    jeremylongshore/tons-of-skills-marketplace

    Harden Linear credentials, OAuth, team access, webhook verification, logging, and rotation.

    2.8k GitHub stars~1.3k tokensUpdated today
    Backend & APIsAuto-check passed
  • Procore Security Basics

    jeremylongshore/tons-of-skills-marketplace

    Threat-model a Procore integration across OAuth credentials, company routing, DMSA permissions, webhooks, files, logs, and revocation.

    2.8k GitHub stars~1.1k tokensUpdated today
    Backend & APIsAuto-check passed

More from devcodex-labs/devcodex

All 70 skills in this repo
  • Accessibility I18n

    devcodex-labs/devcodex

    无障碍与国际化专家 Owner — 当任务涉及可访问性、键盘操作、焦点、屏幕阅读器、ARIA、语言地区、本地化、RTL、翻译资源、用户可见文案或多语言文档时使用;要求把包容性体验和本地化验证绑定到真实用户路径。

    439 GitHub stars~718 tokensUpdated 21 days ago
    Auto-check passed
  • AI Agent System Architecture

    devcodex-labs/devcodex

    AI Agent 系统架构专家 Owner — 当任务涉及 Agent 路由、工具调用、上下文管理、记忆、状态机、权限、人机协作、可观测性、回放验证或模型辅助治理时使用;要求把 Agent 行为设计成可解释、可恢复、可审计。

    439 GitHub stars~2.4k tokensUpdated 21 days ago
    Auto-check passed
  • API Contract Architecture

    devcodex-labs/devcodex

    API 契约架构专家 Owner — 当任务涉及 public API、HTTP/SDK/CLI 契约、版本兼容、错误模型、分页过滤、幂等、Schema、类型、迁移或消费者影响时使用;要求先冻结消费者契约,再设计实现与验证。

    439 GitHub stars~865 tokensUpdated 21 days ago
    Auto-check passed
  • Architecture Design

    devcodex-labs/devcodex

    架构设计文档编排 Owner — 当用户要求架构设计、系统设计、技术架构或可指导开发、Review 与任务拆分的完整方案时使用;要求从业务流程反推节点、状态、数据、一致性、异常补偿、ADR 与实施任务。

    439 GitHub stars~1.1k tokensUpdated 21 days ago
    Auto-check passed
  • Audit Common

    devcodex-labs/devcodex

    审查公共维度 G0~G5 + Profile Freshness Check — 所有 audit 子类型必先执行的基础维度层

    439 GitHub stars~4.1k tokensUpdated 21 days ago
    Auto-check passed
  • Audit Session

    devcodex-labs/devcodex

    审计工作流的跨会话状态机 — 在 <audit-root/.audit-state/<session-id.json 持久化轮次/发现项/收敛状态,支持 Token 中断后精准恢复

    439 GitHub stars~1.8k tokensUpdated 21 days ago
    Auto-check passed

Questions about Security Threat Modeling

What does Security Threat Modeling do?

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

When should I use Security Threat Modeling?

Security Threat Modeling fits situations like: tasks that involve Threat modeling; tasks that involve Webhooks; tasks that involve OAuth and OpenID Connect.

How do I install Security Threat Modeling in Claude Code?

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

How do I install Security Threat Modeling in Codex?

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

Can I use Security Threat Modeling 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 devcodex-labs/devcodex --skill security-threat-modeling -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-modeling, .gemini/skills/security-threat-modeling, .github/skills/security-threat-modeling and .opencode/skills/security-threat-modeling in your project.

What does Security Threat Modeling need to run?

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

Does Security Threat Modeling 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 Modeling 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 Modeling use?

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

How many tokens does Security Threat Modeling use?

About 771 tokens (SKILL.md is roughly 3.1k 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 Modeling?

Skills that share tags, products or a category with Security Threat Modeling: Ramp Security Basics (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Clickup Security Basics (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Bamboohr Security Basics (jeremylongshore/tons-of-skills-marketplace, 2.8k stars) and Canva 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 Modeling?

devcodex-labs (a GitHub organization) maintains it in devcodex-labs/devcodex, which has 439 GitHub stars. The repository holds 70 skills in this directory. The repository was last updated on September 17, 2026.

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