本文へ移動
cccskills
無料GitHub で公開

decisions-mermaid-diagrams

Use Mermaid diagrams in DecisionsAI to explain technical topics — architecture, flows, sequences, and data models via the freestanding diagram viewer.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.4 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Decisions Mermaid Diagrams

When explaining something technical — architecture, request flows, state machines, database relationships, deployment topology, or multi-step processes — prefer a Mermaid diagram over a long prose outline.

When to diagram

Use a diagram when the user would benefit from seeing structure or flow:

  • System or module architecture
  • API / request sequences
  • State transitions
  • ER or data relationships
  • CI/CD or workflow pipelines
  • Before/after refactors

Skip diagrams for trivial one-line answers, pure opinion, or non-structural content.

Related surfaces (not Mermaid)

NeedSkill
Rich implementation plan with wireframes + approval gatevisual-plan (BuilderIO) via decisions-visual-plan
PR/branch visual recapvisual-recap
UI prototype, deck, motion, hand-drawn whiteboarddecisions-open-design

Use Mermaid for text-native technical graphs the agent can store in diagram History. Use Open Design for pixel/CSS artifacts and branded deliverables.

How to show diagrams

In DecisionsAI chat (server agent)

Open the viewer only (user says "open the mermaid viewer", no diagram yet):

  • Call open_page with page="diagram viewer", or
  • Call show_mermaid_diagram with empty mermaid_code (reopens the last diagram from History, or a blank editor).

Do not ask what diagram to show — open the viewer immediately.

Show a specific diagram:

Call show_mermaid_diagram with:

  • mermaid_code — valid Mermaid source (no markdown fences)
  • title — short label for the viewer window (e.g. "Auth flow", "Module layout")

This opens a freestanding viewer window where the user can:

  • See the rendered diagram
  • Edit the Mermaid source and re-render
  • Export PNG or JPEG
  • Copy the diagram image or source code to the clipboard
  • Browse History in the viewer sidebar (recent diagrams are saved locally)
  • Google Drawing export when Google is connected (Settings → Advanced)

In chat replies

You may still include a ```mermaid fenced block in markdown. Chat renders an Open diagram control that opens the same viewer.

In Cursor (this IDE)

For standalone analytical artifacts in Cursor chat, a canvas may still be appropriate for data-heavy output. For classic Mermaid node/graph diagrams in DecisionsAI, use show_mermaid_diagram or fenced mermaid blocks.

Mermaid quality bar

  • One diagram = one idea. Split overloaded charts.
  • Short node labels (2–4 words). Put detail in chat prose.
  • Prefer flowchart TD / sequenceDiagram / stateDiagram-v2 / erDiagram as appropriate.
  • Left-to-right or top-down flow; avoid spaghetti crossing edges when possible.

Example

show_mermaid_diagram(
  title="Chat message path",
  mermaid_code='''sequenceDiagram
    participant U as User
    participant W as Web UI
    participant A as Agent
    U->>W: send message
    W->>A: POST /api/chats/{id}/messages
    A-->>W: stream tokens
    W-->>U: render reply'''
)

Reference

  • Viewer page: /diagram/
  • API: POST /api/diagrams → { id, viewer_path }
  • Library: /static/vendor/mermaid/mermaid.min.js (Mermaid 11)

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA standards. Use this skill to generate semantic ARIA for Web and accessibility traits for Web and Native platforms (iOS/Android).

日本語の概要は準備中です。原文の説明を表示しています。

tensology/decisionsai172026年10月13日 更新

Whole site or product — a full web accessibility (a11y) audit against WCAG 2.2, following the WCAG-EM methodology. Defines scope, samples representative pages and flows, runs the automated tier (`accessibility-scan`) and the hands-on manual tier (`accessibility-inspect`), and produces one conformance report. Grades each finding by severity and evidence basis, and states per-criterion conformance as pass, fail, or undetermined (needs a human). Use it for 'audit my site for accessibility', 'is this product accessible', 'a11y audit', 'WCAG or Section 508 conformance report', or any multi-page assessment. Assesses; does not fix (use `accessibility-fix`) or diff (use `accessibility-diff`). For a single page use `accessibility-scan`; for hands-on keyboard and screen-reader checks use `accessibility-inspect`.

日本語の概要は準備中です。原文の説明を表示しています。

tensology/decisionsai172026年10月13日 更新

Regression check — diff a live page's web accessibility (a11y) violations against a baseline. By default it compares your uncommitted changes (stash-based); pass `--branch [<name>]` to compare against a branch. Reports the new WCAG violations introduced, the ones fixed, and the count of pre-existing ones. Use it for 'did my change break accessibility', 'what a11y issues did this PR add', or as a CI gate. For a full scan of one page use `accessibility-scan`; for a whole site use `accessibility-audit`.

日本語の概要は準備中です。原文の説明を表示しています。

tensology/decisionsai172026年10月13日 更新

Remediation only — repair web accessibility (a11y) violations against WCAG 2.2 with a baseline, edit, and verify loop. Takes a target (URL, files, directory) or a findings worklist from `accessibility-scan`/`accessibility-inspect`/`accessibility-audit`, applies mechanical fixes as given, leaves TODOs for visual or contextual judgment, and verifies by re-running the baseline check. It only fixes. To find issues use `accessibility-scan` (one page, automated), `accessibility-inspect` (one page, manual), or `accessibility-audit` (whole site, WCAG-EM); to check for regressions use `accessibility-diff`. Use it for 'fix the a11y issues in X', 'make this accessible', 'add missing alt text and labels', 'apply these accessibility fixes', 'remediate these violations'.

日本語の概要は準備中です。原文の説明を表示しています。

tensology/decisionsai172026年10月13日 更新

One page, hands-on manual tier — drive a live page through the web accessibility (a11y) checks a rule engine can't decide: keyboard operation and focus order, screen-reader names, roles and states from the accessibility tree, reflow and zoom, reduced motion, form errors, and target size. Grades each finding by evidence basis (verified / confirm-with-a-human / human-required) and severity, and closes every criterion in a ledger: verified, flagged, not exercised, or N/A. Locates and assesses; does not fix (use `accessibility-fix`). Use it for keyboard testing, focus-order checks, screen-reader or a11y-tree review, reflow and zoom at 200%, or 'is this operable, not just lint-clean'. The automated tier is `accessibility-scan`; `accessibility-audit` runs both across a sampled site.

日本語の概要は準備中です。原文の説明を表示しています。

tensology/decisionsai172026年10月13日 更新

One page, automated tier — run the web accessibility (a11y) rule engine against a live page and locate every violation it can detect mechanically. Pass a URL, a config target name (e.g. `accesslint:accessibility-scan dev`), or nothing to use the default target from `accesslint.config.json`. Ensures a debuggable Chrome, runs the @accesslint/core engine over CDP, and returns a worklist of live-DOM WCAG 2.2 violations, each grounded to its DOM selector and source `file:line`. Locates; doesn't edit. Use it for 'is this page accessible', 'check a11y on this URL', 'find contrast and alt-text issues', or to verify a UI change. For hands-on keyboard and screen-reader checks use `accessibility-inspect`; for a whole site or product use `accessibility-audit`; to diff against uncommitted changes or a branch use `accessibility-diff`.

日本語の概要は準備中です。原文の説明を表示しています。

tensology/decisionsai172026年10月13日 更新

tensology のスキルをすべて見る

このスキルの問題を報告する