dfd

Generate Data Flow Diagrams with trust boundaries and data classifications from codebases.

489|254|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/me2resh/apexyard --skill dfd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dfd
Source: https://github.com/me2resh/apexyard/tree/main/.claude/skills/dfd
Command: npx skills add https://github.com/me2resh/apexyard --skill dfd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Turns a codebase into a clear, reviewable Data Flow Diagram (DFD) with explicit trust boundaries and data classifications so security and compliance work can start from one reliable source of truth.

Core Features & Use Cases

  • Canonical DFD production: Extracts external actors, processes, data stores, data flows, trust boundaries, and per-element data classifications from code using a six-axis discovery pass.
  • STRIDE-ready outputs: Produces Mermaid DFD documentation and (optionally) Threat Dragon v2 JSON so downstream threat modelling and GDPR/compliance checks can consume the same diagram.
  • Human-in-the-loop correctness: Presents a candidate model for operator review and supports overwrite prompts with drift-aware re-run behavior.

Quick Start

Ask for a system-wide DFD draft by running: /dfd billing-api --scope-all

Frequently Asked Questions about dfd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a Data Flow Diagram from a codebase for threat modeling?

To generate a Data Flow Diagram from a codebase, use a six-axis discovery pass to extract actors, processes, stores, flows, and trust boundaries, then output Mermaid documentation for STRIDE threat modeling and GDPR compliance analysis.

Can I export a DFD to Threat Dragon JSON for GDPR compliance analysis?

Yes, you can export a DFD to Threat Dragon v2 JSON. This optional output provides a standardized format for downstream threat modeling and GDPR compliance checks to consume the same diagram data.

What is the best way to map trust boundaries and data classifications across multiple services?

Mapping trust boundaries and data classifications across services requires a system-wide composition scan. This approach applies additive classification using annotations, environment heuristics, and schema heuristics across all registered services to produce a unified diagram.

How do STRIDE threat modeling and data classification heuristics work together?

STRIDE threat modeling and data classification heuristics work together by applying schema and environment heuristics to diagram elements. This additive classification provides the necessary evidence for GDPR compliance checks during the threat modeling process.

Does the DFD generation process support human-in-the-loop review for drift correction?

Yes, the DFD generation process supports human-in-the-loop review by presenting a candidate model for operator review. It features overwrite prompts and drift-aware re-run behavior to maintain diagram accuracy over time.