Skip to content
chiltepin

Diagram tool

Use case diagrams from text, UML that checks

A use case diagram is the one UML diagram a product manager reads: who uses the system, for what? Chiltepin generates it from text — yours or your agent's — as a typed usecase block that chiltepin check validates and the renderer draws.

The block and its render

This is the usecase starter template. Actors are people by default and kind: system for another system; side: right puts one on the far side of the boundary. Links are the terse actor -> case; relations between cases carry kind: include | extend | generalize.

```usecase
system: Ticketing
actors:
  - { id: cust, name: Customer }
  - { id: agent, name: Support agent }
  - { id: pay, name: Payment gateway, kind: system, side: right }
cases:
  - { id: buy, name: Buy ticket }
  - { id: pay1, name: Pay by card }
  - { id: refund, name: Request refund }
  - { id: approve, name: Approve refund }
links:
  - cust -> buy
  - cust -> refund
  - agent -> approve
  - pay -> pay1
relations:
  - { from: buy, to: pay1, kind: include }
  - { from: refund, to: approve, kind: extend }
```
SECTION 01 · Use cases
USE CASE
Use-case diagram: Ticketing, 3 actors, 4 use casesTicketingBuy ticketPay by cardRequest refundApprove refundCustomerSupport agentSYSPayment gateway«include»«extend»
Legenduse caseexternal systemassociation«include»«extend»
Two people and one external system around a boundary, four cases inside, an include and an extend between them. The renderer decides where every oval goes.

How to generate one

  1. Install the skill. Run npx skills add jdiejim/chiltepin -g once. It puts the Chiltepin authoring skill into Claude Code, Cursor, Codex, Copilot and 70+ other agents.
  2. Ask for the diagram. "Add a use case diagram of the ticketing system to docs/product/ticketing.md: customers, support agents, the payment gateway." The agent runs chiltepin block usecase and writes actors, cases, links and relations.
  3. Check it. npx chiltepin check reports an unknown actor, a link to a missing case or a bad relation kind with a stable code and the fix; the agent repairs it before handing off.
  4. Render it. npx chiltepin html docs/product/ticketing.md -p renders the page; chiltepin build publishes the site. The renderer places every actor and oval — never the model.

The rest of UML, the same way

The pkg block draws a UML package diagram — tabbed folders with members, nested with parent, dashed dependencies with kind: import | use | access | merge — for the question which module may depend on which? uml draws classes, timing draws lifelines stepping through states over time, and state and sequence cover behaviour. All of them are in the architecture reference and the catalog.

Part of the product spec

A use case diagram opens a product spec or a design document; the user stories, the swimlane of the process and the roadmap follow. Chiltepin renders the whole thing — a growing set of typed blocks, one grammar — to a site, slides or PDF from one Markdown file. Paste a block into the playground to see it render now.

Frequently asked questions

What is a use case diagram?
A UML use case diagram shows who uses a system for what: stick-figure actors outside a system boundary, ovals for the use cases inside it, lines from each actor to the cases it takes part in, and dashed relations between cases — include for a case that always runs another, extend for one that sometimes adds to another, generalize for a specialised variant.
How does the use case diagram generator work?
A use case diagram in Chiltepin is a typed YAML block: the system name, a list of actors (people or systems, left or right of the boundary), a list of cases, links written as actor -> case, and relations with kind: include, extend or generalize. The renderer places the actors, the boundary and the ovals; chiltepin check validates every actor and case an arrow names.
Can an AI agent generate the use case diagram?
Yes. After npx skills add jdiejim/chiltepin -g the agent knows the block, runs chiltepin block usecase for the contract, and writes it from a request like "who uses the ticketing system for what". Because the agent can read the routes and the roles in the code, the actors and cases match the product, and the result is a diff you review.
Which other UML diagrams are supported?
Class diagrams (uml), package diagrams with dashed dependencies (pkg), timing diagrams with lifelines stepping through states (timing), sequence diagrams (sequence) and state machines (state). All are typed blocks with the same grammar, validated the same way. The skill maps the GoF and the common architectural patterns to block stacks, so "document the Strategy pattern" picks the right ones.
How many use cases should one diagram hold?
The schema caps a diagram at twelve cases, and the skill asks for verb phrases. Past that a use case diagram stops answering its question; split it by actor or by subsystem, or reach for a user story map (storymap) when the question is what to build in what order.
Open Studio — no signupSet up your agentnpx skills add jdiejim/chiltepin -g