lean-threat-model
Skill2 starsChanged 57 days agoMITView on GitHub
Runs token-efficient threat modeling for Cursor and Codex. Builds a compact asset-actor-boundary-abuse-control card from the user's system, without diagrams unless asked. Use when the user asks for a threat model, STRIDE, attack surface, trust boundaries, or cheapest controls. Do not use for exploit design, red-team playbooks, or attacking live systems.
In this repository21 other files it gives its agents.
- lean-cryptoSkill
- lean-mobileSkill
- lean-privacySkill
- lean-secSkill
- lean-webSkill
- lean-a11ySkill
- lean-depsSkill
- lean-docsSkill
- lean-perfSkill
- lean-reviewSkill
- lean-ciSkill
- lean-cloudSkill
- lean-costSkill
- lean-hardeningSkill
- lean-iotSkill
- lean-netSkill
- lean-dfirSkill
- lean-ir-playbookSkill
- lean-malwareSkill
- lean-osintSkill
- lean-phishSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Write the JSON to a temp file, not the user's docs unless they asked.
- Distinctive: line 46
No pentest reproduction steps.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Lean Threat Model
Five-bullet threat model. Scripts validate the card JSON. No wallpaper diagrams unless asked.
Let SKILL_ROOT be the folder that contains this SKILL.md. Prefer python3; on Windows use py -3.
python3 "$SKILL_ROOT/scripts/lean_threat_model.py" template
python3 "$SKILL_ROOT/scripts/lean_threat_model.py" check /path/to/model.jsonWrite the JSON to a temp file, not the user's docs unless they asked.
Mode
Default lean.
| Mode | Budget |
lean | 1 system card; references/stride.md; ≤5 threats |
standard | ≤3 components; ≤10 threats |
deep | still no novel exploits; ≤15 threats |
Workflow
- Name assets, actors, trust boundaries from the user's description and a few config files (
lean-net/lean-secoutput if already run). - For each likely abuse, one cheapest control.
checkthe JSON. Report the table. Stop.
Hard rules
- Defense: control, not exploit path.
- No pentest reproduction steps.
- Cap quotes at 12 lines. No architecture novel.
Report template
## Lean-threat-model (`<mode>`)
**System:** <name>
| Asset | Actor | Boundary | Abuse | Cheapest control |
|-------|-------|----------|-------|------------------|
| db | stolen session | app-db | read other rows | authorize by session subject |Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

