Source profileQuality 92/100

backspace-shmackspace/claude-devkit/skills/threat-model-gate/SKILL.md

threat-model-gate

Use when planning security-sensitive features — authentication, authorization, data handling, API design, cryptography, or network configuration — requires explicit threat modeling before implementation decisions are made

Source repository stars
15
Declared platforms
0
Static risk flags
0
Last source update
2026-08-24
Source checked
2026-08-25

Decision brief

What it does: where it fits

Use when planning security-sensitive features — authentication, authorization, data handling, API design, cryptography, or network configuration — requires explicit threat modeling before implementation decisions are made

Best for

  • Use when planning security-sensitive features — authentication, authorization, data handling, API design, cryptography, or network configuration — requires explicit threat modeling before implementation decisions are ma…

Not for

  • Incomplete trust boundary analysis
  • WRONG: "The API talks to the database" (no trust boundary identified)

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/backspace-shmackspace/claude-devkit --skill "skills/threat-model-gate"
Safe inspection promptEditorial

Inspect the Agent Skill "threat-model-gate" from https://github.com/backspace-shmackspace/claude-devkit/blob/7d11c4a8aa4be142a6ea4792604f8a7b39f0d789/skills/threat-model-gate/SKILL.md at commit 7d11c4a8aa4be142a6ea4792604f8a7b39f0d789. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    How to Apply During Planning

    When drafting or reviewing a plan for a security-sensitive feature:

    Identify the security scope. Does this plan touch any of the activation categories listed above? If yes, the threat model gate is active.Audit the plan for Security Requirements. Is there a Security Requirements section with assets, trust boundaries, STRIDE analysis, and security controls documented? If not, the plan is incomplete.Apply STRIDE. Walk through each threat category for each identified asset and boundary. If any category has no entry, ask: "Have we genuinely considered this, or have we overlooked it?"
  2. 02

    Core Principle

    Every feature that handles user data, authentication, or system boundaries requires explicit threat modeling before implementation.

    Every feature that handles user data, authentication, or system boundaries requires explicit threat modeling before implementation."We'll secure it in the next sprint" is a commitment that never gets honored. The cost of retrofitting security is 10x the cost of designing it in. Threat modeling during planning is the minimum viable security practice.
  3. 03

    When to Activate

    Apply this gate when planning involves any of the following:

    Login flows, session management, token issuance or validationMulti-factor authentication, SSO, OAuth, OIDC, SAMLPassword storage, credential management, account recovery
  4. 04

    The Threat Modeling Checklist

    Work through these four areas before committing to an implementation approach:

    Work through these four areas before committing to an implementation approach:Identify what is worth protecting:Map where trust changes:
  5. 05

    1. Assets

    Identify what is worth protecting:

    Identify what is worth protecting:

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score92/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars15SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
backspace-shmackspace/claude-devkit
Skill path
skills/threat-model-gate/SKILL.md
Commit
7d11c4a8aa4be142a6ea4792604f8a7b39f0d789
License
MIT
Collected
2026-08-25
Default branch
main
View the original SKILL.md

Threat Model Gate

Overview

Security cannot be added later. Features that touch user data, system boundaries, or trust relationships require threat modeling during planning — not after code is written.

Core Principle

Every feature that handles user data, authentication, or system boundaries requires explicit threat modeling before implementation.

"We'll secure it in the next sprint" is a commitment that never gets honored. The cost of retrofitting security is 10x the cost of designing it in. Threat modeling during planning is the minimum viable security practice.

When to Activate

Apply this gate when planning involves any of the following:

Authentication and Identity

  • Login flows, session management, token issuance or validation
  • Multi-factor authentication, SSO, OAuth, OIDC, SAML
  • Password storage, credential management, account recovery

Authorization and Access Control

  • Role-based or attribute-based access control (RBAC, ABAC)
  • Resource ownership and sharing models
  • Admin capabilities, privilege escalation paths
  • API key or service account permissions

Data Handling

  • PII collection, storage, or transmission
  • Payment card data, health records, or regulated data categories
  • Encryption at rest or in transit
  • Data retention, deletion, or export features

