retrieving-developer-knowledge
它能做什么
它会搜索 Google 官方开发者文档,并返回相关指南或语法,让智能体基于最新文档作答。适合基于 Google 平台开发的开发者。
适用场景
- ✓当你需要某个 Google 产品的确切命令或 API 语法时。
- ✓当你想要一份关于 Google 开发者平台的概念性指南时。
- ✓当关于某个 Google 工具的回答否则只能依赖记忆时。
技能链接
https://github.com/google/skills/blob/main/plugins/cloud/google-cloud-developer/skills/retrieving-developer-knowledge/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“根据官方文档,Firebase 项目列表的当前语法是什么?”
每周 5 个新技能,1 分钟读完。
工作原理
它会针对指南或语法问题运行文档查询,确认查询确实成功,然后在回答中使用查询结果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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.
Workflow
- 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) orsearch_documents(for CLI flags/syntax). - If MCP tools are not present: Execute a REST API request via
curlagainsthttps://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_documentsorget_documentstool at all, even though the plugin declares one. Treat their absence as normal and use the REST fallback below.
- If MCP tools are present in your environment: Call
- 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_queryor the REST:answerQueryendpoint 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_documentsfor MCP, ordocuments:searchDocumentChunksfor 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.
- Rate Limits (HTTP 429 / Out of Quota): If calling
- 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, usesearch_documentsinstead.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 a
常见问题
它需要特殊的连接吗?
它可以使用内置的文档连接;若未设置,则可以直接发起网络请求。
如果查询失败怎么办?
失败或空白的结果不会被当作答案,本技能会报告失败。
它涵盖哪些平台?
Google Cloud、AI 和 Gemini、Android、Chrome、网页、Flutter、Go、Firebase,以及其他 Google 开发者平台。
详情
作者的原始描述
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.
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10181
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
finding-google-skills
22k帮你的智能体为某项设置任务找到合适的 Google 指南,例如托管、数据库、存储、登录或 AI 模型服务。
gcloud
22k帮你的智能体编写并检查 Google Cloud gcloud 命令,在运行任何内容之前查阅准确的语法,避免猜测参数。
google-cloud-recipe-auth
22k引导你的智能体了解 Google Cloud 的身份与访问管理,包括人员和服务如何登录,以及它们各自获得哪些权限。
google-cloud-recipe-onboarding
22k带领新开发者完成在 Google Cloud 上的第一步,包括选择项目、关联计费,以及部署第一个资源。