agentleFS
dRafaleDdRafaleD/cybersec-skills/skills/operations/lean-threat-model/SKILL.md

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.

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
  1. Distinctive:

    Write the JSON to a temp file, not the user's docs unless they asked.

    line 25
  2. Distinctive:

    No pentest reproduction steps.

    line 46

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.json

Write the JSON to a temp file, not the user's docs unless they asked.

Mode

Default lean.

ModeBudget
lean1 system card; references/stride.md; ≤5 threats
standard≤3 components; ≤10 threats
deepstill no novel exploits; ≤15 threats

Workflow

  1. Name assets, actors, trust boundaries from the user's description and a few config files (lean-net/lean-sec output if already run).
  2. For each likely abuse, one cheapest control.
  3. check the 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 |

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.