threat-hcl-new

threat-hcl-new is a command for Claude Code from threatcl/claude-plugin. It costs 19 tokens per session (966 once invoked), scanned A, original, MIT.

A command that creates a new Threatcl threat-model file, which documents possible security threats to a system. It fills in the cloud connection details needed by Threatcl.

In plain words
What is it for?
Use it to start a named Threatcl model in the appropriate project folder and prepare it for cloud-based threat-modeling tools.
Why use it?
It removes the repetitive setup work and avoids using a guessed organization identifier that could make later uploads fail.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the threatcl-cloud plugin — 1 skill, 5 commands, 1 MCP server shipped together

Good fit Use it to start a named Threatcl model in the appropriate project folder and prepare it for cloud-based threat-modeling tools.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/threatcl/claude-plugin/threat-hcl-new
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/threatcl/claude-plugin

Made for: Claude Code.

Or install threatcl-cloud, the plugin that ships this one along with the rest of its 1 skill, 5 commands, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for threat-hcl-new

README.md
[![agentmods](https://agentmods.dev/badge/commands/threatcl/claude-plugin/threat-hcl-new/github.svg)](https://agentmods.dev/commands/threatcl/claude-plugin/threat-hcl-new)
Your own site
<a href="https://agentmods.dev/commands/threatcl/claude-plugin/threat-hcl-new"><img src="https://agentmods.dev/badge/commands/threatcl/claude-plugin/threat-hcl-new/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for threat-hcl-new

Your own site · 80×15
<a href="https://agentmods.dev/commands/threatcl/claude-plugin/threat-hcl-new"><img src="https://agentmods.dev/badge/commands/threatcl/claude-plugin/threat-hcl-new.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 966 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.00966
Opus 5 $0.00010 $0.00483
Sonnet 5 $0.00004 $0.00193
Haiku 4.5 $0.00002 $0.00097

Measured 9d ago against content hash 4b79d318dbc4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

threat-hcl-new scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/threat-hcl-new.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are creating a new Threatcl HCL threat model file. The argument string $ARGUMENTS is the model name (and optionally a short description after the first word group). If it's empty, ask the user for a name and stop.

1. Resolve the org slug

Run threatcl cloud whoami. Capture the org slug from the output — it goes into the backend block. If multiple orgs are listed, ask which one to scaffold for.

If whoami fails with an auth error, tell the user to run threatcl cloud login and stop. Don't try to write the file with a placeholder slug — threatcl cloud push will fail anyway.

2. Pick a filename

Slugify the model name to kebab-case and suffix with .tm.hcl (e.g. Payment Servicepayment-service.tm.hcl). Write to the current working directory unless the user already has a threatmodels/ or models/ directory — in which case write there.

The .tm.hcl suffix is threatcl's convention and it matters for tooling: threatcl/drift-action discovers *.tm.hcl at the repo root (a bare root-level *.hcl is deliberately skipped so its own .threatcl-ci.hcl config is never mistaken for a model), and editors scope the threatcl lsp language server on the same suffix to avoid colliding with Terraform. The threatcl CLI itself accepts either.

If the chosen path already exists, stop and ask the user before overwriting.

3. Write the file

Use this template, filling in the org slug and model name:

spec_version = "0.8.0"

backend "threatcl-cloud" {
  organization = "<org-slug>"
  # threatmodel slug is added automatically on first `threatcl cloud push`
}

threatmodel "<Model Name>" {
  description = "<one-sentence description, from $ARGUMENTS or a sensible default>"
  author      = "<git config user.name, falling back to '@team'>"

  attributes {
    new_initiative  = "true"
    internet_facing = "false"
    initiative_size = "Medium"
  }

  # Add information_asset blocks for the data this system handles, e.g.
  # information_asset "user records" {
  #   description                = "Names, emails, hashed passwords"
  #   information_classification = "Confidential"
  # }

  # Add usecase blocks describing what the system is supposed to do.
  # usecase {
  #   description = "Customers sign in to view their account"
  # }

  # Sample threat — replace or expand. Reference library items with `ref`
  # when one applies (search with `threatcl cloud search -type threats`).
  threat "Example threat — replace me" {
    description = "Describe the threat in one or two sentences"
    impacts     = ["Confidentiality"]
    stride      = ["Info Disclosure"]

    control "Example control — replace me" {
      description    = "How this threat is mitigated"
      implemented    = false
      risk_reduction = 50
    }
  }
}

Read the full file on GitHub · 89 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 89 lines · 19 tokens per session scan A 4b79d318dbc4

Subscribe to this mod's changes

threat-hcl-new is a command published in the GitHub repository threatcl/claude-plugin (4 stars, last pushed 24d ago), licensed MIT. It adds 19 tokens to every session and 966 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.