amirfish1/claude-command-center/threat-model
Claude Code and agent skill by amirfish1/claude-command-center
- community
Checking that the SKILL.md file is still in the repository.
Use before shipping a change that touches a trust boundary (a new endpoint, input parser, file-path handler, subprocess call, or auth check) — it spawns ONE fresh sibling session via CCC that maps the abuse surface of that specific diff, ranks each abuse case by impact and likelihood, and hands back a prioritized ledger that feeds /security-review. A defensive threat map, not an exploit run.
Install
npx vskill@latest install amirfish1/claude-command-center/threat-modelSKILL.md
Threat-model spawns a single fresh CCC session that looks at one bounded change — a diff, a new endpoint, a new input path — and asks the one question a feature author is worst at answering about their own work: how would someone misuse this? It enumerates abuse cases against the change, ranks them by impact and likelihood, notes the mitigation already present and the gap that remains, and hands you a ledger you route into /security-review and code fixes. It builds on the spawn/report_to mechanics in the ccc-orchestration skill — read that first for the full Spawn/Inject/Ask API.
This is a defensive map: the session describes attack paths and the defenses that close them. It does not write working exploits, run attacks against live services, or produce weaponized payloads — the deliverable is the threat model that tells you where to look, feeding the existing security review and your own fixes.
Cost
1 spawned session. Each spawn is a real billed session on the user's kanban — tell the user the count before spawning. Scope it to a bounded change (one endpoint, one parser, one diff) — "threat-model the whole app" is not one session's job, and an unbounded map is a shallow one. Skip it for changes that touch no trust boundary at all (pure UI copy, an internal refactor with no new input) — there's no abuse surface to map.
Setup
- (a) Run every CCC curl with the network sandbox disabled — the Bash
sandbox blocks loopback and fails spuriously even when CCC is up.
- (b) URL-encode `repo_path` in query strings (
+→%2B, space →%20). - (c) Resolve your own session id:
$CLAUDE_SESSION_ID, else the newest
*.jsonl under ~/.claude/projects/<slugified-cwd>/ (see ccc-orchestration).
Preconditions — decide these BEFORE spawning
- (a) The change scope — the exact diff, ref range, endpoint, or files to
model. The tighter the scope, the deeper the map.
- (b) The trust boundary it touches — which of these the change adds or
moves: a network-reachable endpoint, an untrusted input parser, a file-path or glob handler, a subprocess/exec call, an auth or origin check, a deserialization step, a secret or credential path. Naming it focuses the session on the surface that matters.
- (c) The threat context — who could reach this (any localhost process? a
same-origin page? a remote client? another user?) and what "bad" means here (data exfiltration, path escape, RCE, DoS, auth bypass, secret leak). A threat model without an adversary is just a code read.
Spawning the modeler
Omit "model" and "reasoning_effort": the server spawn defaults (Settings → Spawn defaults) apply. Pass either explicitly to keep cost down, with "engine" alongside it, since both are validated per engine (see ccc-orchestration § 2 for the per-engine effort ladders). CCC appends the return-address footer (report_to), so the modeler injects its ledger back to you when it finishes.
Waiting for the report
After spawning, end your turn. Tell the user a threat modeler is mapping the change and give its session id. The ledger arrives by injection (report_to) — do not poll or sleep-loop. If it never arrives, check GET /api/sessions/spawned for whether the child is still alive.
When the report arrives
The ledger is a to-do list ranked for you, not a verdict:
- CRITICAL / HIGH gaps — route each into
/security-review(point it at the
exact file:line and abuse case) and fix before shipping. For a public repo these ship the moment you push, so treat an unmitigated HIGH like a release blocker.
- MEDIUM — fix or consciously accept with a comment saying why.
- LOW — note and move on.
- A gap with an existing mitigation the modeler quoted is not a finding —
confirm the mitigation actually covers the case, then close it.
Before touching server.py network binding, origin checks, or path validation off the back of this, re-read SECURITY.md — the ledger tells you where to look, that file tells you what the intended posture is.
Dry run
If the arguments contain dry-run, print the exact payload — session count (1), the full modeler prompt with the scope, boundary, and threat context filled in, and the target repo — and POST nothing.
When CCC is down
If CCC_DOWN=1 or the spawn curl returns connection refused (exit 7), fall back to the built-in Task tool subagent with the same defensive threat-model prompt. The value here is the independent adversarial framing — you designed the feature, so you rationalize its safety — and a subagent supplies that just as well; you lose only kanban visibility. Never pretend the CCC spawn ran.
What this is not
- Not
/security-review— that scans code for known vulnerability classes and
reports concrete findings in what exists. Threat-model runs before it and feeds it: it maps the abuse surface of a change so the review knows where to aim. Run threat-model to decide what to worry about; run /security-review to confirm each worry against the code.
- Not
wt critiqueor/code-review— those judge whether the change is
correct and well-built. This assumes it works and asks how it's abused.
- Not a red-team with attack tooling — it writes no exploits and runs nothing
against a live target. It's a design-level threat map. If a gap needs a live proof-of-concept, that's a separate, explicitly authorized exercise, not this.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugin/skills/threat-model/SKILL.md
Popularity
- Repository stars
- 200
- Repository forks
- 26
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/amirfish1/claude-command-center/threat-model)