dfd-example
A standalone data-flow diagram with its trust boundaries explained, to illustrate the notation before you build your own. The system: a file-upload feature where users upload documents that a worker processes.
$ npx -y skills add vanara-agents/skills --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
Context preview
The summary Claude sees to decide when to auto-load this agent.
A standalone data-flow diagram with its trust boundaries explained, to illustrate the notation before you build your own. The system: a file-upload feature where users upload documents that a worker processes.
Agent definition
dfd-example.mdDFD Example — Annotated
A standalone data-flow diagram with its trust boundaries explained, to illustrate the notation before you build your own. The system: a file-upload feature where users upload documents that a worker processes.
The diagram
TRUST BOUNDARY A: Internet ││ App tier TRUST BOUNDARY B: App tier ┊┊ Worker tier
(E1) User ──1: HTTPS PUT /files (JWT)──►││──► (P2) Upload API ──2: store object──►││──► (DS3) Object Store
││ │ ││
││ └──3: enqueue job────────────►││──► (DS4) Job Queue
││ ┊┊
││ (P5) Worker ◄──4: dequeue──┊┊── (DS4) Job Queue
││ │
││ └──5: read object──► (DS3) Object Store
││ │
││ └──6: write result──► (DS6) Results DB
Legend: (E)=external entity (P)=process (DS)=data store
N: numbered data flow ││ = network/privilege boundary ┊┊ = process/tier boundaryWhy the boundaries are where they are
- **Boundary A (Internet → App tier):** flow 1 carries untrusted, attacker-controllable input — the file
bytes, the filename, the content-type header, and the JWT. Everything arriving here must be authenticated (Spoofing), authorized (Elevation of privilege), and validated (Tampering). This is the single most important boundary in the system.
- **Boundary B (App tier → Worker tier):** the job queue is a *trust boundary even though it's internal*.
The worker (P5) consumes whatever the Upload API enqueued plus the object it stored. If an attacker can influence the filename or object contents, the worker is processing attacker-controlled data — so parsing in P5 (think: image/PDF/zip parsers) is a prime Tampering and Elevation-of-privilege target, even though no public flow touches the worker directly.
Threats that fall out of this diagram
Reading along the crossing flows:
- **Flow 1 → P2:** unrestricted file upload (a `.php`/`.svg` masquerading as an image) → Elevation of
privilege / stored XSS. Path traversal in the filename → Tampering of the object store.
- **DS3 Object Store:** public-readable bucket → Information disclosure of other users' files.
Missing ownership check on later retrieval → IDOR (Elevation of privilege).
- **Flow 4 → P5:** a malicious file enqueued earlier is parsed by the worker → memory-corruption or
decompression-bomb DoS in the parser. The worker often runs with more privileges than the API — a parser exploit here is high impact.
- **DS6 Results DB:** if results include rendered user content, stored XSS can resurface when displayed.
Takeaways
1. Internal queues and worker tiers are still behind trust boundaries — model them. 2. The most dangerous element is often not the public API but the *background process* that parses what the public API accepted. 3. Number flows so the threat table can reference them unambiguously (e.g. "T-flow1-E", "T-flow4-T").
Read more
DFD Example — Annotated
A standalone data-flow diagram with its trust boundaries explained, to illustrate the notation before you build your own. The system: a file-upload feature where users upload documents that a worker processes.
The diagram
TRUST BOUNDARY A: Internet ││ App tier TRUST BOUNDARY B: App tier ┊┊ Worker tier
(E1) User ──1: HTTPS PUT /files (JWT)──►││──► (P2) Upload API ──2: store object──►││──► (DS3) Object Store
││ │ ││
││ └──3: enqueue job────────────►││──► (DS4) Job Queue
││ ┊┊
││ (P5) Worker ◄──4: dequeue──┊┊── (DS4) Job Queue
││ │
││ └──5: read object──► (DS3) Object Store
││ │
││ └──6: write result──► (DS6) Results DB
Legend: (E)=external entity (P)=process (DS)=data store
N: numbered data flow ││ = network/privilege boundary ┊┊ = process/tier boundaryWhy the boundaries are where they are
- **Boundary A (Internet → App tier):** flow 1 carries untrusted, attacker-controllable input — the file
bytes, the filename, the content-type header, and the JWT. Everything arriving here must be authenticated (Spoofing), authorized (Elevation of privilege), and validated (Tampering). This is the single most important boundary in the system.
- **Boundary B (App tier → Worker tier):** the job queue is a *trust boundary even though it's internal*.
The worker (P5) consumes whatever the Upload API enqueued plus the object it stored. If an attacker can influence the filename or object contents, the worker is processing attacker-controlled data — so parsing in P5 (think: image/PDF/zip parsers) is a prime Tampering and Elevation-of-privilege target, even though no public flow touches the worker directly.
Threats that fall out of this diagram
Reading along the crossing flows:
- **Flow 1 → P2:** unrestricted file upload (a `.php`/`.svg` masquerading as an image) → Elevation of
privilege / stored XSS. Path traversal in the filename → Tampering of the object store.
- **DS3 Object Store:** public-readable bucket → Information disclosure of other users' files.
Missing ownership check on later retrieval → IDOR (Elevation of privilege).
- **Flow 4 → P5:** a malicious file enqueued earlier is parsed by the worker → memory-corruption or
decompression-bomb DoS in the parser. The worker often runs with more privileges than the API — a parser exploit here is high impact.
- **DS6 Results DB:** if results include rendered user content, stored XSS can resurface when displayed.
Takeaways
1. Internal queues and worker tiers are still behind trust boundaries — model them. 2. The most dangerous element is often not the public API but the *background process* that parses what the public API accepted. 3. Number flows so the threat table can reference them unambiguously (e.g. "T-flow1-E", "T-flow4-T").
🐒 Free agents, skills & packs for Claude Code One subscription. An army of Claude Code agents. 30 production-grade agents, skills, and packs for Claude Code — free, Apache-2.0, install with one command.
Repo: vanara-agents/skills
Other agents on vanara-agents-skills.
- AGENT
Use when designing a new HTTP/GraphQL API or changing an existing one — modeling resources, defining endpoint contracts, choosing status codes, pagination, filtering, error envelopes, versioning, and idempotency. Produces a reviewable API contract plus an OpenAPI snippet, not
Open agent - review-notes
This shows how the api-designer agent reviews a flawed draft. Findings are severity-ranked so the implementer fixes the contract-breakers first. Severity legend: **CRITICAL** (breaks clients / data risk), **HIGH** (real bug or inconsistency), **MEDIUM** (maintainability),
Open agent - contract-and-openapi
The contract is the deliverable. Express it as an **OpenAPI 3.1** document so it is human-readable *and* machine-checkable. This reference covers how to structure that document and what `scripts/lint-openapi.mjs` enforces.
Open agent - design-checklist
Run through this before declaring an API contract done. It is ordered the way you should *design*: resources first, cross-cutting rules last. Every box is a place real APIs go wrong in production.
Open agent - versioning-and-evolution
APIs are forever once published: a consumer you've never met may depend on any field you expose. Design so you can **add without breaking**, and version explicitly when you must break.
Open agent - pr-comment-template
Copy-paste templates for leaving review comments. Keep each comment to one finding: an anchor, the problem, and the fix.
Open agent

