Skip to content

Conversation

@caohy1988
Copy link

Summary

  • Implements comprehensive support for the Agent Skills standard, enabling skills bundled with SKILL.md documentation, scripts, and references for progressive disclosure
  • Adds core skill abstractions: MarkdownSkill, AgentSkillLoader, ScriptExecutor, SkillTool, SkillsManager
  • Includes two built-in BigQuery skills: bqml (ML model training/inference) and bq-ai-operator (AI operations)
  • Adds demo agent showcasing Agent Skills integration with BigQuery toolset

Key Features

  • SKILL.md Format: Load skills from markdown files with YAML frontmatter following the Agent Skills standard
  • Progressive Disclosure: 3-stage architecture (Discovery → Activation → Execution) for efficient context usage
  • Script Execution: Safe sandboxed execution of Python, Bash, and JavaScript helper scripts
  • Tool Integration: SkillTool wraps skills as ADK tools for LLM invocation
  • Reference Loading: Load detailed documentation on-demand from references/ directories

Files Changed

  • src/google/adk/skills/ - Core skill implementation (8 new files)
  • src/google/adk/skills/bqml/ - BQML skill with references and scripts
  • src/google/adk/skills/bq-ai-operator/ - BQ AI Operator skill with references and scripts
  • tests/unittests/skills/ - Comprehensive test suite (130 tests)
  • contributing/samples/agent_skills_demo/ - Demo agent
  • agent_skill.md - Design documentation

Test plan

  • All 130 unit tests pass (pytest tests/unittests/skills/)
  • Demo agent loads skills and works with BigQuery toolset
  • Skills discovered correctly from directories
  • Script execution works with timeout and environment isolation

🤖 Generated with Claude Code

Implements comprehensive support for the Agent Skills standard
(https://agentskills.io), enabling skills bundled with SKILL.md
documentation, scripts, and references for progressive disclosure.

Key additions:
- MarkdownSkill: Load skills from SKILL.md with YAML frontmatter
- AgentSkillLoader: Discover and load skills from directories
- ScriptExecutor: Safe execution of Python/Bash/JS scripts
- SkillTool: Wrap skills as ADK tools for LLM invocation
- SkillsManager: Registration and discovery management

Built-in skills included:
- bqml: BigQuery ML for model training and inference
- bq-ai-operator: BigQuery AI operations (text, embeddings)

Also includes demo agent and comprehensive test suite (130 tests).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@google-cla
Copy link

google-cla bot commented Jan 16, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@adk-bot adk-bot added the core [Component] This issue is related to the core interface and implementation label Jan 16, 2026
@adk-bot
Copy link
Collaborator

adk-bot commented Jan 16, 2026

Response from ADK Triaging Agent

Hello @caohy1988, thank you for your contribution!

This is a significant new feature, and we appreciate you taking the time to implement it. To help us review this PR, could you please create a GitHub issue that describes this new feature? You can then associate that issue with this PR.

Also, it looks like you haven't signed the Contributor License Agreement (CLA) yet. You can find instructions on how to do that in the comment from the google-cla bot.

Once these items are addressed, we can proceed with the review. Thanks!

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @caohy1988, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the Agent Development Kit (ADK) by introducing robust support for the Agent Skills open standard. This integration empowers ADK agents with the ability to dynamically acquire and utilize specialized functionalities, including executable scripts and detailed documentation, all managed through a context-efficient progressive disclosure mechanism. The new architecture facilitates modular skill development and seamless LLM interaction, as demonstrated by the included BigQuery-focused skills and a comprehensive demo agent.

Highlights

  • Agent Skills Standard Support: Implements comprehensive support for the Agent Skills open standard (agentskills.io), enabling ADK agents to dynamically discover and load capabilities defined in SKILL.md files.
  • Core Abstractions Introduced: Adds key new classes including MarkdownSkill, AgentSkillLoader, ScriptExecutor, SkillTool, and SkillsManager to facilitate skill definition, discovery, execution, and integration within ADK.
  • Progressive Disclosure Architecture: Introduces a three-stage loading mechanism (Discovery, Activation, Execution) to efficiently manage context by loading only necessary skill information on demand.
  • Safe Script Execution: Enables sandboxed execution of Python, Bash, and JavaScript helper scripts bundled with skills, ensuring security and isolation.
  • ADK Tool Integration: Wraps Agent Skills as native ADK tools using SkillTool, allowing Large Language Models (LLMs) to seamlessly invoke and interact with these new capabilities.
  • Built-in BigQuery Skills: Includes two practical, pre-defined BigQuery skills: bqml for machine learning model training and inference, and bq-ai-operator for AI operations like text generation and embeddings.
  • Demo Agent for Integration Showcase: Provides a functional demo agent that illustrates the end-to-end integration of Agent Skills with the BigQuery toolset.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Comprehensive documentation covering:
- Agent Skills standard overview
- SKILL.md specification
- Progressive disclosure architecture
- ADK implementation details
- Usage examples and best practices

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces comprehensive support for the Agent Skills standard, which is a significant and well-structured feature addition. The implementation of core abstractions like MarkdownSkill, AgentSkillLoader, and ScriptExecutor is robust and includes good practices like progressive disclosure and sandboxed execution. The new documentation and demo agent are also valuable additions. I've identified a few areas for improvement, mainly related to documentation consistency, a potential bug in a demo script, and opportunities for more robust code in a few places.

)

