autoresearch
Autonomous experiment loop for optimization research. Use when the user wants to: - Optimize a metric through systematic…
Generate a STRIDE-based security threat model for a repository. Use when setting up security monitoring, after architecture changes, or for security audits.
$ npx -y skills add factory-ai/factory-plugins --skill threat-model-generation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/threat-model-generationContext preview
The summary Claude sees to decide when to auto-load this skill.
Generate a STRIDE-based security threat model for a repository. Use when setting up security monitoring, after architecture changes, or for security audits.
name: threat-model-generation description: Generate a STRIDE-based security threat model for a repository. Use when setting up security monitoring, after architecture changes, or for security audits. version: 1.0.0 tags: [security, threat-model, stride]
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.
Before running this skill, gather or confirm:
| Input | Description | Required | | ----------------------- | ------------------------------------------------------- | -------------------------------- | | Repository path | Root directory to analyze | Yes (default: current directory) | | Existing threat model | Path to existing `.factory/threat-model.md` if updating | No | | Compliance requirements | Frameworks to consider (SOC2, GDPR, HIPAA, etc.) | No | | Security contacts | Email addresses for security team notifications | No |
Follow these steps in order:
Scan the codebase to understand the system:
1. **Identify languages and frameworks**
2. **Map components and services**
3. **Identify external interfaces**
4. **Trace data flows**
Define security zones:
1. **Public Zone** (untrusted)
2. **Authenticated Zone** (partially trusted)
3. **Internal Zone** (trusted)
Document where trust boundaries exist and what validates transitions between zones.
Classify data by sensitivity:
1. **PII (Personally Identifiable Information)**
2. **Credentials & Secrets**
3. **Business-Critical Data**
For each major component, analyze threats in all six categories:
For each identified threat:
Create a library of code patterns specific to this codebase's tech stack:
# Example: SQL Injection patterns for Python
# VULNERABLE
sql = f"SELECT * FROM users WHERE id = {user_id}"
# SAFE
cursor.execute("SELECT * FROM users WHERE id = ?", (user_id,))Include patterns for:
Create two files:
Use the template in `stride-template.md` to generate a comprehensive threat model with:
The document should be written in **natural language** with code examples, optimized for LLM comprehension.
Generate configuration metadata:
{
"thOfficial Factory plugins marketplace containing curated skills, droids, and tools.
Autonomous experiment loop for optimization research. Use when the user wants to: - Optimize a metric through systematic…
Create a pull request with Conventional Commits formatting, a templated body, and local verification. Use when the user asks to…
Follow up on an existing PR by rebasing on the base branch, addressing reviewer comments, fixing CI issues, and pushing updates.…
Intercept and debug HTTP traffic from any CLI, service, or script using HTTP Toolkit. Use when you need to inspect LLM API calls,…
Control terminal TUIs, browsers, and native desktop apps for testing, demos, QA, and computer-use tasks. Use when you need to…
Automate browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to: -…