API Design

  • Public-facing endpoints, webhooks, or callbacks
  • Inter-service communication with trust implications
  • Rate limiting and abuse prevention
  • Input validation and output encoding boundaries

Cryptography

  • Key generation, storage, or rotation
  • Algorithm selection (hashing, signing, encryption)
  • Certificate management, mTLS
  • Secure random number generation

Network and Infrastructure

  • Firewall rules, network segmentation, VPN configurations
  • Load balancer, reverse proxy, or CDN configurations
  • Container networking, service mesh, Kubernetes network policies
  • DNS, TLS termination, certificate pinning

The Threat Modeling Checklist

Work through these four areas before committing to an implementation approach:

1. Assets

Identify what is worth protecting:

ASSETS TO IDENTIFY:
- What data does this feature create, read, update, or delete?
- What is the confidentiality classification? (public / internal / confidential / restricted)
- What is the integrity requirement? (can corruption be tolerated? for how long?)
- What is the availability requirement? (what is the acceptable downtime?)
- What are the downstream systems or users that depend on this data?

2. Trust Boundaries

Map where trust changes:

BOUNDARIES TO IDENTIFY:
- Where does data cross from an untrusted zone to a trusted zone?
- Which actors (users, services, admins) receive which level of trust?
- Where are authentication and authorization enforced?
- What can an unauthenticated caller reach?
- What can an authenticated-but-unauthorized caller reach?
- Where does input become data (the injection boundary)?

3. Threats (STRIDE Analysis)

Apply STRIDE to each asset and boundary (see STRIDE Quick Reference below):

FOR EACH BOUNDARY OR ASSET:
- S: How could an attacker impersonate a legitimate actor?
- T: How could an attacker modify data in transit or at rest?
- R: How could an actor deny having performed an action?
- I: How could an attacker read data they should not see?
- D: How could an attacker make the feature unavailable?
- E: How could an attacker gain more privilege than intended?

4. Mitigations

For each threat identified, specify the control:

MITIGATIONS TO SPECIFY:
- Authentication controls (how is identity verified?)
- Authorization controls (how is permission verified?)
- Input validation (what are the trust boundaries for input?)
- Encryption (what is encrypted, with which algorithm, where?)
- Audit logging (what events are logged, where, for how long?)
- Rate limiting (what abuse scenarios does this prevent?)
- Failure mode (what happens when the control fails?)

STRIDE Quick Reference

CategoryThreat TargetStandard MitigationDREAD Focus
SpoofingIdentity, authenticationMFA, strong auth, certificate pinningReproducibility: how reliably can credentials be forged?
TamperingData integrity, codeInput validation, signing, checksumsDamage Potential: what is the blast radius of tampered data?
RepudiationAudit trails, loggingComprehensive audit logs, timestampsDiscoverability: how visible is the logging gap?
Info DisclosureConfidentialityEncryption at rest/transit, access controlsAffected Users: how many users' data is exposed?
Denial of ServiceAvailabilityRate limiting, auto-scaling, circuit breakersExploitability: how easily can the DoS be triggered?
Elevation of PrivilegeAuthorizationLeast privilege, RBAC, input validationDamage Potential: what can the attacker do with elevated access?

STRIDE is a starting point, not a complete threat model. Use it to ensure you have covered all six threat categories, then go deeper on the categories most relevant to the feature.

DREAD Risk Rating Reference

When threat modeling identifies specific threats, score each using DREAD (5 dimensions, each 0-10). The average determines severity classification.

DimensionQuestion0 (Low)5 (Medium)10 (High)
Damage PotentialHow bad if exploited?Minor inconvenienceSingle user data lossFull system compromise
ReproducibilityHow reliably exploitable?Race condition, rareRequires specific configEvery time, automated
ExploitabilityHow much skill needed?Nation-state capabilitySecurity professionalScript kiddie, public exploit
Affected UsersHow many impacted?Single user, edge caseSubset of usersAll users / tenants
DiscoverabilityHow easy to find?Requires source code accessFindable by scanningObvious from public interface

Severity bands:

  • CRITICAL: DREAD average >= 8.0
  • HIGH: DREAD average >= 6.0 and < 8.0
  • MEDIUM: DREAD average >= 4.0 and < 6.0
  • LOW: DREAD average < 4.0

