pytm

A Python-based threat-modeling tool for STRIDE analysis, a method for identifying common security threats, and for creating data-flow diagrams.

In plain words
What is it for?
Use it to write threat models in Python, generate diagrams showing how data moves, and identify related security threats.
Why use it?
It helps teams identify security risks in a system before or during implementation.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/agentsecops/secopsagentkit/pytm
Any agent
npx skills add AgentSecOps/SecOpsAgentKit --skill pytm
Clone the repo
git clone --depth 1 https://github.com/AgentSecOps/SecOpsAgentKit

Made for: Claude Code, Codex.

Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,054 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00125 $0.04054
Opus 5 $0.00063 $0.02027
Sonnet 5 $0.00025 $0.00811
Haiku 4.5 $0.00013 $0.00405

Measured 2d ago against content hash f148ac5a58ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pytm scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo apt-get install -y graphviz

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/threatmodel/pytm/SKILL.md · 575 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 575 lines · 125 tokens per session scan A f148ac5a58ec

Subscribe to this mod's changes

pytm is a skill published in the GitHub repository AgentSecOps/SecOpsAgentKit (202 stars, last pushed 4mo ago), with no licence file. It adds 125 tokens to every session and 4,054 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

pytm

Python-based threat modeling using pytm library for programmatic STRIDE analysis, data flow diagram generation, and automated security threat identification. Use when: (1) Creating threat models programmatically using Python code, (2) Generating data flow diagrams (DFDs) with automatic STRIDE threat identification…

rohunj/claude-build-workflow · 125 tokens

Mixed-Language Monorepos

This skill should be used when the user is auditing a "polyglot monorepo", "multi-language codebase", "microservices with different languages", "Go + Python + TypeScript", or any codebase with services written in different programming languages. Provides strategies for cross-service security analysis and unified…

allsmog/vuln-scout · 71 tokens

OWASP API Security Top 10

This skill should be used when the user asks about "API security", "OWASP API Top 10", "BOLA", "broken object level authorization", "API authentication", "mass assignment", "GraphQL security", "gRPC security", "rate limiting", "API abuse", "REST API vulnerabilities", or needs to identify API-specific security issues…

allsmog/vuln-scout · 85 tokens

Sensitive Data Leakage

Detect ANY credential/secret flowing to ANY output sink. Use when asked about "credential leakage", "secret logging", "sensitive data exposure", "CWE-532", "password in logs", "token exposure", or security logging issues.

allsmog/vuln-scout · 53 tokens

Cache Poisoning

This skill should be used when the user asks about "cache poisoning", "web cache deception", "CDN cache", "proxy cache", "nginx cache", "varnish", "cache key manipulation", "response caching", or needs to find cache-related vulnerabilities during whitebox security review.

allsmog/vuln-scout · 64 tokens

Cryptographic Failures

This skill should be used when the user asks about "cryptographic failures", "weak encryption", "hardcoded secrets", "insecure random", "MD5", "SHA1", "weak hashing", or needs to find crypto-related vulnerabilities during whitebox security review.

allsmog/vuln-scout · 59 tokens