Skip to content

feat: add per-agent skills support#995

Open
MackinnonBuck wants to merge 11 commits intomainfrom
mackinnonbuck/agent-skills-958
Open

feat: add per-agent skills support#995
MackinnonBuck wants to merge 11 commits intomainfrom
mackinnonbuck/agent-skills-958

Conversation

@MackinnonBuck
Copy link
Copy Markdown
Collaborator

@MackinnonBuck MackinnonBuck commented Apr 2, 2026

Summary

Adds SDK support for scoping skills to individual subagents, addressing #958.

Changes

Types (all 4 SDKs):

  • Node.js (nodejs/src/types.ts): Added skills?: string[] to CustomAgentConfig
  • Python (python/copilot/session.py): Added skills field to agent config
  • Go (go/types.go): Added Skills []string to agent config struct
  • .NET (dotnet/src/Types.cs): Added List<string>? Skills to agent config class

Documentation:

  • docs/features/custom-agents.md: Added skills to config reference table and new section on per-agent skills
  • docs/features/skills.md: Updated "Skills + Custom Agents" section with per-agent example
  • docs/features/streaming-events.md: Added agentName field to skill.invoked event docs

Tests (all 4 SDKs):

  • Node.js, Python, Go, .NET e2e tests covering:
    • Agent with skills can invoke listed skills
    • Agent without skills field gets no skills (backward compatible)

Design decisions

  • Opt-in model: skills is optional. Omitting it means the agent has no access to skills (not all skills).
  • Name-based resolution: Skills are referenced by name from the session-level skillDirectories pool.
  • Cross-SDK parity: All 4 SDKs support the new field consistently.

Closes #958

@MackinnonBuck MackinnonBuck requested a review from a team as a code owner April 2, 2026 21:30
Copilot AI review requested due to automatic review settings April 2, 2026 21:30
@MackinnonBuck MackinnonBuck marked this pull request as draft April 2, 2026 21:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds per-custom-agent skill scoping to the SDK surface area (types + docs) and introduces new cross-SDK E2E coverage + replay snapshots for the opt-in behavior.

Changes:

  • Added skills to CustomAgentConfig across Node.js, Python, Go, and .NET SDK types.
  • Updated docs to describe per-agent skill scoping and added agentName to skill.invoked event docs.
  • Added E2E tests and new replay snapshots for “agent with skills” vs “agent without skills field”.

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
nodejs/src/types.ts Adds skills?: string[] to CustomAgentConfig with JSdoc explaining opt-in semantics.
python/copilot/session.py Adds skills to the Python CustomAgentConfig TypedDict.
go/types.go Adds Skills []string to Go CustomAgentConfig for JSON serialization.
dotnet/src/Types.cs Adds List<string>? Skills to .NET CustomAgentConfig with XML docs.
docs/features/custom-agents.md Documents the new skills field and adds a dedicated per-agent skills section.
docs/features/skills.md Updates “Skills + Custom Agents” section with per-agent skills example and opt-in note.
docs/features/streaming-events.md Documents agentName on skill.invoked.
nodejs/test/e2e/skills.test.ts Adds Node E2E tests for agent-scoped skills behavior.
python/e2e/test_skills.py Adds Python E2E tests for agent-scoped skills behavior.
go/internal/e2e/skills_test.go Adds Go E2E tests for agent-scoped skills behavior.
dotnet/test/SkillsTests.cs Adds .NET E2E tests for agent-scoped skills behavior.
test/snapshots/skills/should_allow_agent_with_skills_to_invoke_skill.yaml Replay snapshot for the “agent with skills can invoke” scenario.
test/snapshots/skills/should_not_provide_skills_to_agent_without_skills_field.yaml Replay snapshot for the “no skills field => no skills” scenario.
nodejs/package-lock.json Lockfile metadata updates.
Files not reviewed (1)
  • nodejs/package-lock.json: Language not supported

@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Generated by SDK Consistency Review Agent for issue #995

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

MackinnonBuck added a commit that referenced this pull request Apr 9, 2026
- Add skills field to Python wire format converter
- Explicitly select agents in all E2E tests for deterministic behavior

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

This comment has been minimized.

MackinnonBuck added a commit that referenced this pull request Apr 9, 2026
- Add skills field to Python wire format converter
- Explicitly select agents in all E2E tests for deterministic behavior

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@MackinnonBuck MackinnonBuck force-pushed the mackinnonbuck/agent-skills-958 branch from b6eb0fa to c1272a1 Compare April 9, 2026 17:42
@github-actions

This comment has been minimized.

knifeyspoony pushed a commit to knifeyspoony/copilot-sdk-rust that referenced this pull request Apr 10, 2026
Add skills: Option<Vec<String>> to CustomAgentConfig, matching the
new per-agent skills support in CLI 1.0.23 (SweCustomAgent.skills).
Skills are referenced by name from the session's skillDirectories pool
and eagerly preloaded into the agent's context at startup.

