Generated banner for Retrieving Developer Knowledge
Generated logo for Retrieving Developer Knowledge

Retrieving Developer Knowledge

GoogleOfficialPublished by Google

  • Skill
  • Tool integration
  • Cloud and DevOps
  • Apache-2.0
  • No issues found

From the author

Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI/Gemini, Android, Chrome, Web, Flutter, Go, Firebase, and other Google developer platforms. Integrates with the Developer Knowledge MCP server (search_documents, get_documents, answer_query) or the Developer Knowledge REST API fallback. Use when searching for gcloud CLI commands, API syntax, IAM permissions, official documentation, architectural comparisons, or product choice overviews. Don't use for local filesystem lookups or non-Google documentation.
— the description by Google

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The Retrieving Developer Knowledge skill enables AI agents to access, search, and synthesize official documentation across Google's developer ecosystem, including Google Cloud, AI/Gemini, Android, and more. It supports two primary retrieval methods: an MCP server for integrated environments and a REST API fallback for direct HTTP access. The skill ensures that technical solutions—such as CLI commands, API syntax, and configuration snippets—are grounded in current, official documentation rather than relying on model memory.

What it does

  • Searches official Google developer documentation for specific technical queries.
  • Retrieves granular details like gcloud CLI flags, IAM permissions, and API parameter syntax.
  • Synthesizes conceptual guides and architectural comparisons for Google developer platforms.
  • Provides a robust REST API fallback mechanism when MCP tools are unavailable.
  • Enforces strict usage attribution for all executed commands and API requests.
  • Ensures technical solutions are provided as complete, executable code or configuration blocks.

When to use it

  • When you need to verify exact gcloud CLI command syntax or flag usage.
  • When researching IAM permission strings or service-level resource requirements.
  • When comparing architectural patterns or choosing between Google developer products.
  • When you require the most up-to-date official documentation for Google Cloud, Firebase, or Go.

Advantages

  • Reduces hallucination by grounding responses in official, verified documentation.
  • Provides a consistent workflow for both MCP-enabled and standard environments.
  • Maintains high accuracy for complex technical parameters and configuration strings.
  • Includes built-in handling for rate limits and authentication failures.

Usage examples

“How do I configure public read access on a Cloud Storage bucket using gcloud?”
The agent retrieves the specific gcloud storage buckets add-iam-policy-binding command with the correct member and role flags, ensuring the solution is syntactically accurate.
“What are the differences between Cloud Run and GKE for a containerized web app?”
The agent uses the answer_query tool to synthesize a comparison based on official documentation, highlighting key architectural trade-offs.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/google/retrieving-developer-knowledge/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip retrieving-developer-knowledge.zip -d .agents/skills

Documentation by Google

Google Developer Knowledge

The Developer Knowledge skill provides access to official Google developer documentation across Google Cloud, AI/ML (ai.google.dev, ADK, TensorFlow), Android, Chrome, Web, Flutter, Go, Firebase, and other Google developer platforms via the Developer Knowledge MCP server or REST API fallback.

Usage Attribution

Before executing any gcloud, REST API, or MCP command with this skill, follow the instructions in Usage Attribution.

