malloy-phrase-detection
How to turn a storefront question into get_context search targets, including the shop vocabulary that does not appear anywhere in the model.
Skill by malloydata
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/malloydata-malloy-phrase-detection
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/malloy-phrase-detection
What's inside
- Skill name
malloy-phrase-detection- Description
- How to turn a storefront question into get_context search targets, including the shop vocabulary that does not appear anywhere in the model. Replaces the built-in phrase-detection guide for this package.
- License
- MIT
- Instructions
- 80 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Search target construction for storefront
This REPLACES the built-in `malloy-phrase-detection` for this package, so it has
to stand on its own. It covers the general rules briefly and then the part that
is specific here: the words people use for this business, none of which are
field names.
Once you have the entity names, read `storefront-conventions` before trusting a
measure. Several of them do not mean what they are called.
## The general rules, briefly
Send `search_text` on every target. Omitting it lists a catalog, capped per
source, and the cap drops the fields your question is about. Write it as a short
description of the concept, not the user's word back at us: "region" becomes
"the geographic region the customer lives in".
One target per distinct concept. Do not stack three dimension targets at the
same field.
Pick the target type by what the thing is:
- `dimension`: something to group or filter by, including dates and numeric
bands.
- `measure`: something aggregated. Counts, sums, rates, averages.
- `view`: a pre-built analysis. Ask for one before assembling your own.
- `dimensional_value`: a literal the user named ("Cancelled"). The one target
where echoing the user's word is right. Scope the call to the source once
you know it.
- `source`: use alone, never mixed with the types above in one call.
A numeric-looking category ("tier 2", "18-30") is a dimension, not a measure.
"Top N" with no metric named still needs a measure target for the ranking.
"How many" and "how much" ask for a measure even when no noun names it: add a
measure target for the quantity itself, because the filter ("in 2019") is the
loud part of the sentence and the count is the part that gets dropped.
## Storefront vocabulary
The left column is what people say. None of it appears in the model.
| They say | They mean | Target |
| --- | --- | --- |
| GMV, gross merchandise value, top line | `total_sales` | measure, "total revenue summed over sold line items" |
| AOV, basket size, average ticket | `avg_order_value` | measure, "average revenue per order" |
| units, units sold | `order_item_count` | measure, "count of line items sold" |
| SKU, item, article | a product | dimension, "the product sold" |
| category, department, product line | `category` | dimension, "product category" |
| territory, area, patch | `region` | dimension, "the customer's home sales region" |
| returns, RTV, send-backs | `return_rate` | measure, "share of line items returned" |
| margin, markup, profit | `margin_rate` or `total_margin` | measure, "gross margin, revenue minus product cost" |
Two more that need care rather than translation:
- **"Revenue" and "sales" both land on `total_sales`**, which includes cancelled
and returned lines. Retrieve it, then read `storefront-conventions` before you
report it.
- **"Profit" is not modelled.** `margin_rate` is gross margin over revenue and
nothing else. Retrieve it if that is what they want, and name it gross margin
in the answer.
## Words with no home here
Do not search for a near miss and answer with it. There is no entity for any of
these, and the honest answer names what is missing:
churn, retention, cohort, LTV, CAC, discount, coupon, tax, shipping cost,
delivery time, stock, inventory, warehouse, supplier, refund amount.
"Ship to" is the trap in that list: `region` looks like it answers it and does
not. It is where the customer lives.
## Finding a literal value
A `dimensional_value` target searches stored values where the server indexes
them. Where it returns nothing, target the dimension, then read its distinct
values with a query before filtering. `status` holds exactly `Complete`, `Shipped`, `Processing`,
`Returned`, `Cancelled`.From malloydata/publisher, MIT.
More from malloydata/publisher
- 0.784score
fix-scan-finding
malloydata
Fix a CRITICAL Trivy finding that is failing CI in this repo (a vulnerability, misconfiguration, or secret from security-scan.yml or image-scan.yml), or add…
SkillAFreshness: A★ 118Claude Code +9 - 0.784score
eval-answer
malloydata
Score one analytical answer against a verified golden, and score which of the entities the golden depends on retrieval delivered to the answerer.
SkillAFreshness: A★ 118Claude Code +9 - 0.784score
malloy-powerbi-review
malloydata
Move a Power BI semantic model (TMDL, PBIP, or .pbix) onto Malloy - read their model, transpile its DAX, and prove the numbers match.
SkillAFreshness: A★ 118Claude Code +9 - 0.784score
eval-improve
malloydata
Make the smallest safe edit that closes a diagnosed gap the model repo owns: a Malloy model edit, or a package skill under skills/.
SkillAFreshness: A★ 118Claude Code +9 - 0.784score
eval-import
malloydata
Turn a list of questions into an eval set, whatever shape it arrived in: a JSONL a customer sent, a CSV, a spreadsheet export, a markdown doc, an email…
SkillAFreshness: A★ 118Claude Code +9 - 0.784score
eval-diagnose
malloydata
Diagnose why a scored answer failed and who owns the fix, then cluster the failures by shared root cause.
SkillAFreshness: A★ 118Claude Code +9 - 0.779score
malloy-document
malloydata
Add documentation with #(doc) tags to Malloy models so fields and sources are described in plain language.
SkillAFreshness: A★ 118Claude Code +9 - 0.779score
malloy-analysis-report
malloydata
Combine validated Malloy queries into a report (a linear report, read top to bottom).
SkillAFreshness: A★ 118Claude Code +9 - 0.779score
malloy-getting-started
malloydata
First steps for using a Malloy Publisher deployment through its MCP tools.
SkillAFreshness: A★ 118Claude Code +9 - 0.779score
eval-judge
malloydata
Decide whether ONE answer matches its golden, and say whether you believe the golden.
SkillAFreshness: A★ 118Claude Code +9 - 0.779score
malloy-review
malloydata
Malloy semantic-model code review.
SkillAFreshness: A★ 118Claude Code +9 - 0.779score
eval-report
malloydata
Write the summary a person reads after an evaluation run: what ran, what it scored, which failures were the MODEL and which were the EVAL itself (out of…
SkillAFreshness: A★ 118Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 118
- Forks
- 31
- Open issues
- 106
- Last commit (this folder)
- Oct 12, 2026 (15 days ago)
- Last release
- Oct 18, 2026 (9 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/malloydata/publisher
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from malloydata
- 0.784score
eval-import
malloydata
Turn a list of questions into an eval set, whatever shape it arrived in: a JSONL a customer sent, a CSV, a spreadsheet export, a markdown doc, an email…
SkillAFreshness: A★ 118Claude Code +9 - 0.784score
eval-answer
malloydata
Score one analytical answer against a verified golden, and score which of the entities the golden depends on retrieval delivered to the answerer.
SkillAFreshness: A★ 118Claude Code +9 - 0.784score
eval-diagnose
malloydata
Diagnose why a scored answer failed and who owns the fix, then cluster the failures by shared root cause.
SkillAFreshness: A★ 118Claude Code +9 - 0.784score
fix-scan-finding
malloydata
Fix a CRITICAL Trivy finding that is failing CI in this repo (a vulnerability, misconfiguration, or secret from security-scan.yml or image-scan.yml), or add…
SkillAFreshness: A★ 118Claude Code +9 - 0.784score
eval-improve
malloydata
Make the smallest safe edit that closes a diagnosed gap the model repo owns: a Malloy model edit, or a package skill under skills/.
SkillAFreshness: A★ 118Claude Code +9 - 0.784score
malloy-powerbi-review
malloydata
Move a Power BI semantic model (TMDL, PBIP, or .pbix) onto Malloy - read their model, transpile its DAX, and prove the numbers match.
SkillAFreshness: A★ 118Claude Code +9
Cite this page
malloy-phrase-detection skill. Agent Mart. https://agentmart.dev/skills/malloydata-malloy-phrase-detection (last updated 2026-10-24)