Skip to content

feat(core): implement agent skill#88

Merged
AlbumenJ merged 14 commits intoagentscope-ai:mainfrom
fang-tech:tianyu/feat-agent-skill
Dec 24, 2025
Merged

feat(core): implement agent skill#88
AlbumenJ merged 14 commits intoagentscope-ai:mainfrom
fang-tech:tianyu/feat-agent-skill

Conversation

@fang-tech
Copy link
Contributor

@fang-tech fang-tech commented Nov 30, 2025

close #92

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

This PR implements the agent skill feature as proposed by Anthropic, allowing agents to dynamically load specialized capabilities from skill directories. The implementation adds support for registering, managing, and using agent skills within the AgentScope framework.

  • Adds comprehensive bilingual documentation (English and Chinese) explaining agent skill concepts, APIs, and usage examples
  • Implements core agent skill functionality including YAML frontmatter parsing, skill registration, and integration with ReActAgent
  • Provides complete test coverage for all new components including YamlFrontmatter parser, Toolkit agent skill APIs, and ToolRegistry operations

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
docs/en/task/agent-skill.md English documentation for agent skills with comprehensive examples and best practices
docs/zh/task/agent-skill.md Chinese translation of agent skill documentation
agentscope-core/src/main/java/io/agentscope/core/util/YamlFrontmatter.java New utility class for parsing YAML frontmatter from markdown files
agentscope-core/src/main/java/io/agentscope/core/tool/Toolkit.java Extended with agent skill registration, retrieval, and removal methods
agentscope-core/src/main/java/io/agentscope/core/tool/ToolkitConfig.java Added configuration for agent skill instruction and template formatting
agentscope-core/src/main/java/io/agentscope/core/tool/ToolRegistry.java Added concurrent map storage and operations for agent skills
agentscope-core/src/main/java/io/agentscope/core/ReActAgent.java Modified getSysPrompt() to append agent skill prompts automatically
agentscope-core/src/test/java/io/agentscope/core/util/YamlFrontmatterTest.java Comprehensive test suite covering normal cases, edge cases, and error scenarios
agentscope-core/src/test/java/io/agentscope/core/tool/ToolkitTest.java Tests for agent skill registration, validation, and removal
agentscope-core/src/test/java/io/agentscope/core/tool/ToolRegistryTest.java Tests for registry operations including concurrent access
agentscope-core/src/test/java/io/agentscope/core/agent/test/TestConstants.java Added default agent skill instruction and template constants
agentscope-core/src/test/java/io/agentscope/core/agent/ReActAgentTest.java Integration test verifying agent skill prompt appending

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cla-assistant
Copy link

cla-assistant bot commented Dec 2, 2025

CLA assistant check
All committers have signed the CLA.

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AlbumenJ AlbumenJ marked this pull request as draft December 9, 2025 14:14
@fang-tech fang-tech force-pushed the tianyu/feat-agent-skill branch 3 times, most recently from 2c82e2e to 403d14a Compare December 17, 2025 04:10
@fang-tech fang-tech changed the title implement agent skill feat(core): implement agent skill Dec 17, 2025
@fang-tech fang-tech marked this pull request as ready for review December 17, 2025 17:42
@fang-tech fang-tech requested a review from a team December 17, 2025 17:42
@fang-tech fang-tech force-pushed the tianyu/feat-agent-skill branch from 37c5f0d to 940b32b Compare December 17, 2025 17:42
Copy link
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

Copilot reviewed 33 out of 33 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fang-tech fang-tech force-pushed the tianyu/feat-agent-skill branch 3 times, most recently from faa0e03 to d842f6b Compare December 18, 2025 17:00
@fang-tech fang-tech force-pushed the tianyu/feat-agent-skill branch from 5c85fac to 6c21293 Compare December 20, 2025 11:49
@fang-tech fang-tech requested a review from AlbumenJ December 20, 2025 13:13
@fang-tech fang-tech force-pushed the tianyu/feat-agent-skill branch from 09a4288 to eba411e Compare December 21, 2025 11:34
Copy link
Collaborator

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

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

  1. ReActAgent does not need to hold skillBox.
  2. Extract skillHook into a separate class.

Others LGTM

@fang-tech fang-tech force-pushed the tianyu/feat-agent-skill branch from 903c9c5 to 1fba204 Compare December 24, 2025 02:32
@AlbumenJ AlbumenJ merged commit 155de0a into agentscope-ai:main Dec 24, 2025
4 checks passed
JGoP-L pushed a commit to JGoP-L/agentscope-java that referenced this pull request Dec 29, 2025
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] Agent Skills

2 participants