Skip to content
Agentmart
Submit a tool

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

IndexedMIT★ 118
Write a review

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.

We use your email only for this newsletter. Privacy

About

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.

No 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

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
    First seen
    Oct 24, 2026
    Last checked
    Oct 24, 2026

    More from malloydata

    Cite this page

    malloy-phrase-detection skill. Agent Mart. https://agentmart.dev/skills/malloydata-malloy-phrase-detection (last updated 2026-10-24)