From motley
Explore available models before building documents. Covers listing models, inspecting schemas, and creating custom models/measures.
How this skill is triggered — by the user, by Claude, or both
Slash command
/motley:explore-modelThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Explore available models to understand what data is available before building documents. This is typically the first step in any report creation workflow.
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 datanpx claudepluginhub motleyai/motley-skills --plugin motleySearches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.