/dak:discover-assetsfrom dak
Discovers and inspects GCP data assets (tables, datasets, views) using Knowledge Catalog MCP tools. Retrieves schemas, metadata, domain context, and governance policies for enterprise data discovery.
Ships in dak. 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.
Discover enterprise data assets (tables, datasets, views, data products, files),
surface domain context (authoritative data sources, business definitions, metric
formulas, data-quality rules, and verified enterprise metadata), and inspect
schemas, column descriptions, and systems of record using Knowledge Catalog MCP
tools (search_entries and lookup_context).
If the catalog returns no match after fallbacks, report that honestly; never invent a business definition, metric formula, table, or SQL from prior knowledge. Empty is a valid answer.
<project>.<dataset>.<table> (see Step
0.5), you MUST invoke search_entries 4 times in parallel (2
parent_entrygroup_type=context-set variations + 2 broad semantic domain
variations). When an asset or short table name is already provided, follow
the Step 0.1–0.4 fast paths instead.Invoke the Knowledge Catalog MCP tools directly:
search_entries {"project_id": "<project_id>", "query": "customer orders revenue transactions"}
lookup_context {"project_id": "<project_id>", "location": "us", "resources": ["projects/<project_id>/locations/us/entryGroups/@bigquery/entries/bigquery.googleapis.com/projects/<project_id>/datasets/sales_ds/tables/orders"]}
(Fallback for CLI-only environments where Knowledge Catalog MCP tools are not
loaded: use gcloud dataplex entries search "<QUERY>" --project="<project_id>" --semantic-search --limit=50 and gcloud dataplex context lookup --project="<project_id>" --location="<location>" --resources="<FULL_ENTRY_NAME>".)
Before running the 4-query discovery search in Steps 1–2, check whether the asset was already identified and pick the shortest path that fits:
name,
schema, or domain context, reuse it directly — do not re-run
search_entries or lookup_context for the same asset and proceed directly
to your task (writing SQL/code or answering the question).bigquery-public-data): If the request targets
bigquery-public-data or if the requested asset belongs to
bigquery-public-data, skip search_entries and lookup_context entirely
and inspect the table directly using BigQuery MCP tools (get_table_info,
list_table_ids) or the bq CLI (bq show).project.dataset.table, catalog.namespace.table, or schema.table),
skip the 4-query parallel search in Step 1. Run 1 targeted
search_entries call with "query": "name:<table>" (adding
projectid:<project> only if the first segment is a known GCP project ID,
or system=<SYSTEM> if the system is known) to obtain the exact
dataplex_entry.name, call lookup_context on it (Step 3), and then
proceed directly to Step 4 or return the schema/metadata directly if no SQL
query is needed. (Skip Step 1 and Step 2.)table_name without dataset): (Skip
Step 1 and Step 2, call search_entries as shown below, and proceed
directly to Step 3.)
search_entries once to locate
the table, then proceed directly to Step 3B (lookup_context on the
matched table): search_entries {"project_id": "<project_id>", "query": "name:<table_name> projectid:<project_id>"} (omit
projectid:<project_id> if the target table may live in another
project).search_entries twice in parallel — 1 targeted
table search + 1 Context Set search using 2–3 space-separated domain
nouns from the prompt (no AND/OR operators) — then proceed to Step
3A:
search_entries {"project_id": "<project_id>", "query": "name:<table_name>"}search_entries {"project_id": "<project_id>", "query": "<2-3 domain keywords> parent_entrygroup_type=context-set"} (e.g.,
"orders revenue parent_entrygroup_type=context-set")search_entries workflow (2
parent_entrygroup_type=context-set queries + 2 broad semantic queries).Analyze the user's natural language request, break it down into semantic components, and construct valid Knowledge Catalog search queries. Do not just search for raw user text.
1.1. Semantic Decomposition: Read the user request carefully. Break it
down into semantic components: identify core entities, required metrics, and
critical scope constraints (projects, locations, etc.). Do not add
system, type, or column filters by default so data and domain
context can be searched across different data sources.
1.2. Think Like a Data Engineer: Users ask high-level business questions; translate business concepts into how data is actually stored in database terminology (e.g., translate "orders and receipts" to "purchase_orders", "bookings", "receipts", "drops", or "consignments").
1.3. Construct Search Queries: Build 2 DISTINCT natural language query variations:
column: filters by default unless the user explicitly asks for a
specific column name).From these 2 variations, construct all 4 parallel search_entries
queries for Step 2:
parent_entrygroup_type=context-set (requires =, never :) to
each variation, with no other filters (no projectid, system,
type, column, parent, etc.). These return Context Set child
entries directly in a single turn.projectid:). Never execute only 1 or 2 queries total; all 4 parallel
searches are required.1.4. Extract Predicates & Tool Arguments: Map explicit scope keywords in the request (such as project ID or location) to valid predicates (see the Predicate Reference below).
project_id tool parameter (REQUIRED): Always pass
"project_id": "<project_id>" in every search_entries and
lookup_context tool call for consumer GCP project billing and
attribution.projectid: query predicate: To filter search results to a specific
GCP project ID, append projectid:<project> inside "query" ONLY on
the 2 broad queries (Queries 3 & 4). Never add projectid: to the
Context Set queries (Queries 1 & 2).location handling: If the user explicitly provides a location,
append location=<location> inside "query" on the broad
search_entries calls, and pass "location": "<location>" in the tool
arguments for lookup_context.1.5. Format Constraints & Syntax Guardrails:
system, type, or column Filters by Default: Do not
add query filters that restrict by system, type, or column by
default in Step 2 so that data and domain context can be searched across
different data sources (e.g., BigQuery, BigLake, Spanner, Cloud SQL,
AlloyDB, Vertex AI, filesets, and custom context entries). Express
column names, asset types, or source systems as plain free-text keywords
unless the user explicitly asks for a specific column name, system, or
asset type. NEVER include system, type, or column filters in
Context Set queries (parent_entrygroup_type=context-set) or in Step 3B
when searching for a rules-sheet-named table.(customer orders revenue transactions)).| (e.g., projectid:(p1|p2)).name:projects/<project>/locations/<location>/entryGroups/<group1>/entries/*
or projectid:sales_*. The colon (:) operator is already a native
substring match.{"project_id": "<project_id>", "query": "customer orders revenue transactions projectid:finance-prod"}).AND, OR) are used, they
must be uppercase.-) for negation (e.g., -name:test, -name:staging).Execute all 4 search_entries calls simultaneously in parallel in a single
turn (never just 1 or 2):
search_entries {"project_id": "<project_id>", "query": "<query_variation_1> parent_entrygroup_type=context-set"}
search_entries {"project_id": "<project_id>", "query": "<query_variation_2> parent_entrygroup_type=context-set"}
search_entries {"project_id": "<project_id>", "query": "<query_variation_1>"}
search_entries {"project_id": "<project_id>", "query": "<query_variation_2>"}
lookup_context)Documentation is read first and decides; table metadata is read second and must agree with it.
dataplex_entry.entry_type ending in
/entryTypes/document, under a custom entryGroups/<group>, not a system
entry group @<system>) naming the question's business entities FIRST in
Step 3A before any table is chosen—they are the independent authority for
sources, definitions, and rules.Lookup cap: look up at most 3 entries in total per question with
lookup_context, counted across both passes and all calls; every entry looked
up is added to the context. Spend them only on entries the answer will use, in
this order: Context Set entries that name one of the question's business
entities; then each entity's documented source; then a bridge table the join
needs. Never look up a table already ruled out from its search-result
description. Beyond the cap, use what the search results already show. The
follow-up in Step 3C is the only exception to this cap.
Look up the Context Set entries and other documentation entries (glossary or guidance entries) that cover the question's domains, within the lookup cap above. From them write a short rules sheet, quoting the text:
If a table's description directs you to another table, use the table it points
to. Mark any item the documentation does not settle as open.
For EACH entity, look up only the table you will query, within the lookup cap
above. If the table the rules sheet names was not in the search results, run ONE
more search_entries call for it first (NEVER include system, type, or
column filters in this search). For open entities, decide from the
descriptions and lineage; if still tied, see Step 4 item 1. Read each looked-up
table's own notes for data-quality rules (duplicates, latest-record-wins, soft
deletes) and add them to the rules sheet.
dataplex_entry.entry_type
projects/dataplex-types/locations/global/entryTypes/data-product are Data
Products: curated, owner-certified bundles of the domain tables and datasets
for a business area. Treat them as lookup candidates even though their
fully_qualified_name is empty and they are not table entries. Pass their
dataplex_entry.name (e.g.,
projects/<project>/locations/<location>/entryGroups/@dataplex/entries/projects/<project>/locations/<location>/dataProducts/<id>)
to lookup_context unchanged.dataplex_entry.name (the catalog entry identifier) in
the resources parameter of lookup_context.dataplex_entry.entry_type,
dataplex_entry.entry_source.resource,
dataplex_entry.entry_source.system), never regex on entry names.<location>
segment of each entry name (projects/<project>/locations/<location>/...,
or dataplex_entry.entry_source.location); Context Set entries and tables
may differ, so never hardcode "us" or "global". All resource entry paths
passed in a single lookup_context call MUST belong to the same
<location>. Within each pass, make ONE lookup_context call per location
and emit all calls of the pass in parallel in a single turn:lookup_context {"project_id": "<project_id>", "location": "<location>", "resources": ["projects/<project>/locations/<location>/entryGroups/<group>/entries/<entry_1>", "projects/<project>/locations/<location>/entryGroups/<group>/entries/<entry_2>"]}
{} Response Means Wrong location: If lookup_context returns
an empty {} object with no error, the "location" parameter did not match
the entry's actual region. Extract the exact <location> segment from the
entry path (projects/<project>/locations/<location>/..., or run a name:
search if the entry path was constructed manually) and retry
lookup_context once with that location.PERMISSION_DENIED or SERVICE_DISABLED: If
search_entries or lookup_context fails with PERMISSION_DENIED or
SERVICE_DISABLED, stop immediately without retrying search variations;
report the missing permission (dataplex.projects.search,
dataplex.entries.get, or roles/dataplex.catalogViewer) or disabled API
(dataplex.googleapis.com). If an asset exists in GCP but is not yet
indexed in the catalog, you may fall back to native inspection (bq show,
gcloud spanner databases ddl describe, gcloud storage ls).If an entity still has no confident candidate after 3B, run ONE targeted
search_entries call for it (e.g., by name: or its join key with column:)
and look up the result, within the lookup cap.
When a Data Product
(projects/dataplex-types/locations/global/entryTypes/data-product) is looked
up—or when the lookup response's relatedResources lists a Data Product
(type: Data Product, catalogEntry ending in /dataProducts/<id>)—use its
context to choose the tables for SQL:
dataProduct.assets (curated tables and datasets for the domain) and
relatedResources (full name, description, and schema of each table
asset). Use these curated assets as your primary candidates when they
cover the entities in the request.relatedResources lists a Data Product
(type: Data Product, catalogEntry ending in /dataProducts/<id>)
matching the request's domain, only count a table as a curated asset of
that Data Product when its dataProduct.assets lists the table (or when
the lookup call had a single resource)—prioritize those curated assets
as primary candidates for SQL over competing tables outside the Data
Product.search_entries call inside it (<core terms> parent:<dataset>, with no
system, type, or column filters), apply 3C.2 to the returned tables,
and issue ONE follow-up lookup_context call on the table whose description
and grain best match the user's request.(Apply Step 4 only when generating or executing SQL to answer a data question; if you only need asset IDs and schemas for a calling skill such as Spark, Dataform, dbt, or Notebook setup—or for a pure discovery request—stop after Step 3 and return the discovered metadata.)
Read the lookup payloads and write this contract explicitly, one line per item, citing the metadata that supports each. SQL must follow it.
Probe and check queries bill the user's BigQuery project: keep each one to the question's time window and include the partition filter on partitioned tables (tables that require one reject queries without it).
open entities, prefer the curated
asset chosen in Step 3C; otherwise decide by lineage direction (upstream
over derived) and freshness/deprecation notes; if still tied, run one cheap
probe per candidate (row count, distinct keys, max date) and prefer the
current, complete one. If entities live in different systems, use each
system's own authoritative table; do not substitute a single table that
merely contains similar columns.QUALIFY ROW_NUMBER() OVER (PARTITION BY <documented key> ORDER BY <documented tie-break>) = 1, never put a window function in WHERE;
normalize join keys on both sides). Before the final answer, run one check:
each cleaning CTE has COUNT(*) = (SELECT COUNT(*) FROM (SELECT DISTINCT <key> FROM cleaning_cte)) at its documented grain. If not equal, the rule
is not applied — fix the SQL; never answer from uncleaned rows. If the raw
table has duplicate keys and no rule is quoted, re-read its column and table
descriptions for one before choosing how to resolve them.LIMIT, sample or top-N.Then pass the contract, with the full untruncated lookup payloads (schemas, column descriptions, aspects, overview, data-quality notes, join keys), to SQL generation. After running the SQL, confirm the result matches every contract line before giving the final answer.
Strictly adhere to official Knowledge Catalog operator syntax when appending
predicates to query. Exact-match predicates require =; substring and
hierarchy predicates require : (never add system, type, or column
filters by default in Step 2 or in Context Set queries; see Step 1.5).
parent_entrygroup_type — Operator: = | Syntax:
parent_entrygroup_type=context-set | Rule: Matches Context Set child
entries; append ONLY this predicate to Queries 1 & 2 in Step 2.system — Operator: = | Syntax: system=BIGQUERY,
system=CLOUD_SQL, system=CLOUD_SPANNER, system=(BIGQUERY|BIGLAKE) |
Rule: Matches source system (BIGQUERY, BIGLAKE, CLOUD_SQL,
CLOUD_SPANNER, ALLOYDB, STORAGE, CLOUD_BIGTABLE, CLOUD_PUBSUB,
VERTEX_AI; case-insensitive); use ONLY when user names a system.type — Operator: = | Syntax: type=TABLE,
type=(TABLE|VIEW), type=DATA_PRODUCT | Rule: Matches asset type
(TABLE, VIEW, DATASET, DATA_PRODUCT, storage-bucket,
storage-folder); use type=DATA_PRODUCT when asked for a Data Product.location — Operator: = | Syntax: location=us-central1 |
Rule: Exact match on resource location inside query.labels — Operator: = | Syntax: labels.env=prod | Rule:
Exact match on resource labels (label.<key>=<value> in CLI keyword mode).aspect — Operator: : and = | Syntax:
aspect:governance.tier=RESTRICTED | Rule: Exact match on aspect field
(aspect:<type>.<field>=<value>).has — Operator: : | Syntax:
has:dataplex-types.global.overview | Rule: Checks existence of an
attached aspect type (has:<aspect_type>).parent — Operator: : | Syntax: parent:thelook_ecommerce |
Rule: Scopes search to a BigQuery dataset (parent= is invalid).projectid — Operator: : | Syntax: projectid:finance-prod,
projectid:(p1|p2) | Rule: Filters to GCP project IDs inside query
(also pass "project_id" in tool args).column — Operator: : | Syntax: column:customer_id,
column:(id1|id2) | Rule: Substring match on column names; use ONLY
when user asks for a column name or in Step 3B join-key fallback.name — Operator: : | Syntax: name:orders_daily | Rule:
Substring match on entry resource name.description — Operator: : | Syntax: description:orders |
Rule: Substring/free-text match in description (never use =).displayname — Operator: :, = | Syntax:
displayname:orders, displayname="Daily Orders" | Rule: Matches
display name (: for substring, ="value" for exact).-) — Operator: - | Syntax: -type=MODEL,
-name:test | Rule: Excludes matching entries from results.Query: Customer orders and revenue
search_entries {"project_id": "<project_id>", "query": "customer orders revenue transactions parent_entrygroup_type=context-set"}search_entries {"project_id": "<project_id>", "query": "customer orders revenue transactions"}End-to-End Context Set Discovery & Prioritized Lookup (Step 2 -> Step 3):
Query: Search for sales data in project finance-prod
Turn 1 (Step 2 — 4 Parallel Searches: 2 Context Set Variations without other filters + 2 Broad Variations):
search_entries {"project_id": "finance-prod", "query": "sales revenue transactions parent_entrygroup_type=context-set"}search_entries {"project_id": "finance-prod", "query": "sales_amount order_total gross_sales parent_entrygroup_type=context-set"}search_entries {"project_id": "finance-prod", "query": "sales revenue transactions projectid:finance-prod"}search_entries {"project_id": "finance-prod", "query": "sales_amount order_total gross_sales projectid:finance-prod"}Turn 2 (Step 3A — Prioritize Context Set Entry in lookup_context
using its own "location", before looking up candidate tables in Step
3B):
lookup_context {
"project_id": "finance-prod",
"location": "<context_location>",
"resources": ["projects/finance-prod/locations/<context_location>/entryGroups/sales-commerce-context-set/entries/<context_entry>"]
}
Query: Find customer analytics data in region europe-west1
search_entries {"project_id": "<project_id>", "query": "customer analytics metrics location=europe-west1"}What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
41 skills in this plugin
/accidental-data-loss-prevention**STOP AND VERIFY**: Before running any command or tool that results in irreversible data loss, you MUST obtain explicit user consent.
When in doubt, ask. It is better to wait for confirmation than to accidentally delete production data or critical project assets.
Use this for:
- SQL: DROP TABLE/VIEW/SCHEMA/DATABASE, TRUNCATE, or broad DELETE (missing WHERE or using 1=1).
- Cloud Storage: gsutil rm or gcloud storage rm targeting production data or critical buckets.
- Infrastructure: gcloud projects delete, deleting Spanner/BigQuery/Dataproc resources, deleting secrets, or KMS key destruction.
/bigquery-ai-mlLeverages BigQuery's built-in machine learning and GenAI capabilities for advanced data analytics. Use when you need to write SQL queries that perform time-series forecasting, predict values, detect outliers or anomalies, find key drivers, perform semantic search or vector search, classify text, calculate similarity, summarize content, translate language, evaluate models, filter by semantic conditions, measure the causal effect of an intervention, compute correlations between columns, generate descriptive statistics and table distribution profiles, detect change points or structural breaks, extract trend or seasonality components, or leverage generative AI capabilities in BigQuery. Do not use for general BigQuery dataset, table, or job management requests./bigquery-bigframesGenerates Python code using BigQuery DataFrames (BigFrames). Use by default for any Python data task involving BigQuery, including data processing, analysis, and machine learning. Don't use for SQL-first workflows or the google-cloud-bigquery client library — use bigquery-basics./bigquery-data-transfer-serviceDiscovers and inspects BigQuery Data Transfer Service (DTS) configurations. Use this to identify existing ingestion pipelines and extract datasource or transfer config metadata for data pipelines. Use when a user asks for ingestion scenarios while building or managing data pipelines or when a user asks to "ingest" or "add" data that may already be managed by a DTS transfer./bigquery-graph-authorProvides an end-to-end journey for authoring a BigQuery property graph from your tables or from a model document/diagram (an ER diagram, an ontology, a semantic model): dataset discovery, candidate relationships verified against the data, a readable plan, and `CREATE PROPERTY GRAPH` DDL with schema best practices and semantic measures/dimensions, plus an opt-in verification suite for the landed graph. Use when creating or replacing a property graph, authoring a graph from a dataset or a document, or verifying relationships or suspicious edge counts. Don't use for querying an existing graph, for non-BigQuery graph databases, or for drawing/rendering diagrams./bigquery-graph-queryProvides guidelines and best practices for querying BigQuery property graphs and semantic graphs: native GQL (Graph Query Language) pattern matching, multi-hop and variable-length paths, aggregation, top-N, path extraction, output formatting (graph visualization with TO_JSON vs tabular), GRAPH_TABLE relational SQL integration, and semantic graph querying via the GRAPH_EXPAND TVF with starting-node view selection and AGG() measures. Also covers hybrid semantic search, combining `VECTOR_SEARCH` candidate generation with graph traversal when a node carries an embedding-backed property. Use when querying graph topology, node/edge connections, paths, or semantic measures over an existing BigQuery graph. Don't use for Cypher or non-BigQuery graph databases, or for creating/modifying a graph schema.npx claudepluginhub googlecloudplatform/data-agent-kit-plugin --plugin dakOther plugins' skills for the same job