[Python] [Breaking] Extract skill spec metadata into SkillFrontmatter (#5775)

* Fix Skill docstring consistency and spelling

- 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>

* Fix E501 line-too-long lint error in test_skills.py

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix stale test section header to reflect SkillFrontmatter API

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix metadata children overriding top-level frontmatter fields

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>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
SergeyMenshykh
2026-05-13 21:35:52 +01:00
committed by GitHub
Unverified
parent 7d23582e2b
commit ab09246dc4
12 changed files with 844 additions and 358 deletions
@@ -11,7 +11,7 @@ import os
from textwrap import dedent
from typing import Any
from agent_framework import Agent, InlineSkill, InlineSkillResource, SkillsProvider
from agent_framework import Agent, InlineSkill, InlineSkillResource, SkillFrontmatter, SkillsProvider
from agent_framework.foundry import FoundryChatClient
from azure.identity import AzureCliCredential
from dotenv import load_dotenv
@@ -47,8 +47,9 @@ load_dotenv()
# 1. Static Resources — inline content passed at construction time
# ---------------------------------------------------------------------------
unit_converter_skill = InlineSkill(
name="unit-converter",
description="Convert between common units using a conversion factor",
frontmatter=SkillFrontmatter(
name="unit-converter", description="Convert between common units using a conversion factor"
),
instructions=dedent("""\
Use this skill when the user asks to convert between units.