Agent skill

Threat Model Generation

by Factory-AI in Factory-AI/factory-plugins

Generate a STRIDE-based security threat model for a repository.

No licenceAuto-check passedSecurity

Install Threat Model Generation

skills CLI
$ npx skills add Factory-AI/factory-plugins --skill threat-model-generation -a claude-code

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

GitHub CLI
$ gh skill install Factory-AI/factory-plugins threat-model-generation --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/Factory-AI/factory-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/security-engineer/skills/threat-model-generation .claude/skills/threat-model-generation && 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
threat-model-generation
GitHub stars
111
Token cost
~2.1k tokens
SKILL.md length
717 words
Files
2
Skills in repo
13
Repo updated
First seen
Licence
None found

At a glance

Generate a STRIDE-based security threat model for a repository.

  • Works in 6 steps: Analyze Repository Structure → Identify Trust Boundaries → Inventory Critical Assets → …
  • Setting up security monitoring
  • SKILL.md covers When to Use This Skill, Inputs, Instructions and Success Criteria, plus 3 more sections
  • Calls jq

What it does

Threat Model Generation is an agent skill from Factory-AI/factory-plugins. Generate a STRIDE-based security threat model for a repository. Use when setting up security monitoring, after architecture changes, or for security audits.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `stride-template.md`).

It sits in Security, covering Threat modeling. The repository describes itself as: Official Factory plugins marketplace.

When your agent uses it

  • Setting up security monitoring
  • After architecture changes
  • For security audits

Example prompts

  • “/threat-model-generation”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Analyze Repository Structure
  2. Identify Trust Boundaries
  3. Inventory Critical Assets
  4. Apply STRIDE Analysis
  5. Document Vulnerability Patterns
  6. Generate Output Files

What it can do on your machine

Read from SKILL.md and the folder at commit 7166a07. 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

    Shell commands in SKILL.md call:

    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.microsoft.com
    • owasp.org

    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

Threat Model Generation loads about 2.1k tokens when it runs. Until then it costs about 45 tokens; SKILL.md has 717 words of instructions outside code blocks.

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

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

Without a licence we can't republish the file, so here is its outline and opening line. It has 717 words (~2,103 tokens).

“Generate a comprehensive security threat model for a repository using the STRIDE methodology. This skill analyzes the codebase architecture and produces an LLM-optimized threat model document that other security skills can reference.”

— opening of SKILL.md by Factory-AI
name
threat-model-generation
version
1.0.0
tags
security, threat-model, stride

Read the full SKILL.md on GitHub

Files

SKILL.md and 1 other file in plugins/security-engineer/skills/threat-model-generation of Factory-AI/factory-plugins.

  • SKILL.md
  • stride-template.md

Open the folder on GitHubat commit 7166a07

Compare with similar skills

Threat Model Generation 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.

Threat Model Generation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Threat Model Generation this skillFactory-AI/factory-plugins111—~2.1kAutomated safety check: PassNone
Fla Ascend Performancefla-org/flash-linear-attention5.8k—~6.3kAutomated safety check: PassMIT
Forensifyalexgreensh/repo-forensics188—~2.5kAutomated safety check: NotesCustom licence
Create Rulecartography-cncf/cartography4.1k—~3kAutomated safety check: PassApache-2.0
Commit Security Scancodexstar69/bug-hunter519—~629Automated safety check: PassMIT
Auditing Code For Vulnerabilitiestrilwu/secskills157—~3.2kAutomated safety check: PassMIT

Similar skills

  • Fla Ascend Performance

    fla-org/flash-linear-attention

    Guidelines for Ascend NPU kernel / Triton-Ascend backend performance work in the FLA repo.

    5.8k GitHub stars~6.3k tokensUpdated today
    SecurityAuto-check passed
  • Forensify

    alexgreensh/repo-forensics

    Cross-agent self-inspection of your AI-agent stack. An agent skill from alexgreensh/repo-forensics.

    188 GitHub stars~2.5k tokensUpdated 12 days ago
    SecurityAuto-check: notes
  • Create Rule

    cartography-cncf/cartography

    Author a Cartography security rule (one or more Cypher Facts plus a Pydantic Finding output model) under cartography/rules/data/rules/.

    4.1k GitHub stars~3k tokensUpdated today
    SecurityAuto-check passed
  • Commit Security Scan

    codexstar69/bug-hunter

    Scan code changes for security vulnerabilities using Bug Hunter-native artifacts and STRIDE context.

    519 GitHub stars~629 tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Audit source code for exploitable vulnerabilities using threat-model-driven review, taint tracing, invariant checking, and variant analysis.

    157 GitHub stars~3.2k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Match identified threats to preventive, detective and corrective controls across network, application, data, endpoint and process layers to plan remediation.

    40k GitHub starsUsed in 8 repos~742 tokens
    SecurityAuto-check passed