Workflow

  1. Direct Retrieval: When answering a technical question, execute a single documentation lookup directly within your current conversation context (do not delegate retrieval to subagents):

    • If MCP tools are present in your environment: Call answer_query (for conceptual guides/workflows) or search_documents (for CLI flags/syntax).

    • If MCP tools are not present: Execute a REST API request via curl against https://developerknowledge.googleapis.com/v1.

    • A declared server is not always a connected server. Some clients cannot complete the MCP handshake with this server and expose no answer_query, search_documents or get_documents tool at all, even though the plugin declares one. Treat their absence as normal and use the REST fallback below.

  2. Confirm the lookup succeeded before using it: A response that arrives is not automatically an answer. PERMISSION_DENIED, UNAUTHENTICATED, HTTP 401 or 403, an empty result set, or any error payload is a FAILED lookup even when the tool itself reported no error. On a failed lookup, do not answer as though it had succeeded.

    • Rate Limits (HTTP 429 / Out of Quota): If calling answer_query or the REST :answerQuery endpoint returns an HTTP 429 (RESOURCE_EXHAUSTED / out of quota error), this indicates server-side generative QA quota exhaustion. Do not treat this as an unrecoverable failure or fall back to ungrounded memory; immediately retry using the search endpoint (search_documents for MCP, or documents:searchDocumentChunks for REST) with 2–5 focused keywords from the query.

    • Persistent Failures: Try the other transport once, and if that also fails, state plainly in your reply to the user that you could not reach Developer Knowledge and are answering without it. Presenting recalled documentation as a retrieved result is the worst available outcome, because nothing in the reply distinguishes it from a real lookup.

  3. Immediate & Complete Solution Output: Immediately upon receiving the documentation response, output the complete, self-contained, and executable technical solution (commands with all required flags and placeholders, YAML/JSON configurations, or code snippets) directly in your response text.

Tool Selection & Usage

Choose the appropriate tool based on availability in your runtime environment:

1. Developer Knowledge MCP Tools (Preferred)

When MCP tools are present in your active tool definitions:

  • answer_query(query="..."): Use for conceptual guides, architectural comparisons, product choice overviews, and multi-step workflows. This tool has limited quota. If you get a 429 out of quota error, use search_documents instead.

  • search_documents(query="..."): Use for granular CLI flags, exact syntax, parameter names, and IAM permissions (service.resource.verb). Use 2–5 focused keywords (e.g., cloud run filestore nfs mount gcloud) rather than full conversational sentences.

  • get_documents(names=["documents/{uri_without_scheme}"]): Fetch full documentation pages by resource name (e.g. names: ["documents/docs.cloud.google.com/run/docs/overview/what-is-cloud-run"]).

2. REST API Fallback

