Logo Causal Loop Diagram Generator

Causal Loop Diagram Generator

Cộng đồng
dmccreary
causal-loop-diagram-generator

Creates interactive causal-loop diagram (CLD) articles for MkDocs Material sites. Use when the user wants to visualize feedback loops, systems archetypes (reinforcing/balancing loops, limits to growth, tragedy of the commons), or any topic with competing runaway and stabilizing dynamics. Produces vis-network diagrams — not static images or Mermaid.

Tổng quan

Nhà phát hànhdmccreary
Kho mãibook-skills
Tên kỹ năngcausal-loop-diagram-generator
Sao
109
Bản fork
21
Tệp đi kèm
14
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 14 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được dmccreary công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Causal Loop Diagram Generator trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/dmccreary/ibook-skills/tree/main/skills/archived/causal-loop-diagram-generator
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dmccreary/ibook-skills.git /tmp/ibook-skills
mkdir -p .claude/skills
cp -r /tmp/ibook-skills/skills/archived/causal-loop-diagram-generator .claude/skills/causal-loop-diagram-generator
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Causal Loop Diagram Generator trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Causal Loop Diagram Generator ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Causal Loop Diagram Generator với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Causal Loop Diagram Generator

This skill produces a complete, working multi-CLD article for an MkDocs Material site. The output is a set of files that together render an article where each section discusses one feedback loop and shows it as an interactive draggable diagram, building up to a full-system view at the end.

What the user gets

When invoked on a topic (say, "make me a CLD article about supply chain bullwhip"), the skill produces:

  1. One JSON file per loop (docs/sims/cld-viewer/examples/<id>-cld.json) — usually 3–5 nodes each, one per archetype loop in the topic.
  2. One full-system JSON combining all loops around a shared central node.
  3. The article markdown (docs/articles/<slug>.md) — progressive build-up, one section per loop, with inline interactive diagrams and a fullscreen-button per diagram.
  4. The shared infrastructure (docs/articles/cld-inline.js, docs/sims/cld-viewer/) if not already present in the project.
  5. Updated mkdocs.yml nav entries.

Every diagram is a live vis-network instance the reader can drag, zoom, and click to inspect. Not a static image.

When to use this skill

Trigger on requests for any of:

  • "Make a causal loop diagram for X"
  • "Write an article about [the runaway dynamic in X]"
  • "Show the feedback loops in X"
  • "Add a CLD article to my site"
  • A topic that has one or more reinforcing loops competing with balancing ones (AI race, virality, addiction, supply chain bullwhip, market dynamics, climate, organizational dysfunction)

If the user just wants a single quick diagram — not an article — generate just one CLD JSON and embed it inline; skip the article structure.

High-level workflow

  1. Understand the system. Ask clarifying questions if the topic is ambiguous, but a single sentence is usually enough to draft a plausible loop set. List the candidate reinforcing loops (R1, R2, …) and balancing loops (B1, B2, …) before writing any JSON. Show the list to the user and confirm before generating files.

  2. Verify the project layout. Determine the project root (look for mkdocs.yml). Confirm or create:

    • docs/articles/ (article location)
    • docs/sims/cld-viewer/examples/ (CLD JSON location)
    • docs/articles/cld-inline.js (inline renderer)
    • docs/sims/cld-viewer/main.html + cld-viewer.js + the four R/B PNGs (fullscreen viewer)
  3. Port missing assets. Copy the bundled assets from this skill's assets/ directory if any are missing. See the "Bundled assets" section below for the exact file map.

  4. Generate one JSON per loop. Read references/json-schema.md and references/layout-templates.md. Use the 3-node triangle template for simple loops, 4-node diamond for richer ones, hub-and-spoke for the full system.

  5. Write the article. Follow references/article-structure.md — frontmatter, lead, anchor example, R-loops, B-loops, status table, full system, leverage point, signals, bottom line. Required <style> and <script src="../cld-inline.js"> block at the bottom.

  6. Update mkdocs.yml. Add a nav entry for the new article. If cld-viewer/index.md doesn't exist yet, add it under MicroSims.

  7. Read references/pitfalls.md before changing anything in cld-inline.js, cld-viewer.js, or the rendering setup. Nine specific footguns are documented — they each cost real debugging hours to find. The most important one: never use one iframe per inline diagram; both Chrome and Firefox silently fail to render past the 5th–6th iframe on a single page, and there is no client-side workaround.

Bundled assets

Everything you need to install into a fresh project lives in assets/:

