storefront-conventions

storefront-conventions is a skill for Claude Code, Codex from malloydata/publisher. It costs 41 tokens per session (690 once invoked), scanned A, original, MIT.

A reference for interpreting measures in a storefront package, including the difference between product lines and orders. A line item is one product entry on an order, while an order may contain several line items.

In plain words
What is it for?
Use it when analysing storefront revenue, orders, margins, or regional results against the package's data model.
Why use it?
It prevents common counting and revenue mistakes, such as counting rows as orders or including cancelled and returned sales when the question asks for realised revenue.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when analysing storefront revenue, orders, margins, or regional results against the package's data model.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/malloydata/publisher/storefront-conventions
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add malloydata/publisher --skill storefront-conventions
Clone the repo
git clone --depth 1 https://github.com/malloydata/publisher

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for storefront-conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/malloydata/publisher/storefront-conventions/github.svg)](https://agentmods.dev/skills/malloydata/publisher/storefront-conventions)
Your own site
<a href="https://agentmods.dev/skills/malloydata/publisher/storefront-conventions"><img src="https://agentmods.dev/badge/skills/malloydata/publisher/storefront-conventions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for storefront-conventions

Your own site · 80×15
<a href="https://agentmods.dev/skills/malloydata/publisher/storefront-conventions"><img src="https://agentmods.dev/badge/skills/malloydata/publisher/storefront-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 690 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.00690
Opus 5.5 $0.00016 $0.00276
Sonnet 5.5 $0.00008 $0.00138
Haiku 4.5 $0.00004 $0.00069

Measured 3d ago against content hash 4199d637759d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

storefront-conventions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/storefront/skills/storefront-conventions/SKILL.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Storefront conventions

Everything here is a property of this package's model, not of Malloy. The numbers quoted were measured against the bundled data on 2026-09-04 and are there to show the size of each effect, not to be reused as answers.

The grain is a line item

order_items has one row per product sold on an order. 25,356 rows, 11,000 orders.

So order_item_count (count()) counts lines and order_count (count(order_id)) counts orders. A question about orders that reaches for the row count is wrong by a factor of about 2.3 here.

total_sales includes cancelled and returned lines

This is the one that bites. total_sales is sale_price.sum() over every row, with no status filter:

Scope Revenue
Everything (total_sales as defined) 2,098,177.97
Excluding Cancelled and Returned 1,905,657.16

9.2% of what the model calls revenue is a line that was cancelled or sent back. Nothing in the field name or its #(doc) says so.

Decide which one the question wants, and say which you used. If it wants realised revenue, filter it yourself:

run: order_items -> {
  where: status != 'Cancelled' and status != 'Returned'
  aggregate: total_sales
}

status takes five values: Complete, Shipped, Processing, Returned, Cancelled. Every line on an order shares that order's status, so filtering lines by status does not split an order across groups.

return_rate is a share of lines

return_rate is returned line items over all line items. It is not the share of orders that had a return. If the question is about orders, aggregate order_count with a Returned filter against total order_count instead.

region is where the customer lives

regions joins through customers.state, so region is the customer's home region. It is not a shipping destination or a sales territory. A question about where goods went cannot be answered from this model.

margin is gross, and per line

gross_margin is sale_price - products.cost on a single line, and margin_rate is total_margin / total_sales. Cost of goods only: no discounts, no shipping, no returns netted out, no operating cost. Call it gross margin in the answer, never "profit".

Read the full file on GitHub · 76 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 76 lines · 41 tokens per session scan A 4199d637759d

Subscribe to this mod's changes

storefront-conventions is a skill published in the GitHub repository malloydata/publisher (118 stars, last pushed today), licensed MIT. It adds 41 tokens to every session and 690 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-13.

Related

Other skills, from other repositories

ckjia-shopping

A shopping search and price-comparison tool for Taobao, JD.com, Tmall, and Pinduoduo, with image-based product recognition. It requires the ckjia-shopping service and its access key to be enabled.

mateaix/mateclaw · 64 tokens

reimagine-it-extract

Emit the content signals reimagine-it reads from an HTML file — title, anchors, proper nouns, dates, numbers, emails, links, source hex colors, and the derived palette — as JSON without generating a redesign. Use when the user says /reimagine-it extract, "what does the engine see in this page", "extract the palette"…

Kayforkind/reimagine-it · 133 tokens

reusable-visualization

Build ONE reusable chart visualization component that receives its data and its settings from the host application instead of fetching them, and declares the fields and config options the host exposes to viewers. Use this whenever a single chart component is reused across many different queries rather than built for…

lightdash/lightdash · 102 tokens

developing-in-lightdash

Use when reading, creating, and editing Lightdash dashboards and charts as JSON, including dashboard layout and chart-type-specific configuration.

lightdash/lightdash · 31 tokens

sdk-features

Map Lightdash SDK capabilities to their host-UI names and the app-code wiring each needs. Use when the user asks about a feature by name (Inspect data, drill-down, exports, shareable URLs), when offering newly available features after a template upgrade, or when wiring a host-facing capability into the app.

lightdash/lightdash · 67 tokens

upgrade-preflight

Checks whether a self-hosted Lightdash upgrade is safe to run, and reads the tooling's answer without over-reading it. Use when upgrading a self-hosted instance, planning a maintenance window, answering "is this upgrade safe", or recovering a failed, hung, parked or lock-stuck migration — covers lightdash…

lightdash/lightdash · 101 tokens