Calibration rule: When a score falls within 0.5 of a boundary (e.g., 5.5-6.4), check Damage Potential. If DP >= 7, round UP. If DP <= 3, round DOWN.

Security Requirements Template for Plans

Every plan for a security-sensitive feature must include a ## Security Requirements section:

## Security Requirements

### Assets
- **[Asset Name]:** [Confidentiality: public/internal/confidential/restricted] | [Integrity: high/medium/low] | [Availability: high/medium/low]

### Trust Boundaries
- **Boundary:** [Description — e.g., "public internet to application server"]
  - **Authentication:** [How identity is established]
  - **Authorization:** [How permission is verified]

### STRIDE Analysis
| Threat | Vector | Mitigation | Residual Risk |
|--------|--------|-----------|---------------|
| Spoofing | [How an attacker could spoof] | [Control] | [low/medium/high] |
| Tampering | [How data could be tampered with] | [Control] | [low/medium/high] |
| Repudiation | [What actions could be denied] | [Control] | [low/medium/high] |
| Information Disclosure | [What data could be exposed] | [Control] | [low/medium/high] |
| Denial of Service | [What could be exhausted or crashed] | [Control] | [low/medium/high] |
| Elevation of Privilege | [How privilege could be escalated] | [Control] | [low/medium/high] |

### Security Controls
- **Input Validation:** [What is validated, where, and how]
- **Encryption:** [At rest: algorithm. In transit: TLS version, cipher suites]
- **Audit Logging:** [What events are logged, retention period, tamper protection]
- **Rate Limiting:** [Limits, scope, response on breach]
- **Secrets Management:** [Where credentials are stored, how rotated]

### Failure Modes
- **If authentication fails:** [Behavior — e.g., "return 401, log attempt, no information leakage"]
- **If authorization fails:** [Behavior — e.g., "return 403, log with user ID and resource"]
- **If encryption fails:** [Behavior — e.g., "abort operation, do not fall back to plaintext"]

Anti-Patterns

When you notice these in a plan, stop and apply threat modeling before proceeding:

"Security will be added later"

WRONG: "We'll add authentication in v2."
RIGHT: Define the authentication model now. Implementation can be phased; the design cannot.

Implicit trust of internal services

WRONG: "It's only called by our internal API, so we don't need auth."
RIGHT: Internal services are compromised too. Define what trust means and how it is enforced.

Encryption as an afterthought

WRONG: "We'll encrypt the database later when we have time."
RIGHT: Define encryption at rest requirements now. Schema changes after launch are expensive.

Authorization by obscurity

WRONG: "Users won't know the endpoint exists."
RIGHT: Assume all endpoints are discoverable. Enforce authorization explicitly.

Logging as a security control

WRONG: "We'll know if something bad happens because we log everything."
RIGHT: Logging is detection and response, not prevention. Identify the preventive controls.

"We trust our users"

WRONG: "Our users are internal employees, they wouldn't abuse this."
RIGHT: Insider threat is real. Least privilege applies to employees too. Define what each role can do.

Deferring the threat model to the security team

WRONG: "Security will review this before it ships."
RIGHT: The security team reviews your threat model. You write the threat model. Start now.

Sharing secrets in plans or commits

WRONG: Including actual API keys, connection strings, or credentials in plan documents or code.
RIGHT: Reference secrets by name only. Actual values belong in secrets managers, not in plans.
  1. Incomplete trust boundary analysis

    • WRONG: "The API talks to the database" (no trust boundary identified)
    • RIGHT: "Data flow DF-003 crosses from TZ-DMZ to TZ-Internal at the API-to-DB boundary, carrying user credentials over PostgreSQL wire protocol"
  2. Skipping DREAD calibration

    • WRONG: DREAD average 5.8, classified as MEDIUM
    • RIGHT: DREAD average 5.8 with Damage Potential 8 -> calibrate UP to HIGH (DP >= 7 near boundary)

How to Apply During Planning

