Skip to content

feat: add per-agent skills support to SDK types and docs (#958)#995

Draft
MackinnonBuck wants to merge 5 commits intomainfrom
mackinnonbuck/agent-skills-958
Draft

feat: add per-agent skills support to SDK types and docs (#958)#995
MackinnonBuck wants to merge 5 commits intomainfrom
mackinnonbuck/agent-skills-958

Conversation

@MackinnonBuck
Copy link
Copy Markdown
Collaborator

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.

Depends on: github/copilot-agent-runtime PR (runtime must land first for e2e tests to pass)

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 <[email protected]>
@github-actions

This comment has been minimized.

MackinnonBuck and others added 5 commits April 9, 2026 10:41
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
- Add skills field to Python wire format converter
- Explicitly select agents in all E2E tests for deterministic behavior

Co-authored-by: Copilot <[email protected]>
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 <[email protected]>
@MackinnonBuck MackinnonBuck force-pushed the mackinnonbuck/agent-skills-958 branch from b6eb0fa to c1272a1 Compare April 9, 2026 17:42
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Cross-SDK Consistency Review ✅

This PR maintains excellent cross-SDK consistency for the new skills field on CustomAgentConfig. All four implementations are present and parallel:

SDK Type Field
Node.js types.ts skills?: string[]
Python session.py skills: NotRequired[list[str]]
Go types.go Skills []string \json:"skills,omitempty"``
.NET Types.cs public List<string>? Skills { get; set; }

All four SDKs also have matching E2E tests with the same two scenarios:

  • Agent with skills receives preloaded skill content ✅
  • Agent without skills receives no skill content (opt-in model) ✅

Python's client.py correctly wires the new field through _convert_custom_agent_to_wire_format, consistent with how other optional fields (mcp_servers, infer) are handled.


Minor note on PR description: The description lists docs/features/streaming-events.md as a changed file with "agentName field added to skill.invoked event docs", but this file is not in the actual diff and agentName does not appear in the current skill.invoked type definitions in any SDK. This looks like a stale entry in the PR description — worth cleaning up to avoid confusion, but it doesn't affect the implementation correctness.

Generated by SDK Consistency Review Agent for issue #995 ·

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 <[email protected]>
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