# Print summary on load
if __name__ == "__main__" or True:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The condition if __name__ == "__main__" or True: will always evaluate to true, causing the summary to be printed every time this module is imported. This was likely intended for debugging and should be corrected to if __name__ == "__main__": to ensure it only runs when the script is executed directly.

Suggested change
if __name__ == "__main__" or True:
if __name__ == "__main__":

async def use_{self.name.replace("-", "_")}(tools):
"""Example orchestration for {self.name} skill."""
{script_calls}
return {{"results": [result_0]}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The example orchestration template returns only result_0, even though the preceding code generates up to three results (result_0, result_1, result_2). This is misleading and could be a bug if copied. To accurately reflect the generated results, consider returning all of them. The implementation in markdown_skill.py handles this correctly by creating and using a result_list.

"docker", "run", "--rm",
f"--memory={self.memory_limit_mb}m",
f"--cpus=1",
f"-v", f"{cwd}:/workspace:ro",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Docker volume in this documentation example is mounted as read-only (ro), which would prevent scripts from writing to the workspace. The implementation in script_executor.py correctly uses rw (read-write) for greater flexibility. To avoid confusion, the documentation should be consistent with the implementation.

Suggested change
f"-v", f"{cwd}:/workspace:ro",
f"-v", f"{cwd}:/workspace:rw",


### Skills Loaded

The demo loads BigQuery ML skills from `src/google/adk/tools/bigquery/skills/`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The path to the skills directory seems incorrect. The built-in BigQuery skills are located in src/google/adk/skills/, not src/google/adk/tools/bigquery/skills/.

Suggested change
The demo loads BigQuery ML skills from `src/google/adk/tools/bigquery/skills/`:
The demo loads BigQuery ML skills from `src/google/adk/skills/`:

os.environ.setdefault("GOOGLE_CLOUD_LOCATION", os.getenv("VERTEXAI_LOCATION", "us-central1"))

# Path to skills directory (now in main skills module)
SKILLS_DIR = Path(__file__).parent.parent.parent.parent / "src" / "google" / "adk" / "skills"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Constructing the SKILLS_DIR path using relative parent directories is fragile and can break if the file structure changes. A more robust approach is to import the SKILLS_DIR constant directly from the google.adk.skills package, where it is already defined.

Suggested change
SKILLS_DIR = Path(__file__).parent.parent.parent.parent / "src" / "google" / "adk" / "skills"
from google.adk.skills import SKILLS_DIR

Comment on lines 57 to 59
ml_generate_text_result['candidates'][0]['content']['parts'][0]['text'] AS generated_text,
ml_generate_text_result['usageMetadata']['promptTokenCount'] AS prompt_tokens,
ml_generate_text_result['usageMetadata']['candidatesTokenCount'] AS output_tokens,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Accessing nested dictionary keys directly like this is unsafe and can lead to KeyError or IndexError if the response structure changes or is missing expected fields. It's better to use .get() with default values for safer access and to prevent the script from crashing unexpectedly.

Comment on lines 117 to 118
ml_generate_embedding_result['embeddings'][0]['values'] AS embedding,
ml_generate_embedding_result['embeddings'][0]['statistics']['token_count'] AS token_count,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the text generation logic, this direct access to nested dictionary keys is brittle. Using .get() would make the script more robust against variations or errors in the API response structure.

caohy1988 and others added 2 commits January 16, 2026 08:11
Replaces bq-ai-operator with a comprehensive bigquery-ai skill covering
all BigQuery AI capabilities following Agent Skills standard best practices.

New bigquery-ai skill includes:
- SKILL.md: Concise root with quick start and function reference
- references/TEXT_GENERATION.md: Complete AI.GENERATE_TEXT guide
- references/EMBEDDINGS.md: ML.GENERATE_EMBEDDING best practices
- references/VECTOR_SEARCH.md: Semantic search patterns
- references/RAG_WORKFLOW.md: End-to-end RAG implementation
- references/REMOTE_MODELS.md: CREATE MODEL for all LLM providers
- references/CLOUD_AI_SERVICES.md: Translation, NLP, Vision, etc.
- scripts/: Helper scripts for setup and common operations

Also updates:
- bqml skill: Focused on traditional ML (classification, regression, etc.)
- agent_skills_demo: Updated system instruction for new skill structure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add 6 new BigQuery MarkdownSkills following the Agent Skills standard:

- bigquery-data-management: Data loading, partitioning, clustering,
  external tables, and data formats
- bigquery-analytics: Window functions, aggregations, geospatial
  analysis, and statistical functions
- bigquery-storage: Table management, schema evolution, snapshots,
  clones, and time travel
- bigquery-governance: IAM access control, column/row-level security,
  data masking, CMEK, and audit logging
- bigquery-admin: Slot reservations, BI Engine, job management,
  monitoring, and cost optimization
- bigquery-integration: Client libraries (Python/Java/Node.js),
  REST API, JDBC/ODBC, Data Transfer Service, and Dataflow

Each skill includes:
- SKILL.md with comprehensive documentation
- Reference documents for detailed topics
- Helper scripts for common operations

Also includes unit tests for all new skills (38 tests).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core [Component] This issue is related to the core interface and implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants