MCP HubMCP Hub
SKILL·5727F9

dashmotion

csthink
업데이트됨 22 days ago
7 조회
154
10
154
GitHub에서 보기
메타aiautomationdata

정보

Dashmotion은 어두운 테마의 애니메이션 기술 다이어그램을 독립형 HTML+SVG 파일로 생성하며, 유동적인 커넥터와 움직이는 빛 점을 통해 동적 프로세스를 시각화합니다. 플로우차트, 아키텍처 다이어그램 작성이나 Mermaid 코드를 애니메이션 시각 자료로 변환하여 문서, 데모 또는 랜딩 페이지에 활용하기에 이상적입니다. 데이터 흐름, 요청 또는 작업과 같은 움직임을 보여줘야 하는 다이어그램이 정적 이미지 대신 필요할 때 사용하세요.

빠른 설치

Claude Code

추천
기본
npx skills add csthink/dashmotion -a claude-code
플러그인 명령대체
/plugin add https://github.com/csthink/dashmotion
Git 클론대체
git clone https://github.com/csthink/dashmotion.git ~/.claude/skills/dashmotion

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Dashmotion

Create professional animated technical diagrams as single self-contained HTML files. The name is the implementation: stroke-dashoffset animation + animateMotion — that's all there is. Output is vector, loops forever, weighs a few KB, and opens in any browser.

Step 1 — Pick the mode

User wantsModeRead
Steps, sequence, branching, parallel execution, state transitions ("what happens, in what order")Flowreferences/flow-mode.md + resources/template-flow.html
Components, services, infrastructure, containment, topology ("what the system is made of")Architecturereferences/architecture-mode.md + resources/template-architecture.html

Mixed request ("show our microservices AND how an order flows through them") → Architecture mode; the animated request path is the flow. Only produce two separate files if the process has branching logic that the topology can't express.

