skills/explore-model/SKILL.md
Explore available models before building documents. Covers listing models, inspecting schemas, and creating custom models/measures.
npx skillsauth add motleyai/agent-skills explore-modelInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Explore available models to understand what data is available before building documents. This is typically the first step in any report creation workflow.
Use models_summary to see all available models and their schemas:
models_summary()
Returns for each model:
For a compact overview (names only, no types/descriptions):
models_summary(verbose=false)
Use inspect_model to get detailed information including sample data:
inspect_model(
model_name="revenue",
num_rows=3,
show_sql=false
)
Returns:
show_sql=true)Tip: Always inspect models relevant to your document before writing chart/query prompts. Knowing exact measure and dimension names leads to better results.
Time dimensions can be grouped at: DAY, WEEK, MONTH, QUARTER, YEAR
When writing prompts, specify the granularity you want (e.g., "monthly revenue", "quarterly breakdown").
For full details on data types and constraints, see model-guide.md.
When existing models don't have the data you need, create a new model from a SQL query:
create_model(
model_name="monthly_order_summary",
sql="SELECT DATE_TRUNC('month', created_at) AS month, customer_id, COUNT(*) AS order_count, SUM(amount) AS total_amount FROM orders GROUP BY 1, 2",
column_descriptions=[
{"name": "month", "description": "Order month"},
{"name": "customer_id", "description": "Customer identifier"},
{"name": "order_count", "description": "Number of orders"},
{"name": "total_amount", "description": "Total order value"}
],
datasource_name="my_datasource" -- optional if only one datasource exists
)
The new model:
Use edit_model to add computed measures, add computed dimensions, and/or delete existing measures/dimensions on a model, all in a single call:
edit_model(
model_name="orders",
measures=[
{
"name": "large_order_count",
"sql": "CASE WHEN amount >= 1000 THEN 1 ELSE 0 END",
"type": "sum",
"description": "Count of orders >= $1000"
},
{
"name": "revenue_per_order",
"sql": "amount",
"type": "avg",
"format": "currency",
"description": "Average revenue per order"
}
],
dimensions=[
{
"name": "size_bucket",
"sql": "CASE WHEN amount < 100 THEN 'Small' WHEN amount < 1000 THEN 'Medium' ELSE 'Large' END",
"type": "string",
"description": "Order size category"
}
],
delete_names=["old_measure", "unused_dimension"]
)
All parameters except model_name are optional — include only what you need:
Measure types: count, count_distinct, count_distinct_approx, sum, avg, min, max, number
Format options: percent, currency, integer, float
Dimension types: string, time, date, boolean, number
models_summary — get the big picture of available datainspect_model with num_rows=3 to see real datadevelopment
Create branded HTML presentations using structured slide specs. Outputs JSON DeckSpec instead of raw HTML — the server handles all rendering, styling, and viewport fitting.
data-ai
Create or modify text blocks using update_text_block. Covers template syntax with variable references, LLM generation, and constrained outputs.
data-ai
Create or modify table blocks using update_table_block. Covers template syntax, target_shape constraints, and table generation patterns.
data-ai
Create or modify numerical query blocks within text or table blocks using update_query_block. Queries provide data values referenced as {query_name} in parent templates.