assets/
├── cld-inline.js                  # Inline vis-network renderer for article pages.
│                                  # Copy to: docs/articles/cld-inline.js
└── cld-viewer/
    ├── main.html                  # Fullscreen viewer page (used by the iframe
    │                              # buttons in the article). Has menu mode for
    │                              # sample buttons + Save/Copy positions.
    ├── cld-viewer.js              # Fullscreen viewer's JS — loads JSON, renders
    │                              # network, handles drag/zoom/save.
    ├── reinforcing-loop-cw.png    # R/B archetype icons referenced in the
    ├── reinforcing-loop-ccw.png   # systems-thinking schema. Optional but copy
    ├── balancing-loop-cw.png      # them through if the project will use loop
    ├── balancing-loop-ccw.png     # iconography.
    └── examples/
        ├── ai-flywheel-cld.json           # 4-node diamond, single reinforcing loop.
        ├── runaway-hypothesis-cld.json    # 3-node triangle, single reinforcing loop.
        └── winner-takes-all-cld.json      # 17 nodes, 8 loops, hub-and-spoke.
                                           # Use as a model for full-system diagrams.

Reference docs

Loaded as needed, in roughly this order:

  • references/json-schema.md — the CLD JSON format. Read first when generating loops.
  • references/layout-templates.md — coordinate templates for 3-, 4-, 5-node loops and for hub-and-spoke. Read when placing nodes.
  • references/article-structure.md — section-by-section template for the article markdown, including the required <style> + <script> boilerplate. Read when writing the article.
  • references/pitfalls.md — nine documented footguns with symptoms, root causes, and solutions. Read before modifying any rendering code or attempting an iframe-based design.

Default loop count

When the user gives only a topic and asks for "a CLD article," default to:

  • 1 anchor example (the canonical loop everyone agrees on)
  • 3–4 reinforcing loops (the runaway dynamics)
  • 3–4 balancing loops (the constraints)
  • 1 full-system diagram

That's 8–10 diagrams total, matching the reference Winner-Takes-All article. If the topic has fewer real dynamics, scale down — don't pad. If the user asks for "a quick diagram" or "just one loop," produce one CLD JSON and a single inline embed; skip the article scaffolding entirely.

Naming conventions

  • CLD ids: lowercase, hyphenated, ending in -cld. Example: bullwhip-amplification-cld.
  • Article slug: short, hyphenated, descriptive. Example: supply-chain-bullwhip.md.
  • Loop labels: R1: Recursive Self-Improvement, B1: Compute Constraint. Always use R<n> for reinforcing and B<n> for balancing.

What NOT to do

  • Do not embed diagrams as iframes inline in the article. Use <div class="cld-inline"> and the inline renderer. See pitfalls.md #1.
  • Do not use mermaid, ASCII art, or static images for the loops. The whole point of this skill is interactive vis-network diagrams readers can drag.
  • Do not soften the border: 2px solid blue on iframes or .cld-inline divs. It's the project-wide MicroSim standard signaling interactive content. See pitfalls.md #8.
  • Do not modify the global iframe CSS rule in extra.css to "look nicer." Same reason.
  • Do not skip the <script src="../cld-inline.js"> tag at the bottom of the article. Without it, every <div class="cld-inline"> is an empty bordered box.

Confirming with the user

After you've drafted the loop list (step 1) but before generating files, show the user the proposed loop set with one-line descriptions. They almost always have an opinion on which loops to include and what to call them, and it's much cheaper to revise the list than to revise 8 JSON files.

After generating, tell the user the file paths, what mkdocs.yml changes you made, and remind them they can use the cld-viewer's "Save Positions" button to drag nodes into nicer positions and download an updated JSON.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Causal Loop Diagram Generator làm được gì?

Creates interactive causal-loop diagram (CLD) articles for MkDocs Material sites. Use when the user wants to visualize feedback loops, systems archetypes (reinforcing/balancing loops, limits to growth, tragedy of the commons), or any topic with competing runaway and stabilizing dynamics. Produces vis-network diagrams — not static images or Mermaid.

Vì sao nên dùng Causal Loop Diagram Generator trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Causal Loop Diagram Generator là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Causal Loop Diagram Generator trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/dmccreary/ibook-skills/tree/main/skills/archived/causal-loop-diagram-generator. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Causal Loop Diagram Generator?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Causal Loop Diagram Generator với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Causal Loop Diagram Generator với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Causal Loop Diagram Generator có miễn phí không?

Kỹ năng này được dmccreary phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