Mermaid input — if the request contains Mermaid source (a ```mermaid block, a .mmd file, or pasted code), ALSO read references/mermaid-input.md before anything else. Supported: flowchart/graph and stateDiagram-v2; other diagram types are unsupported — say so and offer alternatives. The mode routing above still applies (mermaid is syntax, not semantics), and layout is always recomputed top-down regardless of the source's declared direction.

Read the mode reference file before you start. Its layout arithmetic is what scripts/layout.py implements (Step 5) — read it to author a clean semantic graph and to apply the color/shape/animation style layer to the script's geometry (and to hand-compute the fallback). It encodes what prevents the common failures: overlaps, arrows through boxes, broken loops.

Step 2 — The two animation contracts (both modes)

Flowing dashed connectors — stroke-dashoffset

.flow { stroke-dasharray: 5 5; animation: dashmove 0.75s linear infinite; }
@keyframes dashmove { to { stroke-dashoffset: -10; } }
  • The offset delta MUST equal one full stroke-dasharray period (here 5+5=10), or the loop visibly jumps.
  • Negative offset flows in the path's drawing direction → always author connector d from source to target.
  • 0.6–0.9s reads as "electric current"; slower than 1.5s reads as broken.

Traveling dots — <animateMotion>

<circle r="3.5" class="dot" fill="#34d399">
  <animateMotion dur="2s" repeatCount="indefinite"
    path="M400 178 L400 204 L170 204 L170 222"/>
</circle>
  • path reuses the connector's d verbatim; the dot rides exactly on the line.
  • The circle has no cx/cyanimateMotion positions it.
  • Stagger with begin="0.7s" etc. 3–6 dots total per diagram; put them where direction is informative (fan-outs, merges, the main request path), never on every edge.
  • In Architecture mode a dot is semantically a request/message in flight — route dots along realistic end-to-end journeys.

Step 3 — Shared design tokens

  • Page: #020617, 40px grid pattern (#0f1b33, 0.5px lines), JetBrains Mono when locally installed, else a system monospace stack (ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace) — no web-font fetch, the file is fully self-contained.
  • Text: labels #e2e8f0 13px/500, sublabels #64748b 10px, legend 11px.
  • Node corner rx="8"; START/END pills rx = height/2.
  • One shared arrowhead marker using context-stroke (inherits each line's color):
<marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
  <path d="M2 1L8 5L2 9" fill="none" stroke="context-stroke" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</marker>
  • Connector endpoints stop 4px short of node edges so arrowheads don't pierce borders.
  • Every connector <path> MUST have fill="none" (or sit in a <g fill="none">) — SVG defaults to black fill and an L-shaped path renders as a giant black polygon without it.
  • Z-order paint sequence: grid → connectors → dots → nodes. Nodes mask line ends; dots vanish "into" nodes instead of sliding over them.
  • ViewBox: 0 0 W H where H = lowest element bottom + 50. Never negative coordinates.

Step 4 — Accessibility & motion (non-negotiable)

  • Wrap ALL CSS animation in @media (prefers-reduced-motion: no-preference).
  • SMIL ignores that media query → keep the template's inline script that removes .dot elements under reduced motion and wires the visible ⏯ pause toggle (animation-play-state: paused + svg.pauseAnimations()).
  • SVG gets role="img" + <title> + <desc>.

Step 5 — Produce the file

dashmotion ships a deterministic layout engine, scripts/layout.py (pure stdlib). It does the coordinate arithmetic the mode references describe — row packing, branch gaps, boundary padding, orthogonal rail/lane routing — and renders the finished HTML: geometry + the mode style layer + your copy. So you do not hand-compute coordinates or hand-transcribe 35 rects and 38 path ds into a template (both are slow). You decide the semantics and the copy; the script writes the file. Full contract in references/layout-script.md.

Script path — use it whenever python3 is available:

  1. Parse the request — or the Mermaid source per references/mermaid-input.md — into the semantic graph JSON of references/layout-script.md. This is your judgement layer, and it carries everything the diagram needs:
    • structure: nodes (type + tier for architecture — omit tier for ungrouped/single-group arch (engine auto-layers), write it for multi-group, see layout-script.md; per-node group for boundary membership; flow shape written only for pills & decisions — never "shape": "step", steps omit it), edges (kind), groups, journeys, any legendExtra, classDef retention;
    • copy: title, subtitle, and (architecture) a summary of exactly three cards (accent cyan/violet/rose, title, items[]) — the human-facing wording is yours to write, here, in the JSON.
  2. Write it to a temporary path, not the output folder — e.g. "$TMPDIR/dashmotion-graph.json" (or any mktemp path) — then run python3 <this-skill-directory>/scripts/layout.py "$TMPDIR/dashmotion-graph.json" --render <topic>-dashmotion.html. The semantic JSON is a throwaway build intermediate; the delivered HTML does not depend on it, so never write it beside the .html — the user's folder should contain only the finished diagram. The script computes the geometry, applies the style layer (node fills/strokes by type, the opaque-base + styled-rect masking pair, flow/flow-async/flow-auth connector classes by edge kind, per-journey dot colors with staggered, chained begin), drops in your copy, and writes the complete, self-contained, ready-to-ship file. Edges flagged "loop": true are rendered as the ↻ label annotation, not a path.
  3. Run Step 6 against that file. The renderer is structurally sound by construction, but Step 6 is still the authority — run it.
  4. You keep final say over everything visual: to adjust wording, emphasis, journeys, or types, edit the JSON and re-render (cheap and deterministic); to tweak a label or a colour by hand, edit the emitted file directly. What you no longer do is photocopy coordinates — the script owns geometry (plan A) and now the boilerplate around it.

Do not author the JSON, then also hand-write the HTML — that re-incurs the exact transcription cost this path removes. Render, check, deliver.

Hand-computed fallback — only when python3 is unavailable: do the layout arithmetic from the mode reference explicitly before writing coordinates, copy the template, replace SVG content / title / header / legend / summary cards (keep CSS + pause toggle + reduced-motion script), pick 3–6 dot paths copying connector d values and staggering begin. This is the pre-2.2 path — slow, but it needs no Python.

Tell the user the file opens directly in any browser.

GIF/MP4 export (only if asked)

Never render frames by hand. Screen-record the open file (macOS ⌘⇧5), or headless: npx timecut <file.html> --viewport=1200,900 --duration=3 --fps=30 --output=flow.mp4 then ffmpeg -i flow.mp4 flow.gif. A 3s capture loops seamlessly when all durations divide 3s — prefer 0.75s / 1.5s / 3s when GIF export is the goal.

Step 6 — Structural self-check (before delivering)

The file is not done when it's written — it's done when it passes this check. The --render output is structurally sound by construction, but the check is still mandatory (it's also your guard for the hand-computed fallback, whose coordinates fail in predictable ways — the connector layer far more often than the text layer). Verify; don't assume.

Mechanized path (use it whenever python3 is available): run the bundled checker against the file you just wrote —

python3 <this-skill-directory>/scripts/check_diagram.py <your-file>.html

It deterministically detects the failure classes below (overlaps, connectors through boxes, dash-loop seams, out-of-bounds, dots off their line, black-fill, endpoint pierce, dangling begin refs, malformed XML). Fix every reported violation and re-run until it prints 0 violations. Do NOT hand-walk the arithmetic when the script is available, do NOT write your own ad-hoc verification script, and never verify by opening a browser or taking screenshots — the script is the authority; items it can't see (label collisions, exact boundary padding, legend placement) you still check by reading the numbers.

If the input was Mermaid, also mechanize the fidelity recount (checklist item 6): save the source to a temp .mmd and run —

python3 <this-skill-directory>/scripts/check_fidelity.py <source>.mmd <your-file>.html

Fix until it prints PASS. It verifies every source node/edge/group label appears verbatim and the connector count matches the source's edge count. So keep labels and legend entries exactly as the source wrote them — do not reword, merge two source strings into one, or add parentheses (a legend entry v2 点线橙框 must stay v2 点线橙框, never v2 治理骨架(点线橙框)). This is the same low-recall trap as the structural check: prose "I kept it verbatim" misses real drift; the script doesn't.

Prose fallback (only if python3 is unavailable): verify each item below with arithmetic on the actual numbers (write the comparisons out), not by eyeballing the code. Fix every violation and re-check until the list is clean.

  1. Overlaps — for every pair of same-row elements: left.x + left.width + gap ≤ right.x (gap ≥ 20 flow / 40 architecture). For every stacked pair: top.y + top.height + gap ≤ bottom.y. A boundary must fully contain its children with ≥ 20px padding on all four sides; partial overlap between any two boxes is always a bug.
  2. Connectors through boxes — walk every path segment by segment: between its endpoints it must not enter any node rect. Check every horizontal rail's y against the rects it passes (rect.y ≤ y ≤ rect.y + height means a collision); same for vertical drops' x. Fix by re-routing with the rail pattern, not by nudging boxes until something else breaks.
  3. Animation loops — for each animated class: |stroke-dashoffset delta| must be an exact multiple of the stroke-dasharray period sum (e.g. 5 5 → 10), including connectors that override the dasharray inline (an async 2 4 edge animated by a -10 keyframe seams every cycle — give it its own keyframes). For each animateMotion, name the single connector whose d it traces — a dot path that spans two connectors sails straight through the component between them; split it into chained per-hop dots instead. Every begin="X.end+…" must reference an id that exists.
  4. ViewBox bounds — no negative coordinates anywhere; every rect's x+width/y+height and every path coordinate stays inside 0 0 W H; H ≥ lowest element bottom + 20; the legend sits below the lowest boundary (architecture).
  5. Connector & markup hygiene — every connector <path> resolves to fill="none"; endpoints stop ~4px short of the target border and never reach inside a box; no -- inside SVG comments (<!-- A -- B --> closes the comment early and leaks stray text into the document).
  6. Mermaid fidelity (mermaid input only) — mechanized by check_fidelity.py above; run it and fix to PASS. It recounts against the source: node rects/pills == source node IDs (START/END pills added only for [*]); connector paths + -rendered loops == source edges after expanding chains and &; every node, edge, group, and legend label appears verbatim (legend entries merged from a 图例 subgraph included — keep their exact text). Without python3, recount by hand. Details in references/mermaid-input.md.

Deliver the file only after a pass where nothing needed fixing.

Output contract

One self-contained .html: embedded CSS, inline SVG, no external assets, no JS dependencies — only the ~15-line inline pause/reduced-motion script. Renders correctly opened from the filesystem.

GitHub 저장소

csthink/dashmotion
경로: skills/dashmotion
0
agent-skillsanimated-svganthropicarchitecture-diagramclaude-aiclaude-code
FAQ

자주 묻는 질문

dashmotion Skill이란 무엇인가요?

dashmotion은(는) csthink이(가) 만든 Claude Skill입니다. Skill은 Claude가 필요할 때 불러오는 지침과 리소스를 묶어 추가 프롬프트 없이 dashmotion 관련 작업을 수행할 수 있게 합니다.

dashmotion은(는) 어떻게 설치하나요?

이 페이지의 설치 명령을 사용하세요. dashmotion을(를) Claude Code 플러그인으로 추가하거나 저장소를 skills 디렉터리에 복제한 다음 Claude를 다시 시작해 Skill을 불러옵니다.

dashmotion은(는) 어떤 카테고리에 속하나요?

dashmotion은(는) 메타 카테고리에 속합니다.

dashmotion은(는) 무료로 사용할 수 있나요?

네. dashmotion은(는) AIMCP에 등록되어 있으며 무료로 설치할 수 있습니다.

연관 스킬

content-collections
메타

이 스킬은 콘텐츠 콜렉션(Content Collections)을 위한 프로덕션 검증된 설정을 제공합니다. 콘텐츠 콜렉션은 Markdown/MDX 파일을 Zod 검증이 포함된 타입 안전한 데이터 콜렉션으로 변환해주는 TypeScript 최우선 도구입니다. 블로그, 문서 사이트 또는 콘텐츠 중심의 Vite + React 애플리케이션을 구축할 때 타입 안전성과 자동 콘텐츠 검증을 보장하기 위해 사용하세요. Vite 플러그인 구성과 MDX 컴파일부터 배포 최적화 및 스키마 검증에 이르기까지 모든 것을 다룹니다.

스킬 보기
polymarket
메타

이 스킬은 개발자들이 Polymarket 예측 시장 플랫폼을 활용한 애플리케이션을 구축할 수 있도록 지원하며, 거래 및 시장 데이터를 위한 API 통합 기능을 포함합니다. 또한 WebSocket을 통한 실시간 데이터 스트리밍을 제공하여 실시간 거래와 시장 활동을 모니터링할 수 있습니다. 이를 통해 거래 전략을 구현하거나 실시간 시장 업데이트를 처리하는 도구를 생성하는 데 활용할 수 있습니다.

스킬 보기
creating-opencode-plugins
메타

이 스킬은 개발자들이 명령어, 파일, LSP 작업 등 25개 이상의 이벤트 유형에 연결되는 OpenCode 플러그인을 만들 수 있도록 돕습니다. JavaScript/TypeScript 모듈을 위한 플러그인 구조, 이벤트 API 명세, 구현 패턴을 제공합니다. OpenCode AI 어시스턴트의 라이프사이클을 사용자 정의 이벤트 기반 로직으로 가로채거나, 모니터링하거나, 확장해야 할 때 사용하세요.

스킬 보기
sglang
메타

SGLang은 RadixAttention 프리픽스 캐싱을 활용하여 JSON, 정규식, 에이전트 워크플로우를 위한 고속 구조화 생성에 특화된 고성능 LLM 서빙 프레임워크입니다. 특히 반복되는 프리픽스가 있는 작업에서 상당히 빠른 추론 속도를 제공하여 복잡한 구조화 출력 및 다중 턴 대화에 이상적입니다. 제약 디코딩이 필요하거나 광범위한 프리픽스 공유가 있는 애플리케이션을 구축할 때는 vLLM과 같은 대안보다 SGLang을 선택하십시오.

스킬 보기