[Python] [Breaking] Extract skill spec metadata into SkillFrontmatter#5775
Merged
SergeyMenshykh merged 4 commits intoMay 13, 2026
Merged
Conversation
- Add ClassSkill to Skill class docstring concrete implementations list - Normalize 'defence' to 'defense' for American English consistency - Remove extra blank line in InlineSkill docstring example Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Python skills model to align more closely with the agentskills.io spec by centralizing all skill frontmatter fields into a new SkillFrontmatter object and extending SKILL.md frontmatter parsing to cover the full spec surface area.
Changes:
- Introduces
SkillFrontmatterand updatesSkillto expose spec metadata via an abstractskill.frontmatterproperty. - Updates
InlineSkill,FileSkill, andClassSkillconstructors to acceptfrontmatter=SkillFrontmatter(...)(breaking change for the experimental Skills API). - Extends
_extract_frontmatterparsing to includelicense,compatibility,allowed-tools, and an indentedmetadata:block; updates samples/tests/docs accordingly.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| python/samples/02-agents/skills/skill_filtering/skill_filtering.py | Updates skill filtering to reference s.frontmatter.name. |
| python/samples/02-agents/skills/script_approval/script_approval.py | Updates sample skill construction to use SkillFrontmatter. |
| python/samples/02-agents/skills/mixed_skills/mixed_skills.py | Updates inline + class skill construction to use SkillFrontmatter. |
| python/samples/02-agents/skills/code_defined_skill/code_defined_skill.py | Updates sample skill construction to use SkillFrontmatter. |
| python/packages/core/tests/core/test_skills.py | Updates existing skills tests for frontmatter and adds coverage for new spec fields parsing/validation. |
| python/packages/core/AGENTS.md | Updates documentation to describe SkillFrontmatter and the new skill API shape. |
| python/packages/core/agent_framework/_skills.py | Implements SkillFrontmatter, adds compatibility validation, and extends YAML frontmatter parsing (including metadata block parsing). |
| python/packages/core/agent_framework/init.py | Exports SkillFrontmatter from the public package surface. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
moonbox3
reviewed
May 12, 2026
Scope YAML_KV_RE to column-0 keys only so indented children under metadata: are not mistakenly parsed as top-level fields. Add regression test and spec fields to sample SKILL.md files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
moonbox3
approved these changes
May 13, 2026
TaoChenOSU
approved these changes
May 13, 2026
Contributor
TaoChenOSU
left a comment
There was a problem hiding this comment.
Is this a breaking change?
Member
Author
Yes, it's a breaking change for the experimental feature. I updated the PR to indicate the breaking nature. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
The Skill subclass constructors each accepted
ame and description as direct parameters. As the agentskills.io specification defines additional frontmatter fields, adding them to every constructor would be repetitive and fragile.
Description
Introduces SkillFrontmatter — a single class encapsulating all spec frontmatter fields (
ame, description, license, compatibility, �llowed_tools, metadata). Subclass constructors now accept rontmatter=SkillFrontmatter(...) instead of separate parameters. Adding future spec fields requires changing only one class.
[BREAKING] — Constructor signatures changed. Acceptable as the Skills API is
@experimental.Contribution Checklist