security-threat-model

Generate repository-grounded threat models with Mermaid diagrams and Markdown files.

3|3|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/diegocamara89/ai-skills-hub --skill security-threat-model-diegocamara89
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-threat-model
Source: https://github.com/diegocamara89/ai-skills-hub/tree/main/all-skills/security-threat-model
Command: npx skills add https://github.com/diegocamara89/ai-skills-hub --skill security-threat-model-diegocamara89

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides a disciplined, evidence-backed process to produce actionable application security threat models that are specific to a repository or project path, avoiding generic checklists and unsupported assumptions.

Core Features & Use Cases

  • Repository-grounded analysis: Enumerates components, trust boundaries, entry points, assets, attacker capabilities, and abuse paths anchored to repo evidence.
  • Prioritization and mitigations: Produces likelihood and impact reasoning, prioritized risks, and concrete mitigation recommendations tied to code or config locations.
  • Quality and output contract: Validates assumptions with the user, outputs a Mermaid diagram and a final Markdown threat model file following a strict prompt template for repeatability.

Quick Start

Ask the assistant to produce a repository-grounded threat model for the target repo or subpath and confirm the prompted assumptions when requested.

Frequently Asked Questions about security-threat-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is repository-grounded threat modeling and how does it work?

Repository-grounded threat modeling analyzes application security by enumerating trust boundaries, assets, and abuse paths anchored directly to codebase evidence. It avoids generic checklists by validating assumptions against repository files to produce specific, actionable risk assessments.

How do I generate a threat model for a specific codebase subpath?

To generate a threat model, request analysis of the target repository or subpath and confirm assumptions when prompted. The process enumerates entry points and attacker capabilities, then outputs a Mermaid diagram and a final Markdown threat-model file.

Can I use this threat modeling approach for an existing application security audit?

Yes, this approach suits application security audits by producing prioritized risks with likelihood and impact reasoning. It requires access to repository files to anchor claims and generate concrete mitigation recommendations tied to code or config locations.

What's the best way to document attack surfaces and trust boundaries in a repository?

The best way to document attack surfaces is using a strict prompt template that outputs a compact Mermaid diagram alongside a Markdown file. This ensures repeatable, evidence-backed mapping of attacker capabilities and mitigations to specific repository locations.

Why does threat modeling fail to produce actionable mitigations?

Threat modeling fails to produce actionable mitigations when it relies on generic checklists and unsupported assumptions instead of repository evidence. Grounding the analysis in actual codebase files ensures mitigations are tied to concrete code or config locations.

Does security threat modeling require access to the full repository?

Security threat modeling requires access to repository files and provided prompt templates to anchor claims. You can target the full repository or a specific project subpath, ensuring the analysis remains scoped to the in-scope codebase components.