How AI Agents Use Google Agent Skills: A Complete Technical Guide

AI agents consume Google Agent Skills by parsing declarative SKILL.md files that expose cloud workflows as callable tools, enabling automated execution of complex multi-step tasks through the Gemini Enterprise Agent Platform.

The google/skills repository provides reusable, declarative knowledge modules that describe cloud products and workflows in a format LLM-driven AI agents can understand. When agents are built on the Gemini Enterprise Agent Platform or using the Agents CLI, the platform automatically loads referenced SKILL.md files and exposes contained commands, data models, and best-practice guidance as executable tools. This architecture transforms static documentation into automated infrastructure management, allowing AI agents to build, deploy, and orchestrate cloud resources through structured tool-calling APIs.

What Are Google Agent Skills?

Google Agent Skills are modular, markdown-based knowledge units stored under skills/<category>/<skill-name>/ in the repository. Each skill follows a prescribed schema containing metadata blocks, step-by-step workflows, tool definitions, and reference links. According to the source code in skills/cloud/google-cloud-solution-build-deploy-agents/SKILL.md, these files act as both documentation and executable specifications that the agent runtime interprets as functional capabilities.

How AI Agents Consume Skills

Skill Definition and Structure

Every skill resides in a SKILL.md file within a categorized directory structure. The markdown follows a strict schema that includes workflow steps, tool definitions, and reference mappings. For example, skills/cloud/google-cloud-solution-n-tier-serverless-web-app/SKILL.md defines higher-level solution patterns that agents can invoke as single commands. This declarative approach allows the agent to understand not just what to do, but the context and prerequisites for each operation.

Registration in the Agent Registry

The Agents CLI scans the repository and registers every discovered skill in the Agent Registry. As documented in skills/cloud/google-cloud-solution-build-deploy-agents/references/product-mappings.md, this registry creates catalog entries mapping skill names to their corresponding tool-sets. The .agents/plugins/marketplace.json manifest makes the repository discoverable by the CLI, enabling automatic ingestion of new skills without manual configuration updates.

Runtime Tool Resolution

At execution time, the Gemini Enterprise runtime resolves skill references (e.g., google-cloud-solution-build-deploy-agents) to concrete tools callable via the agent’s tool-calling API. The runtime automatically injects necessary IAM scopes, OIDC tokens, and optional Model Context Protocol (MCP) endpoints so skill commands execute with correct permissions. This security model is detailed in skills/cloud/google-cloud-solution-build-deploy-agents/references/design-principles.md, which outlines how the platform maintains least-privilege access during automated executions.

Tool Execution Flow

When an agent invokes a skill, it issues JSON-structured requests that specify the tool name and arguments. The runtime routes this request to the skill's implementation—typically a Bash script, Terraform module, or gcloud command—running inside a secure Cloud Run or GKE container:

{
  "name": "google-cloud-solution-build-deploy-agents.deploy",
  "arguments": {
    "project_id": "my-project",
    "region": "us-central1",
    "image": "gcr.io/my-project/agent-image"
  }
}

The skill returns execution status and optionally stores result data in short-term memory for subsequent workflow steps.

Multi-Agent Orchestration

Skills support composition into larger workflows through Agent-to-Agent (A2A) communication. As implemented in the product mappings referenced in skills/cloud/google-cloud-solution-build-deploy-agents/references/product-mappings.md, an agent can call one skill, then hand off execution to another agent using the A2A feature. This enables complex solutions such as designing a secure n-tier application, generating Terraform configurations, deploying to Cloud Run, and setting up monitoring—all orchestrated across multiple specialized agents.

Governance and Observability

All skill executions pass through the Agent Gateway, which enforces centralized governance policies. According to the design principles in skills/cloud/google-cloud-solution-build-deploy-agents/references/design-principles.md, the gateway logs structured events to Cloud Logging, enforces IAM policies, and triggers alerts when skills fail or exceed quota limits. This provides audit trails and operational visibility into automated agent activities.

Practical Implementation Examples

Registering and Running Skills via CLI

Install the Agents CLI and register the skills repository to immediately expose available tools:


# 1️⃣ Install the CLI (once)

curl -L https://github.com/google/agents-cli/releases/latest/download/agents-cli_$(uname -s)_$(uname -m).tar.gz | tar xz
sudo mv agents /usr/local/bin/

# 2️⃣ Register the repository so the CLI knows about its skills

agents registry add https://github.com/google/skills.git

# 3️⃣ Run the "build-deploy-agents" skill

agents run google-cloud-solution-build-deploy-agents \
  --project=my-project \
  --region=us-central1 \
  --image=gcr.io/my-project/agent-image

Direct Tool Calls from Agent Prompts

When using the Gemini Enterprise Platform directly, agents initiate skills through structured tool-call blocks:

{
  "role": "assistant",
  "content": "Sure, I’ll provision the resources.",
  "tool_calls": [
    {
      "name": "google-cloud-solution-build-deploy-agents.deploy",
      "arguments": {
        "project_id": "my-project",
        "region": "us-central1",
        "image": "gcr.io/my-project/agent-image"
      }
    }
  ]
}

Composing Multiple Skills in Workflows

Chain skills together by referencing outputs from previous steps:

{
  "steps": [
    {
      "skill": "google-cloud-solution-n-tier-serverless-web-app",
      "action": "design"
    },
    {
      "skill": "google-cloud-solution-build-deploy-agents",
      "action": "deploy",
      "input_from_previous": true
    }
  ]
}

Summary

  • Google Agent Skills are declarative modules stored as SKILL.md files under skills/<category>/<skill-name>/ that define cloud workflows as executable tools.
  • The Agents CLI automatically registers skills from the repository into the Agent Registry, making them available to AI agents without manual coding.
  • At runtime, the Gemini Enterprise platform resolves skill references to concrete tools, injecting necessary authentication (IAM scopes, OIDC tokens) and executing commands in secure containers.
  • Agent-to-Agent (A2A) communication enables complex multi-step workflows by allowing skills to hand off execution between specialized agents.
  • The Agent Gateway provides centralized governance, logging all executions to Cloud Logging and enforcing IAM policies for secure automation.

Frequently Asked Questions

How do I register a custom skill with the Agents CLI?

Run agents registry add <repository-url> to scan the repository for SKILL.md files and register them in the Agent Registry. The CLI automatically discovers skills following the skills/<category>/<skill-name>/SKILL.md structure and exposes them as callable tools.

What format does a SKILL.md file follow?

A SKILL.md file follows a prescribed schema containing a metadata block, step-by-step workflow descriptions, tool definitions, and reference links. As shown in skills/cloud/google-cloud-solution-build-deploy-agents/SKILL.md, this markdown structure serves as both human documentation and machine-readable specifications for the agent runtime.

Can AI agents chain multiple skills together?

Yes, through Agent-to-Agent (A2A) communication. Skills can be composed into larger workflows where one skill's output becomes another's input. The input_from_previous parameter in tool calls enables this chaining, allowing agents to execute complex multi-stage operations like designing architectures then deploying them automatically.

How does the Agent Gateway secure skill execution?

The Agent Gateway enforces IAM policies, injects OIDC tokens and necessary scopes at runtime, and logs all executions to Cloud Logging. According to the design principles documented in the repository, this ensures skills operate with minimal required privileges while maintaining comprehensive audit trails for compliance and debugging.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →