ingest-cwe-taxonomies

ingest-cwe-taxonomies is a command for Claude Code, GitHub Copilot from microsoft/PromptKit. It costs 18 tokens per session (8,964 once invoked), scanned A, original, MIT.

A command that reads MITRE's CWE XML, a catalog of common software weakness types, and generates security-audit taxonomies for each software domain in PromptKit. The process can be rerun when MITRE publishes a new release.

In plain words
What is it for?
Use it to download or read a CWE source file, map weakness classes to domains, and regenerate the corresponding PromptKit taxonomy files.
Why use it?
It keeps audit categories tied to an official, versioned source and limits each audit to weakness types relevant to its domain.

Command for Claude CodeGitHub Copilot ✓ vendor

Written for Claude Code and GitHub Copilot: argument-hint in frontmatter, but also a Copilot chat mode or prompt. Also seen: agent in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/ingest-cwe.py <path-to-cwe-xml>.

Good fit Use it to download or read a CWE source file, map weakness classes to domains, and regenerate the corresponding PromptKit taxonomy files.

Compare 6 commands from other repositories ↓
About the project

PromptKit is a version-controlled library of reusable prompt components for engineering work, including personas, reasoning protocols, output formats, and task templates. Engineers use it to create repeatable prompts for activities such as specification work, debugging, code review, security audits, and change management across multiple engineering fields. The catalogue add-ons provide agent workflows for using this prompt-engineering system.

microsoft/PromptKit · 105 stars · on GitHub

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/microsoft/PromptKit
agentmods
npx agentmods add commands/microsoft/promptkit/ingest-cwe-taxonomies

Made for: Claude Code, GitHub Copilot.

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 ingest-cwe-taxonomies

README.md
[![agentmods](https://agentmods.dev/badge/commands/microsoft/promptkit/ingest-cwe-taxonomies/github.svg)](https://agentmods.dev/commands/microsoft/promptkit/ingest-cwe-taxonomies)
Your own site
<a href="https://agentmods.dev/commands/microsoft/promptkit/ingest-cwe-taxonomies"><img src="https://agentmods.dev/badge/commands/microsoft/promptkit/ingest-cwe-taxonomies/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 ingest-cwe-taxonomies

Your own site · 80×15
<a href="https://agentmods.dev/commands/microsoft/promptkit/ingest-cwe-taxonomies"><img src="https://agentmods.dev/badge/commands/microsoft/promptkit/ingest-cwe-taxonomies.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 8,964 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.00018 $0.08964
Opus 5 $0.00009 $0.04482
Sonnet 5 $0.00004 $0.01793
Haiku 4.5 $0.00002 $0.00896

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

Security

Grade A, and why

ingest-cwe-taxonomies 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 5d 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.

.github/prompts/ingest-cwe-taxonomies.prompt.md · 858 lines

How it starts

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

Ingest CWE Taxonomies

You are executing the CWE taxonomy ingestion pipeline for PromptKit. Your mission is to parse the official MITRE CWE corpus, apply domain-scoped mapping rules, and generate per-domain PromptKit taxonomy files that constrain security audits to only the CWE classes relevant to each software domain. This pipeline is versioned and reproducible — it can be re-run whenever MITRE publishes a new CWE release.

The CWE source is: ${input:cwe_source:Path to CWE XML file or "latest" to download cwec_latest.xml.zip from MITRE}

Role

You are a principal security engineer with extensive experience in vulnerability research, penetration testing, and secure software architecture. Your expertise spans:

  • Vulnerability classes: buffer overflows, integer overflows, format string bugs, injection attacks (SQL, command, LDAP), deserialization flaws, TOCTOU races, privilege escalation, and cryptographic misuse.
  • Threat modeling: STRIDE, attack trees, trust boundary analysis, and data flow diagramming.
  • Secure design: principle of least privilege, defense in depth, secure defaults, input validation strategies, and authentication/authorization architectures.
  • Standards and compliance: OWASP Top 10, CWE/CVE taxonomy, NIST frameworks.

Behavioral Constraints

  • You adopt an adversarial mindset. For every interface, function, or data flow, you ask: "How can this be abused?"
  • You classify findings by severity (Critical / High / Medium / Low / Informational) with clear justification.
  • You distinguish between confirmed vulnerabilities (you can describe a concrete exploit path) and potential weaknesses (conditions that could lead to exploitation under certain assumptions).
  • You never dismiss a concern as "unlikely" without analyzing the threat model.
  • You provide actionable remediation guidance for every finding.
  • When you lack sufficient context to assess a risk, you state what information is needed and what the worst-case assumption would be.

Read the full file on GitHub · 858 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. 5d ago First seen · 858 lines · 18 tokens per session scan A b35e8b8206d5

Subscribe to this mod's changes

ingest-cwe-taxonomies is a command published in the GitHub repository microsoft/PromptKit (105 stars, last pushed today), licensed MIT. It adds 18 tokens to every session and 8,964 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-09-14.