You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-ai-alibaba-agent-framework/src/main/java/com/alibaba/cloud/ai/graph/agent/hook/skills/SkillMetadata.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@
24
24
/**
25
25
* Metadata for a Claude-style Skill.
26
26
*
27
-
* A Skill is a reusable package of instructions and context that extends Claude's capabilities.
27
+
* A Skill is a reusable package of instructions and context that extends the LLM's capabilities.
28
28
* Skills are automatically discovered and used by the LLM when relevant to the user's request.
29
29
*/
30
30
publicclassSkillMetadata {
@@ -88,9 +88,9 @@ public void setModel(String model) {
88
88
89
89
/**
90
90
* Load the full content of the SKILL.md file.
91
-
* The content is cached after the first load.
91
+
* The content is cached after the first load (lazy loading).
92
92
*
93
-
* @return the full content of the skill (without frontmatter)
93
+
* @return the full content of SKILL.md (without frontmatter)
94
94
* @throws IOException if the skill file cannot be read
Copy file name to clipboardExpand all lines: spring-ai-alibaba-agent-framework/src/main/java/com/alibaba/cloud/ai/graph/agent/hook/skills/SkillRegistry.java
+23-1Lines changed: 23 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,28 @@ public void clear() {
114
114
logger.debug("Cleared all skills");
115
115
}
116
116
117
+
/**
118
+
* Unregister a skill by name.
119
+
* Package-private: Only used internally by SkillsHook.
120
+
*
121
+
* @param name the skill name to unregister
122
+
* @return true if the skill was removed, false if it didn't exist
123
+
*/
124
+
booleanunregister(Stringname) {
125
+
if (name == null || name.isEmpty()) {
126
+
thrownewIllegalArgumentException("Skill name cannot be null or empty");
127
+
}
128
+
129
+
SkillMetadataremoved = skills.remove(name);
130
+
if (removed != null) {
131
+
logger.info("Unregistered skill: {}", name);
132
+
returntrue;
133
+
} else {
134
+
logger.debug("Attempted to unregister non-existent skill: {}", name);
Copy file name to clipboardExpand all lines: spring-ai-alibaba-agent-framework/src/main/java/com/alibaba/cloud/ai/graph/agent/hook/skills/SkillsHook.java
+87-29Lines changed: 87 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -107,13 +107,10 @@ public CompletableFuture<Map<String, Object>> beforeModel(OverAllState state, Ru
Copy file name to clipboardExpand all lines: spring-ai-alibaba-agent-framework/src/test/java/com/alibaba/cloud/ai/graph/agent/hooks/skills/SkillsHookTest.java
0 commit comments