/databrill-core:dbl-search-intentfrom databrill-core
Draft, with the seller, the search-term categories and rules of one Amazon store that sort its advertised search terms on the Search intent tab of the PPC dashboard, and save them. Use when the user asks to set up or update search intent, categorise or classify search terms, rate search-term relevance, mark brand or competitor terms, or exclude irrelevant search terms. Do not use for reading ad metrics (dbl-metrics-ads), product families (dbl-brand-config) or other reads (dbl-db).
Ships in databrill-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Read with the core MCP server's executeSql tool and write with its
writeSql tool, into two tables: brand_config_amazon_search_term_category
(the categories) and brand_config_amazon_search_term_rule (the patterns that
put a search term into a category, adjust its relevance or exclude it). The
Search intent tab of the PPC dashboard classifies every advertised search term
of the store with them. Read ${CLAUDE_PLUGIN_ROOT}/docs/search-intent-rules.md
before drafting: it has every column and value, what a row may hold, the steps
that classify a term, and the reads that steps 1 to 4 run.
On user- and organization-scoped connectors, call listWorkspaces and pass the
selected wsid to every call. Never infer it from a result with one entry.
executeSql — one read-only statement. It takes no bind parameters, so
the store's values are quoted literals in the SQL, with every ' inside a
value doubled ('Kid''s mug'). Pass limit: 1000 when a
query's LIMIT is above the default of 500 rows.writeSql — sql, exactly one statement, and wsid. It is announced
only on a read-write connector session. Each call runs in one transaction
under a 15-second timeout, so split a large rule set over several calls.Example: "set up search intent for our US store" → step 1's query with
executeSql, and after the seller approves the draft, one writeSql call per
table:
INSERT INTO "brand_config_amazon_search_term_category"
("merchantId", "marketplaceId", "termCategory", "position", "brand", "comment")
VALUES
('<merchantId>', '<marketplaceId>', 'Own brand', 10, 'OWN', 'brand and line names'),
('<merchantId>', '<marketplaceId>', 'Travel mug', 40, NULL, NULL)
ON CONFLICT ("merchantId", "marketplaceId", "termCategory") DO UPDATE
SET "position" = EXCLUDED."position", "brand" = EXCLUDED."brand",
"comment" = EXCLUDED."comment", "updatedAt" = now()
RETURNING "termCategory", "position";
If writeSql is not in the tool list, the session is read-only: the connector
URL decides it, not a permission. Ask the seller to set the plugin's Databrill
MCP URL to the same URL with /rw on the end (replacing a trailing /ro) and
to reconnect; see ${CLAUDE_PLUGIN_ROOT}/docs/configuration.md. Do not ask for
a database password.
writeSql returns meta.rowsAffected, meta.returnedRowCount,
meta.isTruncated and the RETURNING rows in data. Never report a write as
done until rowsAffected equals the number of rows sent; when it is lower, say
which rows the RETURNING list lacks. meta.isTruncated on a write caps only
the returned rows, never the write itself: do not re-run it, read the rest with
executeSql. A read with meta.isTruncated is a partial picture: narrow it, or
say what is missing.
The tables declare their keys and one foreign key, and no check constraint. A
misspelled effect, a pattern in upper case or a modifier with relevance 3 is
stored without an error, takes no part in the classification, and only shows on
the tab with its problem. Check every drafted row against "What a row may
hold" in the model before writing it, and every FAMILY rule's product
against the families step 2 returns: it is one of them, or the first parts of
one before a :. A family nobody has is valid and matches nothing.
Run the read "The stores" in the model. If more than one store has clicks, ask which one. One run drafts one store, and stores are never combined: two stores of one owner get separate rules.
Run the read "The store's products" in the model. The titles show the own brand
and product-line names, and what each family sells. This skill creates no
families; if advertised ASINs have none, say so and point to dbl-brand-config.
A family name with parts separated by : (Mug:Travel, Mug:Desk) lies
within the family its first parts name (Mug): a rule meant for a whole product
line goes once on the line's name, not once per family within it.
Run the three reads of "The search terms" in the model: the most-clicked terms per ad type × placement, the words and two-word sequences, and clicks per family for candidate words you choose from those two results and the titles. Count each Sponsored Brands key once, as their shared beginning does: summing every row counts a key reported both as an aggregate row and as per-ASIN rows twice.
Run the two reads of "The existing rules" in the model, also when the seller asks to set up rather than update: they are how a run finds out it is a re-run. If they return rows, draft changes to those rows rather than a new set.
A seed names the product: it is what a buyer would answer, in a few words, when asked what is in the shopping bag ("a travel mug", "a kids' water bottle"). Draft every row from that test.
exclusiveWithin on one of its words. A topic word
alone ("insulated") or a kind word alone ("mug") is a seed only when buyers
call this product just that; otherwise it is a modifier or nothing.STORE modifier of +2. An own brand so tied to one product that its name
alone sells well is a seed at 2 instead.STORE only for what every product of the store is; a
product line's rules on its family, or once on the line's name when its
families are named <line>:<…>; ASIN modifiers for words that tell one
listing from its siblings (size, colour, pack). Negative FAMILY modifiers
for words that contradict a family's audience.|a|b|) are only ways of
writing one term: spellings, typos, plurals (|mug|mugs|,
|first year|1st year|). Different terms get different rows, and every
competitor brand its own.exclusiveWithin only where a term must be negated for the store's other
products, and step 3 shows those products getting its clicks. A product added
later is excluded from every such term without anyone noticing, so each one
needs that reason. Never on an inactive or unadvertised family unless the
seller names it.EXCLUDE at STORE for product kinds the store does not sell, and at
FAMILY for words that put a term out for that family only.Apply the classification steps of the model to the top terms of step 3, on the ASINs they ran on. The seeds and exclusions should decide terms carrying at least 80% of the clicks on terms made of words. List the largest unmatched terms with their clicks, and every term that falls into two groups on different ASINs.
In plain text, with the evidence from steps 2 and 3 beside each question:
PARTNER);exclusiveWithin: does only this product line sell the term, and
which ASINs lose it, with their clicks and orders on it;exclusiveWithin: it
counts while its row exists.Show both tables in full, row by row, every column but the store columns and
the timestamps, in table order, an empty cell for NULL and a | inside a
pattern written \|; then the share of clicks the rules decide and the largest
unmatched terms. Ask the seller to
approve it. No writeSql before the seller says yes to that draft. After
any change, show the changed rows again and ask again.
termCategory has a
foreign key onto the category. Deletes go the other way: rules first, then the
categories they named.INSERT INTO "brand_config_amazon_search_term_rule"
("merchantId", "marketplaceId", "level", "product", "matchKind", "pattern", "effect",
"termCategory", "relevance", "exclusiveWithin", "comment")
VALUES
('<merchantId>', '<marketplaceId>', 'STORE', '*', 'ALL_WORDS', 'travel mug*', 'SEED',
'Travel mug', 3, NULL, NULL),
('<merchantId>', '<marketplaceId>', 'FAMILY', 'TRAVEL_MUG', 'ALL_WORDS', 'kid*', 'EXCLUDE',
NULL, NULL, NULL, 'not for children')
ON CONFLICT ("merchantId", "marketplaceId", "level", "product", "matchKind", "pattern", "effect")
DO UPDATE SET "termCategory" = EXCLUDED."termCategory", "relevance" = EXCLUDED."relevance",
"exclusiveWithin" = EXCLUDED."exclusiveWithin", "comment" = EXCLUDED."comment",
"updatedAt" = now()
RETURNING "level", "product", "matchKind", "pattern", "effect";
DELETE FROM "brand_config_amazon_search_term_rule" WHERE ("merchantId", "marketplaceId", "level", "product", "matchKind", "pattern", "effect") IN (VALUES (…), (…)) RETURNING "pattern".UPDATE of its termCategory, which carries
over to its seeds. An upsert under the new name adds a second category.Then tell the seller where the result appears: the Search intent tab of the PPC dashboard, which also lists any row it could not use, with its problem.
dbl-brand-config for product families and ASIN-to-family mapping, which the
FAMILY rules depend on. dbl-metrics-ads for the advertising metrics of the
terms. dbl-db for any other read. dbl-setup for the connector URL and
connection problems.
What SKILL.md sets; muted values are Claude Code's defaults
19 skills in this plugin
/dbl-ask-inventory-pacingRecommend how advertising should respond to inventory — pause, throttle, hold, or ramp spend based on each product's runway. Use when the user asks "should we pause ads before the stockout", "we're low on stock, what about ads", "should we cut spend to stretch inventory", "we restocked — ramp back up?", "how do we sell down overstock", "long-term storage fee risk", or wants an inventory-driven ad pacing decision./dbl-ask-sales-dropDiagnose why a store's sales dropped — decompose the change into traffic, conversion, and price, and flag ad-channel and ad-efficiency causes. Use when the user asks "why did sales drop / fall / decline", "sales are down", "revenue dropped", "why did orders fall", "what happened to sales (week-over-week)", or wants a sales-decrease diagnosis for a marketplace./dbl-npx claudepluginhub databrill/databrill-core-agent-plugin --plugin databrill-coreOther plugins' skills for the same job