# MosoFin-diagram > A free, open-source (MIT) agent skill that turns a short interview about a business into a validated, self-contained HTML diagram of how it runs. MosoFin-diagram is a free, open-source agent skill for Claude Code, Cursor, Codex CLI and OpenCode. It interviews you about a business once, then answers one question at a time with a checked, interactive HTML diagram: which system owns each part of the business, where work and money change hands, and how cash reaches the books. It never invents a number and never connects to your ledger, processor or bank. - Version: 1.0.0-dev.0 - License: MIT; price: Free; no account, no network call at render time - Website: https://diagram.mosofin.com - Source: https://github.com/MosoFin/mosofin-diagram ## When an agent should use it - The user wants to map, outline or explain how a business runs: its software stack, supply chain, CRM, commerce, fulfilment, payments, spend, payroll, bank and books, and which system owns each part. - The user asks a finance question that a picture answers: how money reaches the books, why Shopify revenue differs from QuickBooks, a month-end close, a Stripe payout reconciliation, who owes the business money, or whether cash covers payroll on a date. - The user wants a shareable diagram of a software system: architecture, a request or API call chain, a data pipeline, a deployment or a state machine. - The user pastes a Mermaid flowchart, sequence or state diagram and wants a checked, interactive version. ## When to use something else - The user needs live balances, a ledger export or a report pulled from a system. MosoFin-diagram draws what the user states; it never reads a system. - The user wants a chart of numbers over time. Use a charting tool; MosoFin-diagram draws structure, flows and states. ## Install Install the skill into the agent the user works in: - Claude Code: ```bash npx -y skills add MosoFin/mosofin-diagram --skill mosofin --agent claude-code --global --copy --yes ``` - Cursor: ```bash npx -y skills add MosoFin/mosofin-diagram --skill mosofin --agent cursor --global --copy --yes ``` - Codex CLI: ```bash npx -y skills add MosoFin/mosofin-diagram --skill mosofin --agent codex --global --copy --yes ``` - OpenCode: ```bash npx -y skills add MosoFin/mosofin-diagram --skill mosofin --agent opencode --global --copy --yes ``` Raven is a manual ZIP install: download [mosofin.zip](https://github.com/MosoFin/mosofin-diagram/releases/latest/download/mosofin.zip) and extract it into `~/.raven/workspace/skills`, which yields `~/.raven/workspace/skills/mosofin`. ## How to produce a diagram 1. Onboard once. Ask what the business does, which legal entities are in scope, and which system of record owns each domain the business runs. Save it as BUSINESS-BRIEF.md (or FINANCE-BRIEF.md when numbers must tie out). 2. Take one question. Map it to a recipe below, or ask the skill. 3. Write the JSON spec for the recipe's diagram type, then validate it and fix what the diagnostics name. 4. Deliver one self-contained HTML file and hand it to the user. Commands, run from the installed skill directory: ```bash node bin/mosofin.mjs guide "" --json ``` Recommend the recipe and diagram type for a plain-language question. ```bash node bin/mosofin.mjs validate --quality showcase --json ``` Validate a candidate JSON spec; repair from the diagnostics until it passes. ```bash node bin/mosofin.mjs deliver --quality showcase --json ``` Render the final self-contained HTML with a validation receipt. ```bash node bin/mosofin.mjs brands "" --json ``` Find the built-in logo ID for a real product. ```bash node bin/mosofin.mjs icons --json ``` List business icons for nodes that have no logo. ## Diagram types - Architecture (`architecture`): The whole operating stack: which system owns each domain, money maps, and where entities separate. - Workflow (`workflow`): Steps and gates in one process: team handoffs, the month-end close, approval chains, payment runs. - Sequence (`sequence`): One order, invoice or payout traced in time across every system it touches. - Data flow (`dataflow`): Revenue walks, payout reconciliations, cash runway and data lineage: where a number comes from. - Lifecycle (`lifecycle`): The states one object moves through: refunds, disputes, invoices, subscriptions. - Pillars (`pillars`): The operating model on one page: the business in one sentence, one pillar per domain, the rules underneath. ## Guardrails the skill enforces - Every fact comes from the business brief or the user. The skill never calls QuickBooks, Xero, Stripe, Shopify, an ERP or a bank. - No invented amounts, volumes or headcounts. A number the user did not supply is omitted or tagged unknown. - One system of record per fact. Two systems claiming the same fact is a brief error to resolve, not something to draw. - "Connected" is not a tie-out. A reconciliation is green only when the user supplied a zero difference. - At most 12 primary nodes per diagram. Group by domain and name the real tools in the sublabel. - A real product shows its logo only from the shipped catalogue; anything without one shows a business icon, never an imitation logo. ## Recipes 23 recipes, grouped by audience. Each has an answer page at https://diagram.mosofin.com/recipes/. ### Business #### How does the whole business run, and which system owns each part of it? Draw it as an architecture diagram with the MosoFin-diagram "Business operating map" recipe. The whole business as three finance cycles meeting at the bank: procure to pay on the left, order to cash on the right, record to report underneath, with the system of record named on each node. Your coding agent returns one validated, self-contained HTML file. - Recipe: `business-operating-map` (architecture diagram) - Use when: Explaining the business to a new hire, an operator, a buyer, or yourself; before choosing what to fix or replace. - Avoid when: The question is about one process in order (workflow), one order in time (sequence), or numbers that must foot (finance recipes). - The diagram must include: 8–12 domains, not 30 apps; system of record per domain; P2P, O2C and R2R as named regions; shared vs per-entity books - Verified example: [How the business runs (2026-07)](https://diagram.mosofin.com/gallery/artifacts/business-operating-map.architecture.html) - Answer page: https://diagram.mosofin.com/recipes/business-operating-map.html Prompt: ```text Read references/business-onboarding.md and the workspace BUSINESS-BRIEF.md. Use Mosofin architecture mode to map how the whole business runs. Group by domain (demand/CRM, commerce, supply chain, inventory, fulfilment, payments, spend, payroll, bank, books, data) and name the real tool in each sublabel — at most 12 primary nodes. Lay it out as the three finance cycles: procure to pay (suppliers, ERP, spend) on the left, order to cash (CRM, commerce, payments) on the right, inventory and the bank in the middle, and record to report (one ledger per entity) along the bottom. Goods run left to right, cash converges on the bank, and every ledger is fed from the bank. Mark approval gates, say which cycles are shared and which books are per entity, and use the real entity names. Do not invent amounts, volumes, or headcounts. ``` #### Which team or system owns each step, and where does work change hands? Draw it as a workflow diagram with the MosoFin-diagram "Business handoffs" recipe. Lanes by team or system across one end-to-end process, with every handoff and every exception path named. Your coding agent returns one validated, self-contained HTML file. - Recipe: `business-handoffs` (workflow diagram) - Use when: Work is dropping between teams, onboarding an operator, or documenting who is accountable for each gate. - Avoid when: You need the system map rather than the process (business-operating-map), or numbers that must tie out. - The diagram must include: one lane per team or system; named handoffs; an exception lane; the gate that can stop the work - Verified example: [Northline Coffee — Month-End Close Runbook (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-close.workflow.html) - Answer page: https://diagram.mosofin.com/recipes/business-handoffs.html Prompt: ```text Read references/business-onboarding.md and the workspace BUSINESS-BRIEF.md. Use Mosofin workflow mode to show who owns each step of this process. One lane per team or system, one main path left to right, every handoff labelled with what actually changes hands, and a separate exception lane for the paths that stall or reverse. Do not invent owners or SLAs. ``` #### What holds the business up, which system owns each pillar, and what does it all stand on? Draw it as a pillars diagram with the MosoFin-diagram "Business pillars" recipe. The operating model on one page: a roof for the business in one sentence, one pillar per domain with its system of record and the facts it owns, and a foundation for the entity and the truth rules. Your coding agent returns one validated, self-contained HTML file. - Recipe: `business-pillars` (pillars diagram) - Use when: A board, buyer, or new hire needs the whole operating model in one glance, or the brief is fresh and you want to confirm it before mapping any flow. - Avoid when: The question is how work or money moves (operating map, handoffs, order journey) or a number that must tie out (finance recipes). - The diagram must include: 3–6 pillars, one per domain; system of record on each capital; facts owned, not tasks or amounts; entity and truth rules as the foundation - Verified example: [Northline Coffee — How the business stands (as of 2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-operating-pillars.pillars.html) - Answer page: https://diagram.mosofin.com/recipes/business-pillars.html Prompt: ```text Read references/business-onboarding.md and the workspace BUSINESS-BRIEF.md. Use Mosofin pillars mode to state the operating model on one page. The roof is the business in one sentence. Make one pillar per domain the business runs (3–6), name the system of record in the sublabel and set brand only for a real product, list the facts that system owns as items, and put the one-phrase truth claim in the tag. The foundation names the entity, the accounting basis, and the truth rules. Do not draw flows, ties, amounts, or headcounts. ``` #### What happens to one order, in time, across every system it touches? Draw it as a sequence diagram with the MosoFin-diagram "Order journey across systems" recipe. One order traced in time from demand through commerce, inventory, fulfilment, payment and into the books. Your coding agent returns one validated, self-contained HTML file. - Recipe: `business-order-journey` (sequence diagram) - Use when: Explaining the real sequence to a new hire, debugging where an order stalls, or scoping an integration. - Avoid when: You need the whole stack at a glance (business-operating-map) or a reconciliation that must foot. - The diagram must include: one order, real IDs if known; every system it touches; the waits and the async steps; where it becomes revenue - Verified example: [Northline Coffee — One DTC Order to the Books (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-order-path.sequence.html) - Answer page: https://diagram.mosofin.com/recipes/business-order-journey.html Prompt: ```text Read references/business-onboarding.md and the workspace BUSINESS-BRIEF.md. Use Mosofin sequence mode to trace one order in time across every system it touches — demand, commerce, inventory, fulfilment, payments, bank and books. Show the waits and the asynchronous steps as separate messages. Do not invent timestamps or amounts. ``` ### Finance #### How does this company make money, and what is source of truth for orders, cash, and books? Draw it as an architecture diagram with the MosoFin-diagram "Finance money map" recipe. A bounded map of commerce, payments, bank, and ledger with one order-to-cash path and named crossings. Your coding agent returns one validated, self-contained HTML file. - Recipe: `finance-money-map` (architecture diagram) - Use when: Onboarding a controller, explaining Shopify + Stripe + QuickBooks, or diligence on how cash reaches the books. - Avoid when: The audience needs one order’s timestamps, a payout rec that must foot, or month-end task ownership. - The diagram must include: 8–12 systems; one order-to-cash path; named boundary crossings; one source of truth per fact - Verified example: [Northline Coffee — Money Map (as of 2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-money-map.architecture.html) - Answer page: https://diagram.mosofin.com/recipes/finance-money-map.html Prompt: ```text Read references/finance-onboarding.md and the workspace FINANCE-BRIEF.md. Use Mosofin architecture mode to map how money reaches the books. Show 8–12 systems (commerce, payments, bank, ledger), one primary order-to-cash path, and label every crossing with the real mechanism. Do not invent amounts. Do not give two systems the same source-of-truth fact. Put tax and gift-card liability on side branches, not on the revenue rail. ``` #### What happened to one order or payout, in time, across commerce, payments, and the books? Draw it as a sequence diagram with the MosoFin-diagram "Finance order path" recipe. A time-ordered path from checkout through capture, fee netting, payout batch, bank, and the ledger split. Your coding agent returns one validated, self-contained HTML file. - Recipe: `finance-order-path` (sequence diagram) - Use when: Debugging a break on one order, a double-charge complaint, or explaining why a deposit is a batch. - Avoid when: The audience only needs the stable system map, or a period rec that must foot across all payouts. - The diagram must include: real IDs when known; capture and returns; fee gap; payout then bank then books - Verified example: [Northline Coffee — One DTC Order to the Books (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-order-path.sequence.html) - Answer page: https://diagram.mosofin.com/recipes/finance-order-path.html Prompt: ```text Read references/finance-onboarding.md and FINANCE-BRIEF.md. Use Mosofin sequence mode to walk one real order from cart to GL. Keep Shopify, Stripe, bank, and QuickBooks as participants. Show capture, fee netting, payout batching, and the ledger split. Use real IDs when the user supplied them. Do not invent amounts; omit or tag unknown. Keep the fee gap visible without turning it into the only path. ``` #### Why don’t Shopify, Stripe, and QuickBooks show the same revenue? Draw it as a data-flow diagram with the MosoFin-diagram "Finance revenue walk" recipe. A left-to-right walk from gross sales through discounts, returns, tax, gift cards, fees, and recognized income. Your coding agent returns one validated, self-contained HTML file. - Recipe: `finance-revenue-walk` (data flow diagram) - Use when: Founder and CFO disagree on “the number,” or Shopify sales do not match the P&L. - Avoid when: The question is one order’s timestamps, Stripe payout vs bank, or a close runbook. - The diagram must include: gross to contra; tax and gift cards as not-income; fees as expense not contra; landing on the books - Verified example: [Northline Coffee — July Revenue Walk: Shopify to QuickBooks (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-revenue-walk.dataflow.html) - Answer page: https://diagram.mosofin.com/recipes/finance-revenue-walk.html Prompt: ```text Read references/finance-onboarding.md and FINANCE-BRIEF.md. Use Mosofin dataflow mode to walk gross commerce sales to recognized QuickBooks income. Put discounts and returns on the commerce rail; style tax and gift cards as security / not-income; treat processor fees as an expense branch, not a contra to sales. Do not invent totals. If a number is missing, omit it or tag unknown. Extra questions become at most five guided views. ``` #### What is month-end, in order, and who owns each gate? Draw it as a workflow diagram with the MosoFin-diagram "Finance month-end close" recipe. A close runbook with commerce, cash, books, and review lanes, plus an exception lane for unmatched items. Your coding agent returns one validated, self-contained HTML file. - Recipe: `finance-close` (workflow diagram) - Use when: Explaining close to a founder, sharing ownership with a bookkeeper, or showing what blocks period lock. - Avoid when: The audience needs a payout rec that foots, or a state machine for one dispute. - The diagram must include: cutoff; payout and sales recs; exception lane; review then lock - Verified example: [Northline Coffee — Month-End Close Runbook (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-close.workflow.html) - Answer page: https://diagram.mosofin.com/recipes/finance-close.html Prompt: ```text Read references/finance-onboarding.md and FINANCE-BRIEF.md. Use Mosofin workflow mode for this period’s close. Separate Shopify, Stripe/bank, QuickBooks, review, and exception lanes. Make cutoff → payout rec → sales rec → tax tie → review → lock the main path. Put unmatched payouts and open disputes on the exception lane. Tag owners. Do not mark a rec node done without evidence. Do not invent amounts. ``` #### If commerce refunded it, is the money actually done? Draw it as a lifecycle diagram with the MosoFin-diagram "Finance dispute lifecycle" recipe. A state model that separates Shopify refund, Stripe dispute waits, recoverable books catch-up, and terminal win or write-off. Your coding agent returns one validated, self-contained HTML file. - Recipe: `finance-dispute-lifecycle` (lifecycle diagram) - Use when: Chargeback week, CX saying “refunded so we are fine,” or QBO still showing income. - Avoid when: The audience needs the close checklist or a gross-to-net walk for the whole period. - The diagram must include: captured start; non-terminal waits; books catch-up as recoverable failure; won and lost terminals - Verified example: [Northline Coffee — Refund and Chargeback Lifecycle (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-dispute.lifecycle.html) - Answer page: https://diagram.mosofin.com/recipes/finance-dispute-lifecycle.html Prompt: ```text Read references/finance-onboarding.md and FINANCE-BRIEF.md. Use Mosofin lifecycle mode for this refund or dispute. Keep Shopify refunded as a non-terminal step when Stripe still has an open dispute. Model QBO still showing income as a recoverable failure with a real transition back after a credit memo. Won and lost/write-off are terminals. Do not invent amounts or evidence due dates. ``` #### Where did Stripe cash go relative to the bank and QuickBooks? Draw it as a data-flow diagram with the MosoFin-diagram "Finance payout rec" recipe. A rec-shaped data flow: captured charges, netted fees, payouts, in-transit, bank credits, books, and residual. Your coding agent returns one validated, self-contained HTML file. - Recipe: `finance-payout-rec` (data flow diagram) - Use when: Month-end payout rec, Stripe dashboard cash ≠ bank, or a clearing account that will not tie. - Avoid when: The question is why Shopify sales ≠ P&L, or the close checklist order. - The diagram must include: fees netted in payout; timing vs unexplained residual; bank then books; no invented residual - Verified example: [Northline Coffee — Stripe Payout Reconciliation to Chase 1002 (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-payout-rec.dataflow.html) - Answer page: https://diagram.mosofin.com/recipes/finance-payout-rec.html Prompt: ```text Read references/finance-onboarding.md and FINANCE-BRIEF.md. Use Mosofin dataflow mode for Stripe payout vs bank vs QuickBooks. Separate timing (pending / in transit) from unexplained residual. Label fees as netted inside the payout. Do not invent a residual; if totals are unknown, omit amounts and keep the topology. Never mark the rec green unless the user supplied a zero difference. ``` #### Who is allowed to say this customer owes us? Draw it as an architecture diagram with the MosoFin-diagram "Finance customer and AR" recipe. A map of Shopify CRM, Stripe customer, and QuickBooks customer with an explicit DTC vs wholesale AR rule. Your coding agent returns one validated, self-contained HTML file. - Recipe: `finance-customer-ar` (architecture diagram) - Use when: Wholesale just launched, three customer IDs disagree, or someone is aging a cash-and-carry brand. - Avoid when: The audience needs a cash forecast or a payout rec. - The diagram must include: three identity systems; DTC sales-receipt rule; wholesale invoice rule; CRM is not cash - Verified example: [Northline Coffee — Who Can Say a Customer Owes Us (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-customer-ar.architecture.html) - Answer page: https://diagram.mosofin.com/recipes/finance-customer-ar.html Prompt: ```text Read references/finance-onboarding.md and FINANCE-BRIEF.md. Use Mosofin architecture mode to show customer identity across Shopify, Stripe, and QuickBooks. State which system may claim AR. If DTC is sales receipts, say QuickBooks has no AR. If wholesale is Net 30, put aging on the QBO invoice. Do not treat Shopify CRM as cash. Do not invent balances. ``` #### Can we make payroll, and what inflows are actually named? Draw it as a data-flow diagram with the MosoFin-diagram "Finance cash to a date" recipe. A cash walk from a tied bank opening through in-transit payouts and known outflows, with user-stated items labelled. Your coding agent returns one validated, self-contained HTML file. - Recipe: `finance-cash-runway` (data flow diagram) - Use when: Payroll Friday, runway to a date, or a founder asking whether next week’s Shopify sales count. - Avoid when: The audience needs the P&L walk or the close checklist. - The diagram must include: tied opening or explicit gap; named in-transit payouts; known outflows; no invented next-week sales - Verified example: [Northline Coffee — Cash to Payroll Date (as of 2026-07-31)](https://diagram.mosofin.com/gallery/artifacts/northline-cash-runway.dataflow.html) - Answer page: https://diagram.mosofin.com/recipes/finance-cash-runway.html Prompt: ```text Read references/finance-onboarding.md and FINANCE-BRIEF.md. Use Mosofin dataflow mode for cash to a named date. Opening cash is red until tied to a bank rec, or the user accepts the gap. Inflows need a payout id, invoice id, or user-stated tag. Do not add next-week Shopify sales without an order or payout basis. Do not invent amounts. ``` ### Systems and engineering #### What exists, who owns it, and how is it connected? Draw it as an architecture diagram with the MosoFin-diagram "System overview" recipe. A bounded map of core components, external dependencies, primary paths, and trust boundaries. Your coding agent returns one validated, self-contained HTML file. - Recipe: `system-overview` (architecture diagram) - Use when: Onboarding, design reviews, repository orientation, or explaining a service landscape. - Avoid when: The audience needs exact call order, state transitions, or row-level data lineage. - The diagram must include: 8–12 core components; one primary path; external dependencies; trust boundaries - Verified example: [Northline Coffee — Money Map (as of 2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-money-map.architecture.html) - Answer page: https://diagram.mosofin.com/recipes/system-overview.html Prompt: ```text Analyze this repository, then use Mosofin to create a high-level architecture diagram. Show 8–12 core runtime components, one primary request or data path, external dependencies, ownership or trust boundaries, and put supporting detail in cards instead of adding more edges. ``` #### Where does each workload run, and what crosses a boundary? Draw it as an architecture diagram with the MosoFin-diagram "Deployment ownership" recipe. A deployment-focused map of regions, networks, clusters, workloads, stores, and cross-boundary mechanisms. Your coding agent returns one validated, self-contained HTML file. - Recipe: `deployment-ownership` (architecture diagram) - Use when: Cloud reviews, production readiness, multi-region planning, or infrastructure ownership handoffs. - Avoid when: Deployment facts are unknown or the real question is application behavior rather than placement. - The diagram must include: regions and networks; workload ownership; stateful services; named boundary crossings - Verified example: [Northline Coffee — Who Can Say a Customer Owes Us (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-customer-ar.architecture.html) - Answer page: https://diagram.mosofin.com/recipes/deployment-ownership.html Prompt: ```text Use Mosofin to draw the production deployment topology. Group resources by region, network, cluster, and owner; show workloads and stateful services; label every cross-boundary mechanism. Do not invent deployment facts—mark unknown areas explicitly. If the user wants a fail-closed deployment review, ask before setting meta.engineering_profile to deployment-ownership; otherwise leave the engineering profile unset. ``` #### How does an agent plan, get permission, act, recover, and report? Draw it as a workflow diagram with the MosoFin-diagram "Agent tool-call loop" recipe. A lane-based agent loop with policy gates, tool execution, exception recovery, evidence, and final response. Your coding agent returns one validated, self-contained HTML file. - Recipe: `agent-tool-call` (workflow diagram) - Use when: Explaining agent runtimes, MCP/tool orchestration, approvals, retries, or observability. - Avoid when: The goal is only to show static agent components or exact API message timing. - The diagram must include: request and planning; policy or approval gate; tool execution; exception and evidence paths - Verified example: [Northline Coffee — Month-End Close Runbook (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-close.workflow.html) - Answer page: https://diagram.mosofin.com/recipes/agent-tool-call.html Prompt: ```text Use Mosofin workflow mode to explain this agent tool-call loop. Separate user surface, agent runtime, policy boundary, exception handling, tool execution, and observability into lanes. Make the successful path primary and show approval, retry, blocked, and evidence paths explicitly. ``` #### How does a change move safely from commit to production? Draw it as a workflow diagram with the MosoFin-diagram "Delivery workflow" recipe. A delivery flow with build, checks, environments, approvals, smoke tests, rollback, and ownership lanes. Your coding agent returns one validated, self-contained HTML file. - Recipe: `delivery-workflow` (workflow diagram) - Use when: CI/CD design, release reviews, deployment governance, or onboarding developers to delivery. - Avoid when: The question is where infrastructure runs or what states a deployment object can occupy. - The diagram must include: trigger and build; blocking checks; approval and environments; rollback and verification - Verified example: [Northline Coffee — Month-End Close Runbook (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-close.workflow.html) - Answer page: https://diagram.mosofin.com/recipes/delivery-workflow.html Prompt: ```text Use Mosofin workflow mode to draw this delivery process from commit to production. Separate developer, CI, approval, environment, and exception lanes; mark blocking checks, smoke tests, ownership, and the rollback path. Keep one unmistakable happy path. ``` #### How do responders detect, triage, mitigate, verify, and escalate? Draw it as a workflow diagram with the MosoFin-diagram "Incident runbook" recipe. An operational workflow that separates signals, responders, mitigation, communications, and recovery proof. Your coding agent returns one validated, self-contained HTML file. - Recipe: `incident-runbook` (workflow diagram) - Use when: Incident playbooks, on-call handoffs, reliability reviews, and tabletop exercises. - Avoid when: The audience needs live metrics or a post-incident component topology instead of response actions. - The diagram must include: detection signal; triage owner; mitigation and rollback; verification and communication - Verified example: [Northline Coffee — Month-End Close Runbook (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-close.workflow.html) - Answer page: https://diagram.mosofin.com/recipes/incident-runbook.html Prompt: ```text Use Mosofin workflow mode to turn this incident runbook into responder lanes. Show detection, triage, mitigation, escalation, communication, rollback, and recovery verification. Separate decision gates from actions and make missing ownership visible. ``` #### Who calls whom, in what order, and what returns? Draw it as a sequence diagram with the MosoFin-diagram "API request chain" recipe. A time-ordered request path with authentication, cache fallback, persistence, return traffic, and async trace. Your coding agent returns one validated, self-contained HTML file. - Recipe: `api-request` (sequence diagram) - Use when: API documentation, debugging request latency, auth reviews, or explaining cache fallback. - Avoid when: Order is unimportant and the audience only needs the stable service topology. - The diagram must include: callers and callees; request and return messages; fallback or error path; async side effects - Verified example: [Northline Coffee — One DTC Order to the Books (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-order-path.sequence.html) - Answer page: https://diagram.mosofin.com/recipes/api-request.html Prompt: ```text Use Mosofin sequence mode to show this request from caller to final response. Include authentication, cache hit or miss, persistence fallback, return messages, and asynchronous trace or event emission. Keep message labels short and order unambiguous. ``` #### What happens after the initial request returns? Draw it as a sequence diagram with the MosoFin-diagram "Async roundtrip" recipe. A sequence view of enqueue, acknowledgement, background work, callbacks, retries, timeout, and final consistency. Your coding agent returns one validated, self-contained HTML file. - Recipe: `async-roundtrip` (sequence diagram) - Use when: Webhooks, jobs, queues, payment callbacks, eventual consistency, or async API contracts. - Avoid when: The primary question is topic topology and consumer ownership rather than time order. - The diagram must include: initial acknowledgement; queue or scheduler; background work; callback, retry, and timeout - Verified example: [Northline Coffee — One DTC Order to the Books (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-order-path.sequence.html) - Answer page: https://diagram.mosofin.com/recipes/async-roundtrip.html Prompt: ```text Use Mosofin sequence mode to explain this asynchronous roundtrip. Show the initial acknowledgement, enqueue or scheduling step, background processing, callback or polling, retry and timeout behavior, and the point where the caller can observe final consistency. ``` #### Where does data come from, how does it change, and who consumes it? Draw it as a data-flow diagram with the MosoFin-diagram "Data lineage" recipe. A governed path from sources through consent, transforms, sensitive stores, warehouse, and consumers. Your coding agent returns one validated, self-contained HTML file. - Recipe: `data-lineage` (data flow diagram) - Use when: Analytics architecture, ETL/ELT review, PII assessment, warehouse design, or model feature lineage. - Avoid when: The audience needs request timing or operational task ownership rather than data assets. - The diagram must include: sources and assets; transform stages; classification or consent; stores and consumers - Verified example: [Northline Coffee — July Revenue Walk: Shopify to QuickBooks (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-revenue-walk.dataflow.html) - Answer page: https://diagram.mosofin.com/recipes/data-lineage.html Prompt: ```text Use Mosofin dataflow mode to map this data lineage. Name every data asset and transform, show consent or classification boundaries, distinguish streaming from batch paths, and identify stores plus downstream consumers. Do not use unlabeled flows. ``` #### Which events move through which topics, processors, groups, and failure paths? Draw it as a data-flow diagram with the MosoFin-diagram "Event-stream topology" recipe. A stream map of producers, topics, ordered processors, consumer groups, state, replay, and DLQ. Your coding agent returns one validated, self-contained HTML file. - Recipe: `event-stream` (data flow diagram) - Use when: Kafka/event-platform design, stream processing reviews, ownership, replay, and failure handling. - Avoid when: Topic names, consumer groups, and delivery semantics are not known—use a generic workflow instead. - The diagram must include: producers and event names; topics and ordering; processors and consumer groups; state, replay, and DLQ - Verified example: [Northline Coffee — Stripe Payout Reconciliation to Chase 1002 (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-payout-rec.dataflow.html) - Answer page: https://diagram.mosofin.com/recipes/event-stream.html Prompt: ```text Use Mosofin dataflow mode to draw this event-stream topology. Name producers, events, topics, ordered processors, consumer groups, state stores, replay paths, and the DLQ. Show ownership and delivery semantics only when supported by evidence. ``` #### Which states exist, what events move between them, and how does it end? Draw it as a lifecycle diagram with the MosoFin-diagram "Object lifecycle" recipe. A state model with active work, waits, retries, cancellation, failure, and explicit terminal outcomes. Your coding agent returns one validated, self-contained HTML file. - Recipe: `object-lifecycle` (lifecycle diagram) - Use when: Tasks, orders, tickets, subscriptions, jobs, agent runs, or any durable object with status. - Avoid when: The object has no durable state and the real question is participant interaction over time. - The diagram must include: start and active states; event-labelled transitions; wait and retry states; all terminal outcomes - Verified example: [Northline Coffee — Refund and Chargeback Lifecycle (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-dispute.lifecycle.html) - Answer page: https://diagram.mosofin.com/recipes/object-lifecycle.html Prompt: ```text Use Mosofin lifecycle mode to model this object. Separate main progress, waiting or interruption states, and terminal outcomes. Label transitions with events, include retry, cancellation, timeout, success, and failure where real, and never hide an ending. ``` #### What state is a release in, and what can happen next? Draw it as a lifecycle diagram with the MosoFin-diagram "Deployment lifecycle" recipe. A deployment state model covering queued, building, verifying, approval, promotion, rollback, and terminal outcomes. Your coding agent returns one validated, self-contained HTML file. - Recipe: `deployment-lifecycle` (lifecycle diagram) - Use when: Release controllers, GitOps reconciliation, environment promotion, or deployment status APIs. - Avoid when: The question is the human/CI sequence of delivery actions rather than the deployment object state. - The diagram must include: queued and running states; verification and approval; promotion and rollback; success, failure, cancellation - Verified example: [Northline Coffee — Refund and Chargeback Lifecycle (2026-07)](https://diagram.mosofin.com/gallery/artifacts/northline-dispute.lifecycle.html) - Answer page: https://diagram.mosofin.com/recipes/deployment-lifecycle.html Prompt: ```text Use Mosofin lifecycle mode to model the deployment object. Show queued, building, verifying, waiting for approval, promoting, rolling back, and every terminal outcome. Label the events and guards that permit each transition. ``` ## FAQ ### What is MosoFin-diagram? MosoFin-diagram is a free, open-source agent skill that turns a short interview about a business into a validated, self-contained HTML diagram of how it runs. Each node names the system of record that owns it, and each connection names what actually changes hands. ### Which diagrams can it draw? It draws six diagram types: architecture, workflow, sequence, data flow, lifecycle, pillars. 23 ready-made recipes cover questions such as how the whole business runs, the month-end close, a revenue walk, a payout reconciliation and cash to a payroll date. ### Does it invent numbers? No. If you did not supply an amount, it does not appear. The skill never calls QuickBooks, Stripe, Shopify, an ERP, or a bank. ### Is MosoFin-diagram free? Yes. MosoFin-diagram is free and MIT-licensed, needs no account, and makes no network call when it renders a diagram. Every logo it can draw ships inside the skill. ### What do I get back? One self-contained HTML file. Zero dependencies, no server, no runtime. Open it in any browser, forward it, or export PNG, JPEG, WebP, SVG, or WebM. ### Which agents does it support? Cursor, Claude Code, Codex CLI, and OpenCode via the switcher. Raven is a manual ZIP install: extract mosofin.zip into ~/.raven/workspace/skills, which yields ~/.raven/workspace/skills/mosofin. ### How should an AI agent use MosoFin-diagram? Install the skill, read its SKILL.md, and let the built-in guide pick a recipe for the user's question. Then write the JSON spec, validate it, and deliver the HTML. The complete agent guide is at diagram.mosofin.com/llms-full.txt. ### Is this the same product as mosofin.com? No. MosoFin is a read-only financial data workspace in Claude. MosoFin-diagram is a free, open-source skill that draws a map of how the business runs. They share a name and a team — not data.