Stats
Actions
Tags
From baml
Visualizes existing BAML schemas or designs new ones from task descriptions, generating mermaid class diagrams and BAML code.
How this command is triggered — by the user, by Claude, or both
Slash command
/baml:baml-schema file|function|task-descriptionFiles this command reads when invoked
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Visualize/Design BAML Schema Create or visualize BAML schemas with mermaid diagrams. ## Modes ### Visualize Existing Schema If `$ARGUMENTS` is a file path or function name: 1. Read the schema 2. Generate mermaid class diagram 3. Show relationships between types ### Design New Schema If `$ARGUMENTS` describes a data extraction task: 1. Analyze requirements 2. Design appropriate BAML types 3. Create mermaid visualization 4. Generate complete BAML code ## Visualization Output For a schema like: Generate: ## Design Mode If `$ARGUMENTS` describes a task like "extract meeting notes...
Create or visualize BAML schemas with mermaid diagrams.
If $ARGUMENTS is a file path or function name:
If $ARGUMENTS describes a data extraction task:
For a schema like:
class Invoice {
vendor Company
line_items LineItem[]
total float
}
class Company {
name string
address string
}
class LineItem {
description string
quantity int
price float
}
Generate:
classDiagram
class Invoice {
+Company vendor
+LineItem[] line_items
+float total
}
class Company {
+string name
+string address
}
class LineItem {
+string description
+int quantity
+float price
}
Invoice --> Company : vendor
Invoice --> LineItem : line_items
If $ARGUMENTS describes a task like "extract meeting notes":
Ask clarifying questions (if needed):
Generate schema:
class ActionItem {
assignee string
task string
due_date string?
}
class MeetingNotes {
title string
date string
attendees string[]
action_items ActionItem[]
}
function ExtractMeetingNotes(transcript: string) -> MeetingNotes {
client GPT4
prompt #"
Extract meeting notes:
{{ transcript }}
{{ ctx.output_format }}
"#
}
test MeetingTest {
functions [ExtractMeetingNotes]
args {
transcript "Meeting on Jan 15..."
}
}
$ARGUMENTS can be:
/baml-schema baml_src/invoice.baml/baml-schema ExtractInvoice/baml-schema extract receipt data from imagesnpx claudepluginhub agentic-insights/foundry --plugin baml