More from Factory-AI/factory-plugins

All 13 skills in this repo
  • Autoresearch

    Factory-AI/factory-plugins

    Autonomous experiment loop for optimization research. An agent skill from Factory-AI/factory-plugins.

    111 GitHub stars~4.2k tokensUpdated 2 days ago
    Auto-check passed
  • Ban Type Assertions

    Factory-AI/factory-plugins

    Ban as type assertions in a package via the @typescript-eslint/consistent-type-assertions lint rule, replacing them with compiler-verified type-safe alternatives.

    111 GitHub stars~1.7k tokensUpdated 2 days ago
    Auto-check passed
  • Browser Navigation

    Factory-AI/factory-plugins

    Automate browser interactions for web testing, form filling, screenshots, and data extraction.

    111 GitHub stars~2.7k tokensUpdated 2 days ago
    Auto-check passed
  • Commit Security Scan

    Factory-AI/factory-plugins

    Analyze code changes for security vulnerabilities using LLM reasoning and threat model patterns.

    111 GitHub stars~2.3k tokensUpdated 2 days ago
    Auto-check passed
  • Create PR

    Factory-AI/factory-plugins

    Create a pull request with Conventional Commits formatting, a templated body, and local verification.

    111 GitHub stars~2.3k tokensUpdated 2 days ago
    Auto-check passed
  • Droid Control

    Factory-AI/factory-plugins

    Control terminal TUIs, browsers, and native desktop apps for testing, demos, QA, and computer-use tasks.

    111 GitHub stars~3.6k tokensUpdated 2 days ago
    Auto-check: notes

Categories

Questions about Threat Model Generation

What does Threat Model Generation do?

Generate a STRIDE-based security threat model for a repository. Threat Model Generation is an agent skill from Factory-AI/factory-plugins. Generate a STRIDE-based security threat model for a repository.

When should I use Threat Model Generation?

Threat Model Generation fits situations like: setting up security monitoring; after architecture changes; for security audits.

How do I install Threat Model Generation in Claude Code?

Run `npx skills add Factory-AI/factory-plugins --skill threat-model-generation -a claude-code`. Or copy the skill folder (plugins/security-engineer/skills/threat-model-generation in Factory-AI/factory-plugins) into .claude/skills/threat-model-generation in your project. Claude Code loads it when a task matches its description.

How do I install Threat Model Generation in Codex?

Run `npx skills add Factory-AI/factory-plugins --skill threat-model-generation -a codex`. Or copy the skill folder (plugins/security-engineer/skills/threat-model-generation in Factory-AI/factory-plugins) into .agents/skills/threat-model-generation in your project. Codex loads it when a task matches its description.

Can I use Threat Model Generation 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 Factory-AI/factory-plugins --skill threat-model-generation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/threat-model-generation, .gemini/skills/threat-model-generation, .github/skills/threat-model-generation and .opencode/skills/threat-model-generation in your project.

What does Threat Model Generation need to run?

Going by SKILL.md and its folder, Threat Model Generation needs the command-line tools its instructions call (jq). Our summary lists: Python 3.

Does Threat Model Generation access the network?

SKILL.md names 2 domains. As links in the text: docs.microsoft.com and owasp.org. This is read from the text; nothing was executed.

Is Threat Model Generation 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 Threat Model Generation use?

No licence was found for Threat Model Generation or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Threat Model Generation use?

About 2.1k tokens (SKILL.md is roughly 8.4k 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 Threat Model Generation?

Skills that share tags, products or a category with Threat Model Generation: Fla Ascend Performance (fla-org/flash-linear-attention, 5.8k stars), Forensify (alexgreensh/repo-forensics, 188 stars), Create Rule (cartography-cncf/cartography, 4.1k stars) and Commit Security Scan (codexstar69/bug-hunter, 519 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Threat Model Generation?

Factory-AI (a GitHub organization) maintains it in Factory-AI/factory-plugins, which has 111 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on October 7, 2026.

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