When drafting or reviewing a plan for a security-sensitive feature:

  1. Identify the security scope. Does this plan touch any of the activation categories listed above? If yes, the threat model gate is active.

  2. Audit the plan for Security Requirements. Is there a ## Security Requirements section with assets, trust boundaries, STRIDE analysis, and security controls documented? If not, the plan is incomplete.

  3. Apply STRIDE. Walk through each threat category for each identified asset and boundary. If any category has no entry, ask: "Have we genuinely considered this, or have we overlooked it?"

  4. Verify mitigations are specific. "We'll use standard security practices" is not a mitigation. "Passwords hashed with bcrypt (cost factor 12), stored in the users table password_hash column, never logged" is a mitigation.

  5. Check failure modes. What does the feature do when a security control fails? Graceful failure is part of the design.

  6. Flag anti-patterns. If the plan contains any of the anti-patterns above, surface them explicitly before the plan is approved.

Relationship to Other Skills

  • Before /architect approval: The threat model gate runs during planning. Plans without a ## Security Requirements section for security-sensitive features should not receive architect approval.
  • Before /ship implementation: If a plan passed /architect but the Security Requirements section is missing or shallow, raise it before implementation begins. It is cheaper to fix the design than the code.
  • After /secure-review: If /secure-review finds issues that the threat model should have caught, update the threat model section of the plan and the .claude/learnings.md file. Threat model gaps are learning opportunities.
  • In conjunction with receiving-code-review: When reviewing security-related code, apply both skills. receiving-code-review governs how you evaluate the reviewer's feedback; threat-model-gate governs whether the implementation addresses the correct threats.

Full Threat Modeling Methodology

This skill provides a planning gate -- it ensures threat modeling happens before implementation. For the full threat modeling methodology with three-phase STRIDE+DREAD analysis and OTM JSON output, load the standalone threat-model knowledge-base skill:

Using skills/threat-model/SKILL.md: perform a threat model for this system.

The threat-model skill provides:

  • Three-phase workflow: System Decomposition, Per-Subsystem Threat Analysis, Cross-Cutting Synthesis
  • DREAD scoring with calibration and consistency checks
  • MITRE ATT&CK technique mapping
  • OTM v0.2.0 JSON output (machine-readable)
  • Structured markdown report (human-readable)
  • Reference materials in reference/otm-schema.md and reference/report-template.md

The Bottom Line

Security is a design constraint, not a feature. It cannot be sprinted in after the architecture is set.

Threat modeling during planning takes 30 minutes. Retrofitting security after launch takes months and may require breaking API changes, data migrations, or architectural rewrites.

Model the threats. Document the controls. Then build.

Frequently asked questions

What to verify before installation and use

What does the threat-model-gate source document cover?

Use when planning security-sensitive features — authentication, authorization, data handling, API design, cryptography, or network configuration — requires explicit threat modeling before implementation decisions are made

How do I install threat-model-gate?

The source record exposes this install command: npx skills add https://github.com/backspace-shmackspace/claude-devkit --skill "skills/threat-model-gate". Inspect the command and pinned source before running it.

Alternatives

Compare before choosing

Computed 10045,511

coreyhaines31/marketingskills

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program

Computed 1008

narrative-io/narrative-skills-marketplace

design-analysis

Translate a fuzzy analytical question into a rigorous investigation plan. Interrogates the ask, grounds the plan in the available data dictionary, applies analytical best practices, and produces a structured brief of query specifications for a downstream query-writing skill. Plans, does not write SQL. Use when: "why did X drop", "is there a relationship between A and B", "who are our highest-value customers", "what's driving the change in Y", "investigate this trend", "design an analysis for", "

Computed 9965

brucesongs/kali-claw

insecure-design

Insecure Design (OWASP A06:2025) focuses on security flaws in system architecture and design phases, rather than code implementation-level bugs.

Computed 9916

NintendaDev/unikit-ai

unikit-docs

Generate and maintain the project's TECHNICAL documentation from its codebase — scans the project structure, tech stack, and module boundaries, then writes a lean README landing page plus detailed topic pages (architecture, modules, setup, build, APIs), only the docs that are relevant. Use whenever the user wants to create, update, or validate documentation of the CODE or the project itself, e.g. "generate documentation", "create docs", "write the README", "update the project docs", "document th