Creates product search agents with semantic search and RAG on Google Cloud (Vertex AI Vector Search, BigQuery, embeddings). Use when the user wants to "build a product search agent", "create an e-commerce search", "make a shopping assistant", "set up semantic catalog discovery", "ingest products into Vector Search", or "deploy a retail RAG agent". Handles the full pipeline: catalog data ingestion to BigQuery, Vertex AI Vector Search collection setup, ADK agent scaffolding, evaluation, and Cloud Run deployment.
77
96%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Creates product search agents with semantic search and RAG on Google Cloud.
If a catalog is already loaded (system context says "DEPLOYED search agent"
or provides a <catalog> block), skip Q-MODE and answer product queries
directly using the catalog.
Otherwise, your first message MUST be exactly this:
[skill: retail-product-search] active.
Q-MODE: Pick a setup mode? [default: 1]
1. Quick start -- 2 questions, smart defaults, ~60s. Best for demos and first-timers.
2. Full setup -- 4 questions, ~2 min. Best for real builds.Then stop and wait. Accept 1, quick, empty/Enter (Quick), or 2, full (Full).
[default: ...]. Empty input = default../design-spec.md in the workspace as you collect them.scripts/setup.py (see Workspace Setup below).The skill has two locations:
By the end of this section the workspace must have .venv/ (with the skill
installed editable), design-spec.md, and SKILL_DIR exported in the shell.
Run this as ONE shell command — splitting it across tool calls loses state:
SKILL_DIR=$(for d in ~/.claude/skills ~/.agents/skills ~/.gemini/skills ~/.cursor/skills; do
[ -f "$d/retail-product-search/SKILL.md" ] && echo "$d/retail-product-search" && break
done)
bash "$SKILL_DIR/scripts/bootstrap.sh"bootstrap.sh finds a Python 3.10+ interpreter (with absolute-path fallback
for sandboxed shells), creates .venv, installs the skill editable, and
copies design-spec.md into the workspace.
All scripts run from the install dir against the workspace config. Use
.venv/bin/python, not bare python — bare python may resolve to a
Python without the skill's editable install on sys.path.
.venv/bin/python "$SKILL_DIR/scripts/setup.py" --config ./design-spec.md
.venv/bin/python "$SKILL_DIR/scripts/cleanup.py" --config ./design-spec.md --confirmDetails in references/install-paths.md.
This skill works in conjunction with the following core Google Cloud skills:
bigquery-basics (for database configuration guidelines)gemini-api (for Vertex AI API / Google Gen AI SDK best practices)Verify if these skills are installed in your active skills directory. If they are missing, recommend the developer to install them by running:
npx skills add google/skills --skill bigquery-basics gemini-api
| Q | Question | Default |
|---|---|---|
| Q-A | GCP project ID? | $GOOGLE_CLOUD_PROJECT or gcloud config get-value project |
| Q-B | Where's your product data? | assets/sample-products.csv (bundled) |
Accepted for Q-B: empty / default (bundled), /path/to/file.csv, or gs://....
Silent defaults: Extended fields, us-central1.
After Q-A and Q-B, do this automatically (don't ask the user to copy/paste). Run these steps SEQUENTIALLY — do not parallelize. Steps 2-3 modify the file bootstrap copies in step 1; running them concurrently is a race.
bash "$SKILL_DIR/scripts/bootstrap.sh"
copies the YAML-frontmatter design-spec template into the workspace at
./design-spec.md. Do NOT touch ./design-spec.md until bootstrap exits../design-spec.md — do NOT rewrite it from scratch.
setup.py parses YAML frontmatter via _setup_utils.py. A Markdown-only
file fails with 'NoneType' object has no attribute 'get'. Use Edit / sed
to replace specific lines:
gcp_project_id: "" → gcp_project_id: "<Q-A answer>"data_source: assets/sample-products.csv → data_source: <Q-B answer> (only if user gave a non-default).venv/bin/python "$SKILL_DIR/scripts/setup.py" --config ./design-spec.mdVECTOR_SEARCH_COLLECTION and proceed to TestAdds two more questions: product fields level and GCP region.
| Q | Question | Default | Notes |
|---|---|---|---|
| Q-fields | Product fields level | Extended | Basic / Standard / Extended / Full. Match this to your CSV's columns. Don't offer "Custom" — validate_schema.py rejects it. |
| Q-region | GCP region | us-central1 | Only confirmed-working region for Vector Search 2.0. Other regions return 501 MethodNotImplemented. |
Otherwise identical to Quick Start.
Don't use for generic document search, simple keyword search, or non-retail.
retail-product-search/
assets/
design-spec.md # Source of truth -- filled by Q-MODE
sample-products.csv # Bundled 5-product demo catalog
references/ # Deep-dive docs (load on demand)
scripts/
agent.py # Reference ADK agent
retrievers.py # Vector Search retrieval logic
setup.py # Pipeline driver (reads design-spec.md)
bootstrap.sh # Workspace bootstrap (called from Workspace Setup)
validate_schema.py
ingest_bigquery.py
ingest_vertex_search.py
cleanup.pyCustomize: rewrite scripts/agent.py (see
references/agent-example.md) and
scripts/retrievers.py with your product-specific fields.
After setup.py succeeds, set the collection env var (one line, no newlines):
export VECTOR_SEARCH_COLLECTION="projects/$GOOGLE_CLOUD_PROJECT/locations/us-central1/collections/retail-skill-products-collection"Then either:
With ADK (interactive UI):
# Use the WORKSPACE VENV's adk (not bare `adk`) so the skill's editable
# install is on sys.path. Bare `adk` may resolve to a global Python (pyenv,
# brew, etc.) whose ADK can't find the skill and reports an empty app list.
.venv/bin/adk web "$SKILL_DIR/scripts" --port 8765Open http://127.0.0.1:8765, click scripts, query.
⚠️ Two things must be right:
adk web at $SKILL_DIR/scripts, not at . — agent code lives
in the install dir, not the workspace. adk web . fails with "No agents
found in current folder"..venv/bin/adk, not bare adk — bare adk may launch the wrong
Python and silently fail to load the agent (UI loads, but /list-apps
returns [] and queries time out).Without ADK (direct smoke test):
.venv/bin/python -c "from scripts.retrievers import search; print(search('laptop for video editing', top_k=3))"Semantic-only retrieval — no structured filters on price, stock, or rating. For demo queries and how to add structured filtering, see references/architecture.md.
cd <repo-root>
./vs eval retail-product-search --project-id $PROJECTEVAL.yaml declares rubric (LLM-as-judge) + assertions (deterministic
checks). Target: 80%+ passing.
Never deploy without explicit human approval.
Cloud Run service account needs roles/bigquery.dataViewer on the dataset and
roles/aiplatform.user on the project. Deploy via gcloud run deploy or your
org's existing tooling.
VECTOR_SEARCH_COLLECTION not settop_ksearch() is pure semantic similarity. Price /
stock / currency filters happen client-side in the LLM, so results may
include items outside the constraint. Don't promise hard filtersadk web after
fixing the underlying issueMost-common failures inline; full table in references/troubleshooting.md.
| Error | Fix |
|---|---|
setup.py exits with 'NoneType' object has no attribute 'get' | design-spec.md was rewritten as plain Markdown instead of mutating the YAML-frontmatter template bootstrap copied. Wait for bootstrap to finish, then edit (not rewrite) ./design-spec.md — only change the field values inside the existing ---...--- frontmatter |
adk web starts but /list-apps returns [] / browser shows "No agents found" | Bare adk resolved to a global Python that lacks the editable install. Kill it and restart with .venv/bin/adk web "$SKILL_DIR/scripts" --port 8765 |
MethodNotImplemented: 501 from Vector Search | VECTOR_SEARCH_COLLECTION has a newline. Re-export on one line |
ModuleNotFoundError: google.adk | pip install -e "$SKILL_DIR" — google-adk is an unconditional dependency, no [adk] extra needed |
Package requires Python: 3.9.X | venv used system Python 3.9. Recreate with python3.12 -m venv .venv |
BILLING_DISABLED / PERMISSION_DENIED / API has not been used | GCP project setup — see troubleshooting.md |
This skill uses gcloud CLI + Python SDKs (google-genai,
google-cloud-bigquery, google-cloud-aiplatform). Per
Phase 2 Skills guidelines, 1p skills
should prefer remote MCP tools when available. Migration map:
| Service | Where | Future MCP |
|---|---|---|
| BigQuery | ingest_bigquery.py, validate_schema.py | BigQuery MCP |
| Vertex AI Vector Search | ingest_vertex_search.py, setup.py | Vertex AI MCP |
| Vertex AI Embeddings | retrievers.py | Vertex AI MCP |
| Cloud Run | gcloud run deploy | Cloud Run MCP |
retrieve_docs returns results in ADK web UILoad on demand:
bash -c rationale17f314a
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.