Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Best Practices Diagram Design

ASecurity

Validate diagram meaning and rendered geometry before publication. Use when selecting or reviewing flowcharts, decision trees, sequences, lifecycles, fanouts, swimlanes, C4/architecture diagrams, or Excalidraw templates.

7 stars
0 votes
0 copies
0 views
Added 9/23/2026
code-qualitypythonrustgobashnodegit

Works with

terminalcli

Security Analysis

A100/100

Scanned 9/23/2026

Install to Claude Code

$npx -y skills add grahama1970/agent-skills --skill best-practices-diagram-design --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Best Practices Diagram Design?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Best Practices Diagram Design
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/grahama1970-best-practices-diagram-design/badge)](https://www.skillsdirectory.com/skills/grahama1970-best-practices-diagram-design)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: best-practices-diagram-design
description: >
  Validate diagram meaning and rendered geometry before publication. Use when
  selecting or reviewing flowcharts, decision trees, sequences, lifecycles,
  fanouts, swimlanes, C4/architecture diagrams, or Excalidraw templates.
triggers:
  - design a diagram
  - diagram design
  - diagram template
  - decision tree vs flowchart
  - diagram legibility
  - review a diagram
provides:
  - diagram-semantic-validation
  - rendered-diagram-geometry-validation
  - diagram-template-eligibility-guidance
composes:
  - create-architecture
  - ops-excalidraw
  - create-svg
  - jev
  - agentic-evals
complies:
  - best-practices-skills
  - best-practices-python
taxonomy:
  - validation
  - ui-design-engineering
runtime_self_improvement: basic
---

# best-practices-diagram-design

A diagram passes only when it preserves the approved process **and** its rendered scene is legible. Do not reject a star merely because it is star-shaped, or a connector merely because it is straight. A star can correctly show independent relationships; a beautifully routed drawing can still describe the wrong process.

## Required acceptance chain

```text
requirements → semantic spec → semantic checks → render → measured scene
             → geometry checks → screenshot review → publication
```

Missing adapters, fonts, or mandatory checks mean `UNVERIFIED`, never PASS.

## 1. Record immutable requirements

Before choosing a view, record source-backed `requirements` in the typed JSON spec:

- `intent`
- `required_order`
- `required_preconditions[]`: `{target, gate, outcome}`
- `required_outcome_targets[]`: `{gate, outcome, target}`

Rendering and layout repair must not alter this fragment. This proves preservation of an approved contract; it does not prove the contract was extracted correctly.

## 2. Choose the semantic view, then the renderer

| Reader question | View |
|---|---|
| What happens next, including decisions, retries, and shared endings? | `flowchart` |
| Which mutually exclusive choices lead to distinct leaves? | strict `decision_tree` |
| Which actor sends what, and in what order? | `sequence` |
| What states exist and what triggers transitions? | `lifecycle` |
| What exists, owns, contains, or depends on what? | `structure` |
| What executes concurrently and how does it complete? | `flowchart` with typed fork/join |
| What independent relationships radiate from one source? | `fanout` |

The gated-escalation example is a **flowchart**, because success branches merge into a shared `resume` endpoint. “Acquire lock” is an action; “Lock acquired?” is a decision.

## 3. Run semantic checks

```bash
./run.sh check path/to/spec.json --json
```

The checker uses `node.kind` (`action`, `decision`, `terminal`, `handoff`, `fork`, `join`) as canonical semantics and examines control-flow edges separately from annotations/dependencies.

Important deterministic errors:

- `INTENT_VIEW_MISMATCH`
- `REQUIRED_RELATION_MISSING`
- `REQUIRED_ORDER_VIOLATED`
- `PRECONDITION_BYPASS` — includes a concrete bypass path
- `UNREACHABLE_PROCESS_NODE`
- `TERMINAL_HAS_CONTINUATION`
- `DECISION_OUTCOMES_INVALID`
- `BRANCH_LABEL_MISMATCH`
- `TREE_TOPOLOGY_INVALID`
- `MISSING_GATES`, `UNLABELED_BRANCH`, `MISSING_TERMINAL_STATE`

`CONDITION_COVERAGE_UNVERIFIED` is advisory for free-text predicates without a finite Boolean/enum domain. `LABEL_TOO_LONG` is authoring guidance; measured fit is the hard rendered gate. `FANOUT_TOO_MANY` is the current `create-svg` adapter ceiling, not a universal design rule.

### Why `PRECONDITION_BYPASS` matters

For each required `{target, gate, outcome}`, the checker removes that required gate/outcome edge and searches from every entry. If the target remains reachable, the process is wrong regardless of layout. A fanout star that bypasses tier gates fails; a legitimate independent fanout passes.

## 4. Select a template or renderer

Use the typed local catalog at `fixtures/template-catalog.json` rather than redrawing repeated patterns. A governed request supplies `requirements` `{intent, view, data, steps}`. Deterministic eligibility admits only catalog assets that exist locally, match `view`, have every `required_data` key, and meet `min_steps`; the sorted resulting paths are the closed candidate set.

`ops-excalidraw select-template` invokes `skills/jev/run.sh ask` itself only with explicit `--allow-egress`. Its supplied questions file must offer exactly the eligible template IDs plus `ABSTAIN`; Jev's `jev.decision.v2` accepted choice is mapped to the catalog's existing asset path. A selection receipt binds requirements/catalog hashes, eligible IDs/paths, selected asset, Jev status/confidence, and Jev request/state/questions hashes plus resolved model. Caller-authored choice/path JSON is not accepted by the production command. `replay-template-selection` is deterministic validation of a real v2-shaped receipt and its hashes/options, not a live selection. Governed render/push validates that receipt; ordinary commands remain ungoverned.

`ops-excalidraw` owns parameterized template rendering. This skill owns eligibility and acceptance. A template passing once does not qualify all populated instances.

## 5. Check actual rendered geometry

For the implemented Graphviz SVG adapter:

```bash
./run.sh geometry rendered.svg --json
```

It reads renderer-produced shapes, text, paths, transforms, stroke widths, and viewport. It does not trust author-written collision metadata.

Deterministic errors:

- `NODE_OVERLAP`
- `TEXT_OUTSIDE_CONTAINER`
- `EDGE_TEXT_INTERSECTION`
- `EDGE_NODE_INTERSECTION`
- `CONTENT_CLIPPED`

`ROUTING_NOT_REALIZED` is advisory. A clean straight edge passes; an orthogonal or curved edge crossing text fails. Geometry support is currently Graphviz SVG only. Mermaid and Excalidraw remain `UNVERIFIED` until normalized-scene adapters and fixtures exist; see `references/roadmap.md`.

## 6. Screenshot acceptance

Inspect the actual intended reading size with Surf/`ops-excalidraw`: reading order, emphasis, crowding, branch comprehension, and whether the diagram answers its stated question. Screenshot judgment supplements semantic and geometry checks; it cannot replace them.

## Validation

```bash
bash sanity.sh
```

The retained mutations prove: a correct gated escalation passes; a relabeled star and an unrelated-gate variant still fail by semantics; a direct tier bypass returns a path; swapped branch labels fail; a five-target independent fanout passes semantics but hits only the adapter ceiling; clean straight Graphviz geometry passes; overlap, overflow, and connector intersection fixtures fail.

Research provenance: `references/webgpt-design-review.md`. Template plan: `references/template-catalog.md`.

Attribution

grahama1970grahama1970
View sourceMore from grahama1970 →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Caveman Review

Ultra-compressed code review comments. Cuts noise from PR feedback while preserving the actionable signal. Each comment is one line: location, problem, fix. Use when user says "review this PR", "code review", "review the diff", "/review", or invokes /caveman-review. Auto-triggers when reviewing pull requests.

1066601 votes

Caveman Commit

Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.

1066601 votes

Springboot Verification

Verification loop for Spring Boot projects: build, static analysis, tests with coverage, security scans, and diff review before release or PR.

2456590 votes

Verification Loop

一个全面的 Claude Code 会话验证系统。

2456590 votes

Django Verification

Verification loop for Django projects: migrations, linting, tests with coverage, security scans, and deployment readiness checks before release or PR.

2456590 votes
View all in code-quality →