When the MCP tools are absent, query the Developer Knowledge REST API (https://developerknowledge.googleapis.com/v1) with curl. Two credentials work, and you should try them in this order.

An existing Google credential, preferred. If gcloud is authenticated, pass a bearer token and your quota project. Nothing needs to be installed or configured:

curl -s -X POST "https://developerknowledge.googleapis.com/v1:answerQuery" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "X-Goog-User-Project: $(gcloud config get-value project 2>/dev/null)" \
  -H "Content-Type: application/json" \
  -d "{\"query\": \"How do I configure public read access on Cloud Storage?\"}"

If that fails to authenticate, on a 401, a 403, or any other credential error, the account has a token the API will not accept. Substitute gcloud auth application-default print-access-token for gcloud auth print-access-token in the command above and try again. Which credential the API accepts depends on how the environment was authenticated, so treat an auth error here as a reason to try the application-default credential rather than as a failed lookup.

An API key, if one is configured. Where DEVELOPERKNOWLEDGE_API_KEY is set in the environment, pass it as a key query parameter instead of an Authorization header. If neither credential is available, an API key is the supported path for this client: enable the API and create one by following the Developer Knowledge quickstart, then export it as DEVELOPERKNOWLEDGE_API_KEY. Say that you need a credential rather than answering without a lookup. The remaining examples in this section use that form:

  • Answer Query:

    curl -s -X POST "https://developerknowledge.googleapis.com/v1:answerQuery?key=${DEVELOPERKNOWLEDGE_API_KEY}" \
      -H "Content-Type: application/json" \
      -d '{"query": "How do I configure public read access on Cloud Storage?"}'

    This endpoint has limited quota. If you get a 429 out of quota error, use documents:searchDocumentChunks instead.

  • Search Document Chunks (use 2–5 focused keywords):

    curl -s "https://developerknowledge.googleapis.com/v1/documents:searchDocumentChunks?query=gcloud+logging+metrics+create&key=${DEVELOPERKNOWLEDGE_API_KEY}"
  • Get Document:

    curl -s "https://developerknowledge.googleapis.com/v1/documents/docs.cloud.google.com/run/docs/overview/what-is-cloud-run?key=${DEVELOPERKNOWLEDGE_API_KEY}"
  • Batch Get Documents (a GET, with one names parameter per document and no request body; up to 20 per call):

    curl -s -G "https://developerknowledge.googleapis.com/v1/documents:batchGet" \
      --data-urlencode "names=documents/docs.cloud.google.com/run/docs/overview/what-is-cloud-run" \
      --data-urlencode "names=documents/docs.cloud.google.com/storage/docs/creating-buckets" \
      --data-urlencode "key=${DEVELOPERKNOWLEDGE_API_KEY}"

Synthesis & Output Guidelines

  1. Grounding in Official Documentation: Ground all solutions directly in retrieved documentation. Official documentation conventions have absolute precedence over memorized defaults.

  2. Exact Parameter Formatting: Format CLI flags, composite keys (e.g. location=IP:PATH), and IAM permission strings according to official Google specifications.

  3. Complete Solutions in Final Response: Always output the full, self-contained, executable technical solution (commands, configurations, or code snippets) with clear standard placeholders (e.g. PROJECT_ID, SERVICE_NAME, REGION) directly in your final message, even if previously referenced during internal planning.

References

Files

references/api-fallback.md

Developer Knowledge REST API Fallback Guide

When the Developer Knowledge MCP server tools (search_documents, get_documents, answer_query) are not declared or available in your runtime environment, you MUST use the Developer Knowledge REST API to search and retrieve official documentation. Do NOT guess commands or rely on unverified pretraining memory.

Service Overview

  • Base URL: https://developerknowledge.googleapis.com

  • API Versions: v1 (GA) and v1alpha

  • Output Format: JSON (with Markdown content chunks)

Authentication Protocol

Before issuing REST requests, resolve authentication credentials using one of the following methods in order of precedence:

  1. OAuth 2.0 Access Token (Recommended): If gcloud or ambient Google Cloud credentials are present, nothing needs to be installed or configured.

    • Obtain access token: ACCESS_TOKEN=$(gcloud auth print-access-token)

    • Pass via header: -H "Authorization: Bearer ${ACCESS_TOKEN}"

    • Also pass your quota project: -H "X-Goog-User-Project: $(gcloud config get-value project 2>/dev/null)"

    • If this fails to authenticate, on a 401, a 403, or any other credential error, the account has a token the API will not accept. Substitute gcloud auth application-default print-access-token and retry; which credential the API accepts depends on how the environment was authenticated.

  2. API Key: If a key is already provisioned, check the environment for DEVELOPERKNOWLEDGE_API_KEY or GOOGLE_API_KEY.

    • Pass via query parameter: ?key=${DEVELOPERKNOWLEDGE_API_KEY}

    • Or pass via header: -H "X-Goog-Api-Key: ${DEVELOPERKNOWLEDGE_API_KEY}"

    • If no key is set and no Google credential is available, an API key is the supported path for this client. Enable the API and create a key by following the Developer Knowledge quickstart, then export it as DEVELOPERKNOWLEDGE_API_KEY. Report that you need a credential rather than answering from memory.


Endpoints & Operations

Include the User-Agent attribution header specified in Usage Attribution on every direct REST request below.

1. answerQuery (Broad Conceptual Q&A & Multi-Step Guides)

Use for conceptual guides, architectural comparisons, product overviews, and how-to workflows.

  • Method & Path: POST https://developerknowledge.googleapis.com/v1:answerQuery

  • Headers:

    • Content-Type: application/json

    • X-Goog-Api-Key: ${DEVELOPERKNOWLEDGE_API_KEY} (or query param ?key=...)

  • Request Body:

    {
      "query": "How do I configure public read access on a Cloud Storage bucket?"
    }
  • Example curl:

    curl -s -X POST "https://developerknowledge.googleapis.com/v1:answerQuery?key=${DEVELOPERKNOWLEDGE_API_KEY}" \
      -H "Content-Type: application/json" \
      -d '{"query": "How do I create a custom metric in Cloud Logging?"}'
  • Rate Limits & Fallback: This endpoint has limited synthesis quota. If you receive an HTTP 429 (RESOURCE_EXHAUSTED / out of quota error) from :answerQuery, do not abandon documentation retrieval or answer from unverified memory. Fall back to calling documents:searchDocumentChunks instead using 2–5 focused keywords.


2. searchDocumentChunks (Exact Syntax, IAM Permissions & Flags)

Use to find specific CLI flags, IAM permissions (service.resource.verb), API parameter names, or code snippets.

  • Method & Path: GET https://developerknowledge.googleapis.com/v1/documents:searchDocumentChunks

  • Query Parameters:

    • query: URL-encoded search term (e.g., gcloud+logging+metrics+create).

    • filter (optional): Filter by domain (e.g., data_source = "docs.cloud.google.com").

    • pageSize (optional): Maximum number of chunks to return (default: 10).

    • key: API Key.

  • Example curl:

    curl -s "https://developerknowledge.googleapis.com/v1/documents:searchDocumentChunks?query=gcloud+logging+metrics+create&key=${DEVELOPERKNOWLEDGE_API_KEY}"

3. get Document (Full Document Retrieval)

Use to retrieve the full Markdown content of a specific documentation page when you have its parent resource name or known URI.

  • Method & Path: GET https://developerknowledge.googleapis.com/v1/documents/{URI_WITHOUT_SCHEME}

  • Resource Name Format: documents/docs.cloud.google.com/run/docs/overview/what-is-cloud-run (stripped of https://).

  • Example curl:

    curl -s "https://developerknowledge.googleapis.com/v1/documents/docs.cloud.google.com/run/docs/overview/what-is-cloud-run?key=${DEVELOPERKNOWLEDGE_API_KEY}"

4. batchGet Documents (Multiple Document Retrieval)

Use to retrieve multiple documentation pages in a single roundtrip.

  • Method & Path: GET https://developerknowledge.googleapis.com/v1/documents:batchGet

  • No request body. The names travel in the query string. A POST with a JSON names array is not a defined method on this service and returns a 404 from the Google frontend.

  • Query Parameters:

    • names (required): repeat once per document, up to 20 per call. Format documents/{uri_without_scheme}, each value 500 characters or fewer. Documents are returned in the order requested.

    • view (optional): DOCUMENT_VIEW_BASIC, DOCUMENT_VIEW_CONTENT, or DOCUMENT_VIEW_FULL. Defaults to DOCUMENT_VIEW_CONTENT. Use DOCUMENT_VIEW_BASIC when you need only titles and URIs, since full Markdown content is large.

    • key: API Key.

  • Response: {"documents": [ ... ]}, each entry carrying name, uri, title, description, dataSource, updateTime, contentLengthBytes, and the full Markdown in content.

  • Example curl:

    curl -s -G "https://developerknowledge.googleapis.com/v1/documents:batchGet" \
      --data-urlencode "names=documents/docs.cloud.google.com/run/docs/overview/what-is-cloud-run" \
      --data-urlencode "names=documents/docs.cloud.google.com/run/docs/configuring/services/environment-variables" \
      --data-urlencode "key=${DEVELOPERKNOWLEDGE_API_KEY}"

Response Processing & Synthesis Guidelines

  1. Extract Content: Parse the returned JSON payload (answer, documentChunks[].content, or document.content).

  2. Authoritative Precedence: Treat retrieved documentation as 100% authoritative over pretraining knowledge.

  3. Context Defense: Synthesize only the required technical solution (code snippet, configuration, or CLI command) without dumping raw API response envelopes.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an MCP server, Needs network access, Needs an API key

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Google
Publisher
Google (Official)
Source
google/skills · skills/developers/retrieving-developer-knowledge · commit 2194d3b
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Also distributed in
google/skills

AutoGineer is not affiliated with or endorsed by Google.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download retrieving-developer-knowledge.zip