Skip to content

Comments

feat: Agent Skills spec compliance#4562

Draft
caohy1988 wants to merge 1 commit intogoogle:mainfrom
caohy1988:feat/agent-skills-spec-compliance
Draft

feat: Agent Skills spec compliance#4562
caohy1988 wants to merge 1 commit intogoogle:mainfrom
caohy1988:feat/agent-skills-spec-compliance

Conversation

@caohy1988
Copy link

Summary

  • Frontmatter validation: Add field validators for name (kebab-case, max 64 chars), description (non-empty, max 1024 chars), compatibility (max 500 chars); add allowed-tools YAML alias with populate_by_name=True; set extra='allow'
  • Skill source_path: Track the filesystem path to the loaded SKILL.md; emit <location> tag in XML prompt when available
  • Utils improvements: Extract _parse_skill_md() helper; use model_validate() for alias support; enforce name-directory matching per spec; add validate_skill_dir() and read_skill_properties() public functions
  • SkillToolset enhancements: Add scripts/ resource loading via load_skill_resource; auto-inject DEFAULT_SKILL_SYSTEM_INSTRUCTION (with inject_instruction=False opt-out); duplicate skill name check; _list_skills() returns Skill objects for richer XML output
  • Sample agent fix: Remove manual instruction= (auto-injected now); rename weather_skill/weather-skill/ to match spec naming requirements

Closes gaps against the Agent Skills spec.

Test plan

  • All 55 skills + skill_toolset tests pass (pytest tests/unittests/skills/ tests/unittests/tools/test_skill_toolset.py)
  • Full unit test suite passes (4265 passed, 1 skipped — skip is pre-existing)
  • Autoformatter passes (./autoformat.sh)
  • Sample agent imports successfully

🤖 Generated with Claude Code

…d auto-injection

Close gaps between ADK's Agent Skills implementation and the public
Agent Skills spec (agentskills.io/specification):

- Frontmatter: add field validators for name (kebab-case, max 64),
  description (non-empty, max 1024), compatibility (max 500);
  add allowed-tools alias; add extra='allow'; add populate_by_name
- Skill: add source_path field tracking SKILL.md location
- utils: extract _parse_skill_md helper; use model_validate() for
  alias support; enforce name-dir matching; add validate_skill_dir()
  and read_skill_properties()
- prompt: accept Union[Frontmatter, Skill]; emit <location> tag
- skill_toolset: add scripts/ resource loading; auto-inject system
  instruction (with inject_instruction opt-out); duplicate name check;
  _list_skills() returns Skill objects
- __init__: export validate_skill_dir, read_skill_properties
- sample agent: remove manual instruction (auto-injected now);
  rename weather_skill dir to weather-skill

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@google-cla
Copy link

google-cla bot commented Feb 20, 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
Copy link
Collaborator

adk-bot commented Feb 20, 2026

Hello @caohy1988, thank you for your contribution!

To help us review your pull request, please address the following:

  • Sign the Contributor License Agreement (CLA): It appears you haven't signed the CLA yet. You can do so at https://cla.developers.google.com/.
  • Associated Issue: Our contribution guidelines require that pull requests, other than small documentation or typo fixes, should have an associated GitHub Issue. Could you please create an issue that this PR addresses and link it in the description?

Once these are addressed, we can proceed with the review. Thank you!

Response from ADK Triaging Agent

@caohy1988 caohy1988 marked this pull request as draft February 20, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants