pytm

Generates threat reports and identifies risks for software architectures via Python-based modeling.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mirandagabrieldev/claude-build-template --skill pytm-mirandagabrieldev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytm
Source: https://github.com/mirandagabrieldev/claude-build-template/tree/main/skills/security/pytm
Command: npx skills add https://github.com/mirandagabrieldev/claude-build-template --skill pytm-mirandagabrieldev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytm, graphviz, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Automates programmatic threat modeling for STRIDE-based security analysis.

Core Features & Use Cases

  • Generate data flow diagrams (DFDs) and threat reports by encoding system architecture in Python.
  • Identify STRIDE threats across trust boundaries and propose mitigations for repeatable security reviews.
  • Integrate threat modeling into CI/CD pipelines to shift security left and maintain architecture as code.

Quick Start

Create a basic pytm threat model for a web application and run tm.process() to generate threats and a DFD.

Frequently Asked Questions about pytm

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

FAQPage Schema
How do I automate STRIDE threat modeling for my system architecture?

Automate STRIDE threat modeling by encoding your system architecture in Python to programmatically identify threats across trust boundaries and generate actionable mitigations. This approach codifies architecture to produce repeatable, code-driven threat models with automatic DFD generation.

What is architecture as code for threat modeling and when do I need it?

Architecture as code for threat modeling is the practice of defining your system structure programmatically in Python to apply STRIDE analysis. You need it when you require repeatable security reviews, automatic DFD generation, and consistent risk analysis across evolving software designs.

Can I integrate threat modeling into my CI/CD pipeline to shift security left?

Yes, you can integrate threat modeling into CI/CD pipelines to shift security left by treating architecture as code. Encoding your system architecture in Python allows you to automatically generate DFDs and STRIDE threat reports during continuous integration builds.

Does pytm require graphviz to generate data flow diagrams?

Yes, generating data flow diagrams with pytm requires the graphviz dependency to render the visual outputs. The tool uses your codified Python architecture to automatically generate these DFDs alongside STRIDE threat reports and risk analysis.

What is the best way to generate data flow diagrams and threat reports from Python code?

The best way to generate data flow diagrams and threat reports from Python code is to codify your system architecture using pytm to apply STRIDE analysis. This programmatically identifies threats across trust boundaries and proposes mitigations for repeatable security reviews.

Are there limitations to programmatic threat modeling for complex security architecture?

Programmatic threat modeling using pytm is limited by the accuracy of your encoded Python architecture and requires dependencies like graphviz for DFD rendering. It depends on correctly defining trust boundaries to ensure comprehensive STRIDE threat coverage and actionable risk analysis.