Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 24, 2025

Implements skills as reusable capability definitions for AI agents, following the agentskills.io format. Skills are stored in .agents/skills/(skill-name)/SKILL.md and rendered in a dedicated section with XML-like tags.

Implementation

  • Skills discovery: Searches .agents/skills/*/SKILL.md subdirectories with selector-based filtering (languages, task_names, agent)
  • SkillFrontMatter: New frontmatter type with skill_name, languages, task_names, agent, expand fields
  • XML output format: Skills rendered as <skill name="...">content</skill> with explanatory preamble
  • Directory name fallback: Uses directory name as skill_name when not specified in frontmatter

Selector Enhancement

Enhanced MatchesIncludes() to handle array frontmatter values:

// Before: languages: [go, python] would not match languages=go selector
// After: matches if ANY array element matches selector value (OR logic)

This benefits both skills and rules with array-based selectors.

Example

.agents/skills/code-review/SKILL.md:
---
skill_name: code-review
languages: [go, python]
---
# Code Review Skill
...

Output:

# Skills

The following skills are available for use in this task...

<skill name="code-review">
# Code Review Skill
...
</skill>

Testing

  • TestSkillDiscovery: Verifies discovery, XML formatting, preamble
  • TestSkillSelectors: Verifies selector filtering with array values
  • Example skills included: code-review, debugging

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • agentskills.io
    • Triggering command: /usr/bin/curl curl -s REDACTED (dns block)
    • Triggering command: /usr/bin/wget wget -q -O - REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

We need to add support for skills.

Read https://agentskills.io

Each should live in .agents/skills/(skill)/SKILL.md

Find and select skills much like we do for rules.

Add a special section titled "Skills". This should include a preamble on how to use the skills listed. Use the XML like format from the site to list the skills.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Dec 24, 2025
Copilot AI and others added 4 commits December 24, 2025 20:07
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for skills with XML listing format Add skills support with XML-like formatting Dec 24, 2025
Copilot AI requested a review from alexec December 24, 2025 20:18
@alexec
Copy link
Contributor

alexec commented Dec 24, 2025

@copilot Read this page: https://agentskills.io/what-are-skills


Skills are reusable capability definitions that AI agents can leverage during task execution. Unlike rules (which provide context and guidelines), skills define specific capabilities, methodologies, or domain expertise that agents can use.

Skills follow the format described at [agentskills.io](https://agentskills.io) and are output in XML-like format for easy reference.
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot users will not care this is XML based.

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