Agent Skillsgoogle/skills › retrieving-developer-knowledge

retrieving-developer-knowledge

GitHub

检索并综合Google官方开发者文档,支持GCP、AI、Android等平台的技术查询。通过MCP或REST API获取CLI命令、API语法及架构指南,提供即时完整的技术解决方案。

plugins/cloud/google-cloud-developer/skills/retrieving-developer-knowledge/SKILL.md google/skills

Trigger Scenarios

查询gcloud CLI命令或参数 查找API语法和IAM权限 获取官方技术文档和架构对比

Install

npx skills add google/skills --skill retrieving-developer-knowledge -g -y
More Options

Non-standard path

npx skills add https://github.com/google/skills/tree/main/plugins/cloud/google-cloud-developer/skills/retrieving-developer-knowledge -g -y

Use without installing

npx skills use google/skills@retrieving-developer-knowledge

指定 Agent (Claude Code)

npx skills add google/skills --skill retrieving-developer-knowledge -a claude-code -g -y

安装 repo 全部 skill

npx skills add google/skills --all -g -y

预览 repo 内 skill

npx skills add google/skills --list

SKILL.md

Frontmatter
{
    "name": "retrieving-developer-knowledge",
    "metadata": {
        "category": "CloudInfrastructureAndServices"
    },
    "description": "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."
}

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

  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. 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.
  • search_documents(query="...", page_size=5): 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. 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?"}'
    
  • 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:
    curl -s -X POST "https://developerknowledge.googleapis.com/v1/documents:batchGet?key=${DEVELOPERKNOWLEDGE_API_KEY}" \
      -H "Content-Type: application/json" \
      -d '{"names": ["documents/docs.cloud.google.com/run/docs/overview/what-is-cloud-run"]}'
    

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

Version History

  • b84e72f Current 2026-09-03 01:24

Same Skill Collection

plugins/cloud/gemini-api/skills/gemini-api/SKILL.md
plugins/cloud/gemini-api/skills/gemini-interactions-api/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-endpoint-management/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-migrate-from-ai-studio/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-model-registry/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-prompt-management/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-rag-engine-management/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-skill-registry/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-troubleshooting/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-tuning-management/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/agent-platform-tuning/SKILL.md
plugins/cloud/gemini-enterprise-agent-platform/skills/gemini-agents-api/SKILL.md
plugins/cloud/google-cloud-core/skills/gcloud/SKILL.md
plugins/cloud/google-cloud-core/skills/google-cloud-recipe-auth/SKILL.md
plugins/cloud/google-cloud-core/skills/google-cloud-recipe-onboarding/SKILL.md
plugins/cloud/google-cloud-developer/skills/gcloud/SKILL.md
plugins/cloud/google-cloud-developer/skills/google-cloud-recipe-auth/SKILL.md
plugins/cloud/google-cloud-developer/skills/google-cloud-recipe-onboarding/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-ai-troubleshooting-jobset-interruption/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-ai-troubleshooting-tpu-dynamic-slices-monitoring/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-ai-troubleshooting-tpu-metrics-monitoring/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-batch-hpc/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-cluster-autoscaler/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-compute-classes/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-cost-optimization/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-inference/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-multitenancy/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-workload-scaling/SKILL.md
plugins/cloud/google-cloud-gke-workloads/skills/gke-workload-troubleshooting/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-app-onboarding/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-backup-dr/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-basics/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-cluster-creation/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-golden-path/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-networking/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-observability/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-reliability/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-service-networking/SKILL.md
plugins/cloud/google-cloud-gke/skills/gke-storage/SKILL.md
plugins/cloud/google-cloud-run/skills/cloud-run-basics/SKILL.md
plugins/cloud/google-cloud-well-architected/skills/google-cloud-waf-cost-optimization/SKILL.md
plugins/cloud/google-cloud-well-architected/skills/google-cloud-waf-operational-excellence/SKILL.md
plugins/cloud/google-cloud-well-architected/skills/google-cloud-waf-performance-optimization/SKILL.md
plugins/cloud/google-cloud-well-architected/skills/google-cloud-waf-reliability/SKILL.md
plugins/cloud/google-cloud-well-architected/skills/google-cloud-waf-security/SKILL.md
plugins/cloud/google-cloud-well-architected/skills/google-cloud-waf-sustainability/SKILL.md
skills/ads/data-manager-api-audience-ingestion/SKILL.md
skills/ads/data-manager-api-event-ingestion/SKILL.md
skills/ads/data-manager-api-setup/SKILL.md
skills/ads/data-manager-api/data-manager-api-audience-ingestion/SKILL.md

Metadata

Files
0
Version
b84e72f
Hash
6d77ccdc
Indexed
2026-09-03 01:24

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-04 14:58
浙ICP备14020137号-1 $Map of visitor$