Adds smoke_subagent_with_skills test that creates a skill directory
with a SKILL.md containing a known passphrase, configures a subagent
with skills: ["trivia-skill"], and verifies the model can access
the skill content.

Also fixes skill directory structure in smoke_agent_with_skill to use
the proper subdirectory/SKILL.md convention.

Upstream SDK PR: github/copilot-sdk#995 (draft, not yet merged)
Runtime support: CLI 1.0.23 native binary

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
MackinnonBuck and others added 5 commits April 13, 2026 16:16
Add a 'skills' field to CustomAgentConfig across all four SDK languages
(Node.js, Python, Go, .NET) to support scoping skills to individual
subagents. Skills are opt-in: agents get no skills by default.

Changes:
- Add skills?: string[] to CustomAgentConfig in all SDKs
- Update custom-agents.md with skills in config table and new section
- Update skills.md with per-agent skills example and opt-in note
- Update streaming-events.md with agentName on skill.invoked event
- Add E2E tests for agent-scoped skills in all four SDKs
- Add snapshot YAML files for new test scenarios

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update type comments, docs, and test descriptions to reflect that
per-agent skills are eagerly injected into the agent's context at
startup rather than filtered for invocation. Sub-agents do not
inherit skills from the parent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The runtime does not emit agentName on the skill.invoked event.
The agent name is used only for internal logging during eager
skill loading, not as event data.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add skills field to Python wire format converter
- Explicitly select agents in all E2E tests for deterministic behavior

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The generated_session_events.go on main changed from a flat Data struct
to a SessionEventData interface with per-event typed structs. The agent
skills test cases added in this PR were using the old message.Data.Content
pattern instead of the type assertion pattern used elsewhere.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@MackinnonBuck MackinnonBuck force-pushed the mackinnonbuck/agent-skills-958 branch from c1272a1 to 6f3083b Compare April 13, 2026 23:18
@MackinnonBuck MackinnonBuck changed the title feat: add per-agent skills support to SDK types and docs (#958) feat: add per-agent skills support Apr 13, 2026
@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Generated by SDK Consistency Review Agent for issue #995 · ● 510.2K

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

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Generated by SDK Consistency Review Agent for issue #995 · ● 462.3K

@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Generated by SDK Consistency Review Agent for issue #995 · ● 468.7K

The runtime now eagerly injects skill content into <agent_instructions>
in the user message instead of using a skill tool call. Update the
replay proxy to strip <agent_instructions> during normalization, and
simplify the snapshot for agent-with-skills to match the new flow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@MackinnonBuck MackinnonBuck force-pushed the mackinnonbuck/agent-skills-958 branch from 305dd4e to 276df2f Compare April 14, 2026 01:43
@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Generated by SDK Consistency Review Agent for issue #995 · ● 543.4K

Add two regression tests validating that <agent_instructions> blocks
are properly stripped during user message normalization, including
the case where skill-context is nested inside agent_instructions.

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

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Generated by SDK Consistency Review Agent for issue #995 · ● 599.7K

Match the established convention used by Tools, SkillDirectories,
DisabledSkills, and other collection properties in the codebase.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@MackinnonBuck MackinnonBuck marked this pull request as ready for review April 14, 2026 16:04
@github-actions

This comment has been minimized.

MackinnonBuck and others added 2 commits April 14, 2026 09:29
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review ✅

This PR adds per-agent skills support consistently across all four SDK implementations. Here's a summary of the review:

What was checked

  • CustomAgentConfig type additions in all 4 SDKs
  • API naming conventions per language idiom
  • E2E test coverage
  • Documentation updates

Findings

Consistent across all SDKs

SDK Field Type Wire format
Node.js skills?: string[] array direct
Python skills: NotRequired[list[str]] array serialized in client.py
Go Skills []string \json:"skills,omitempty"`` slice direct
.NET public IList<string>? Skills interface type direct

All four implementations use proper language idioms, follow naming conventions, and include equivalent E2E tests covering both the "agent with skills" and "agent without skills (opt-in)" scenarios.

One potential gap 🔍

The PR description lists this change:

docs/features/streaming-events.md: Added agentName field to skill.invoked event docs

However, docs/features/streaming-events.md is not in the diff, and the skill.invoked event section (lines 624–636) currently does not include an agentName field. The summary table on line 797 also still shows skill.invoked without agentName. Additionally, the SkillInvokedData types in all four SDKs don't expose agentName.

If this field is expected to be emitted by the runtime when a per-agent skill is invoked (to identify which agent triggered it), the docs and type definitions may need a follow-up update. If agentName is not yet emitted by the runtime, it might be worth removing that line from the PR description to avoid confusion.

This is a minor observation — the core feature implementation is solid and consistent across all SDKs.

Generated by SDK Consistency Review Agent for issue #995 · ● 448.4K ·

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.

FEATURE: Subagent skills

2 participants