google/mapi-developer-assistant
> Expert in Google Merchant API (the new API replacing Content API). migrating from Content API (v2 or v2.1) to Merchant API, Merchant API code examples and troubleshooting, or comparing Content API methods with Merchant API equivalents.
npx skills add https://github.com/google/merchant-api-samples --skill mapi-developer-assistant
This skill provides expertise in the Google Merchant API, specifically assisting
with documentation queries, code migration from the legacy Google Content API,
and generating sample code.
This skill includes the following resources:
scripts/query_mapi_docs.sh: Script to query official Merchant APIdocumentation for concepts, migration guidance, and API explanations
scripts/find_mapi_code_sample.sh: Script to find code samples forMerchant API operations, with optional language filtering (java, python,
php, go, nodejs, dotnet, apps_script)
This skill operates on a "Search-Then-Act" loop. You must not hallucinate API
details; always verify against the documentation using the provided scripts.
requesting code examples, or needing migration guidance.
query_mapi_docs.sh for:X?")
find_mapi_code_sample.sh for: bash <skill_directory>/scripts/query_mapi_docs.sh "Your specific question here"
*(Example: "What is the Merchant API equivalent for the
accountstatuses.get method?")*
bash <skill_directory>/scripts/find_mapi_code_sample.sh "operation description" [language]
*(Example: "insert product" or with language: "insert product" java)*
*Supported languages: java, python, php, nodejs, dotnet, apps_script*
final answer. Do not simply dump the JSON; interpret it and provide
clear, actionable guidance.
--------------------------------------------------------------------------------
Trigger: User asks about "migration", "upgrade", "differences", or compares
"Content API vs Merchant API".
Script to Use: query_mapi_docs.sh - Migration questions require conceptual
understanding of API differences.
Action:
query_mapi_docs.sh with a migration-focused question (e.g., "What isthe Merchant API equivalent for [Content API method]?")
migration notes as well as the summary of change in your response.
follow up with find_mapi_code_sample.sh.
Trigger: You are working in a repository that uses the legacy Content API
(e.g., google-api-services-content library or Content API v2/v2.1 patterns).
Scripts to Use:
query_mapi_docs.sh - First, to understand the API mapping and migrationapproach
find_mapi_code_sample.sh - Then, to get working code samples in theproject's language
Action:
query_mapi_docs.sh to identify theMerchant API equivalent methods.
find_mapi_code_sample.sh with the detectedlanguage (e.g., find_mapi_code_sample.sh "insert product" java).
code samples:
based on the retrieved samples, adapting them to match the project's coding
style (indentation, variable naming, error handling etc.).
Trigger: User asks "How do I..." or "What is the limit for..." or other
documentation questions.
Script Selection:
for..."): Use query_mapi_docs.sh
of..."): Use find_mapi_code_sample.sh
first query_mapi_docs.sh for context, then find_mapi_code_sample.sh for
code
Action:
query_mapi_docs.sh "your question" for conceptsfind_mapi_code_sample.sh "operation" [language] for code samplesfind_mapi_code_sample.sh)
response)
--------------------------------------------------------------------------------
insert,delete, update) without explicit user confirmation.
package.json, pom.xml, etc., beforeimporting.
libraries (e.g., google-shopping-merchant-products).
(v1main > v1alpha).
If the documentation query script fails or returns unexpected results:
documentation
documentation
Take google/mapi-developer-assistant from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.