diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..aca05d3 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,7 @@ +{ + "name": "google-maps-platform", + "description": "Ground Claude on fresh, official Google Maps Platform documentation and code samples for optimal geo-related developer guidance and code", + "author": { + "name": "Google Maps Platform" + } +} diff --git a/.mcp.json b/.mcp.json new file mode 100644 index 0000000..139600c --- /dev/null +++ b/.mcp.json @@ -0,0 +1,7 @@ +{ + "google-maps-platform-code-assist": { + "type": "stdio", + "command": "npx", + "args": ["-y", "@googlemaps/code-assist-mcp@latest"] + } +} diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..f81ffab --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +## Google Maps Platform Code Assist + +This repository contains the [Google Maps Platform Code Assist MCP server](packages/code-assist/README.md). + +When working on any Google Maps Platform related task in this project, use the `google-maps-platform` skill (see `skills/google-maps-platform/SKILL.md`) and the `google-maps-platform-code-assist` MCP tools to ground responses in official, up-to-date GMP documentation and code samples. diff --git a/README.md b/README.md index 6fa7697..acd63e6 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,24 @@ npm install -g @google/gemini-cli } ``` +## Install the Google Maps Platform Code Assist plugin for [Claude Code](https://claude.ai/code) + +This repository is a Claude Code plugin. It includes: +- A `google-maps-platform` **skill** (`skills/google-maps-platform/SKILL.md`) that teaches Claude when and how to use GMP tools. +- An **MCP server** (`.mcp.json`) that connects Claude to the Code Assist RAG service for up-to-date GMP documentation. + +1. Install Claude Code ([installation guide](https://docs.anthropic.com/en/docs/claude-code/getting-started)) + +2. Add the MCP server from your command line: + + ```bash + claude mcp add google-maps-platform-code-assist -- npx -y @googlemaps/code-assist-mcp@latest + ``` + + * Verify the installation by running `claude mcp list`. + + The `skills/google-maps-platform/SKILL.md` skill is automatically available to Claude Code when this repository is cloned locally or used as a plugin source. + ## Install the Google Maps Platform Code Assist toolkit for other MCP clients. For information about installing and using the toolkit with any MCP client, as well as terms of use, see the [Code Assist toolkit README](packages/code-assist/README.md). diff --git a/skills/google-maps-platform/SKILL.md b/skills/google-maps-platform/SKILL.md new file mode 100644 index 0000000..832d72d --- /dev/null +++ b/skills/google-maps-platform/SKILL.md @@ -0,0 +1,42 @@ +--- +name: google-maps-platform +description: Use this skill when the user asks about Google Maps Platform APIs (Maps, Places, Routes, Geocoding, Geolocation, etc.), building location-aware apps, working with geographic coordinates or addresses, implementing store locators, navigation, delivery logistics, or any geo-spatial development task. Also use for questions about Google Maps Platform billing, authentication, SDKs, or terms of service. +license: Apache-2.0 +allowed-tools: + - retrieve-instructions + - retrieve-google-maps-platform-docs +--- + +# Google Maps Platform Code Assist Skill + +You are a world-class expert on the Google Maps Platform (GMP). Your primary purpose is to assist developers by providing accurate, production-ready code, architectural guidance, and debugging assistance for GMP. + +## Tool Usage + +**ALWAYS call tools in this order — never skip steps:** + +1. **Call `retrieve-instructions` first** — provides essential GMP context and best practices required for accurate responses. +2. **Call `retrieve-google-maps-platform-docs`** — searches current GMP documentation, code samples, GitHub repositories, and terms of service to answer the user's specific question. +3. **Ground all responses** in the tool output. Do not rely solely on training-data knowledge. + +## Trigger Conditions + +Use this skill for any query involving: + +- Maps, mapping, cartography, or satellite imagery +- Location services, geocoding, or reverse geocoding +- Places API, Routes API, Navigation SDK, or Maps JavaScript API +- Street View, terrain data, or elevation +- Location analytics, geospatial data, or Google Earth +- Geographic coordinates, addresses, or points of interest +- Store locators, routing, logistics, delivery, or mobility use cases +- Google Maps Platform billing, quotas, or authentication +- React Google Maps, Flutter maps, iOS/Android Maps SDKs + +## Guidelines + +- Always call `retrieve-instructions` before any other tool call to load essential GMP context. +- Use `retrieve-google-maps-platform-docs` with a specific, well-formed prompt that preserves all user-provided details (city, coordinates, API name, etc.). +- Validate generated code by checking for compilation errors where possible. +- Include proper API key handling and error handling in all code examples. +- For European Economic Area users, note when EEA-specific terms or restrictions may apply.