Skip to content

Commit fc1f1db

Browse files
cornellgitcopybara-github
authored andcommitted
fix(skill)!: coloate default skill SI with skilltoolset
PiperOrigin-RevId: 870017182
1 parent 21be6ad commit fc1f1db

File tree

4 files changed

+16
-19
lines changed

4 files changed

+16
-19
lines changed

contributing/samples/skills_agent/agent.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from google.adk import Agent
2020
from google.adk.skills import load_skill_from_dir
2121
from google.adk.skills import models
22-
from google.adk.skills.prompt import DEFAULT_SKILL_SYSTEM_INSTRUCTION
2322
from google.adk.tools import skill_toolset
2423

2524
greeting_skill = models.Skill(
@@ -53,7 +52,7 @@
5352
model="gemini-2.5-flash",
5453
name="skill_user_agent",
5554
description="An agent that can use specialized skills.",
56-
instruction=DEFAULT_SKILL_SYSTEM_INSTRUCTION,
55+
instruction=skill_toolset.DEFAULT_SKILL_SYSTEM_INSTRUCTION,
5756
tools=[
5857
my_skill_toolset,
5958
],

src/google/adk/skills/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@
1818
from .models import Resources
1919
from .models import Script
2020
from .models import Skill
21-
from .prompt import DEFAULT_SKILL_SYSTEM_INSTRUCTION
2221
from .utils import load_skill_from_dir
2322

2423
__all__ = [
2524
"Frontmatter",
2625
"Resources",
2726
"Script",
2827
"Skill",
29-
"DEFAULT_SKILL_SYSTEM_INSTRUCTION",
3028
"load_skill_from_dir",
3129
]

src/google/adk/skills/prompt.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,6 @@
2121

2222
from . import models
2323

24-
DEFAULT_SKILL_SYSTEM_INSTRUCTION = """You can use specialized 'skills' to help you with complex tasks. You MUST use the skill tools to interact with these skills.
25-
26-
Skills are folders of instructions and resources that extend your capabilities for specialized tasks. Each skill folder contains:
27-
- **SKILL.md** (required): The main instruction file with skill metadata and detailed markdown instructions.
28-
- **references/** (Optional): Additional documentation or examples for skill usage.
29-
- **assets/** (Optional): Templates, scripts or other resources used by the skill.
30-
31-
This is very important:
32-
33-
1. Use the `list_skills` tool to discover available skills.
34-
2. If a skill seems relevant to the current user query, you MUST use the `load_skill` tool with `name="<SKILL_NAME>"` to read its full instructions before proceeding.
35-
3. Once you have read the instructions, follow them exactly as documented before replying to the user. For example, If the instruction lists multiple steps, please make sure you complete all of them in order.
36-
4. The `load_skill_resource` tool is for viewing files within a skill's directory (e.g., `references/*`, `assets/*`). Do NOT use other tools to access these files.
37-
"""
38-
3924

4025
def format_skills_as_xml(skills: List[models.Frontmatter]) -> str:
4126
"""Formats available skills into a standard XML string.

src/google/adk/tools/skill_toolset.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,21 @@
2929
from .base_toolset import BaseToolset
3030
from .tool_context import ToolContext
3131

32+
DEFAULT_SKILL_SYSTEM_INSTRUCTION = """You can use specialized 'skills' to help you with complex tasks. You MUST use the skill tools to interact with these skills.
33+
34+
Skills are folders of instructions and resources that extend your capabilities for specialized tasks. Each skill folder contains:
35+
- **SKILL.md** (required): The main instruction file with skill metadata and detailed markdown instructions.
36+
- **references/** (Optional): Additional documentation or examples for skill usage.
37+
- **assets/** (Optional): Templates, scripts or other resources used by the skill.
38+
39+
This is very important:
40+
41+
1. Use the `list_skills` tool to discover available skills.
42+
2. If a skill seems relevant to the current user query, you MUST use the `load_skill` tool with `name="<SKILL_NAME>"` to read its full instructions before proceeding.
43+
3. Once you have read the instructions, follow them exactly as documented before replying to the user. For example, If the instruction lists multiple steps, please make sure you complete all of them in order.
44+
4. The `load_skill_resource` tool is for viewing files within a skill's directory (e.g., `references/*`, `assets/*`). Do NOT use other tools to access these files.
45+
"""
46+
3247

3348
@experimental(FeatureName.SKILL_TOOLSET)
3449
class ListSkillsTool(BaseTool):

0 commit comments

Comments
 (0)