Skip to content

Commit 63b10df

Browse files
committed
nit: change discover_profiles tool name to "list_profiles"
1 parent 41b4872 commit 63b10df

File tree

7 files changed

+19
-150
lines changed

7 files changed

+19
-150
lines changed

docs/skills.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ CAO ships with two default skills:
100100

101101
## How Agents Discover Skills
102102

103-
All installed skills are available to all CAO agents — there is no per-profile skill declaration. When an agent is launched, CAO appends a catalog block to the prompt listing every installed skill's name and description, along with instructions to use the `get_skill` MCP tool to retrieve full content. The agent then decides when and whether to load each skill based on the task at hand.
103+
All installed skills are available to all CAO agents — there is no per-profile skill declaration. When an agent is launched, CAO appends a catalog block to the prompt listing every installed skill's name and description, along with instructions to use the `load_skill` MCP tool to retrieve full content. The agent then decides when and whether to load each skill based on the task at hand.
104104

105105
You can explicitly instruct the agent to load specific skills eagerly in the agent profile body:
106106

@@ -114,19 +114,19 @@ Skills are delivered to agents differently depending on the provider. The table
114114

115115
| Provider | Injection Method | When Catalog Updates | Skill Retrieval |
116116
|----------|-----------------|---------------------|-----------------|
117-
| Claude Code | Runtime prompt | Every terminal creation | `get_skill` MCP tool |
118-
| Codex | Runtime prompt | Every terminal creation | `get_skill` MCP tool |
119-
| Gemini CLI | Runtime prompt | Every terminal creation | `get_skill` MCP tool |
120-
| Kimi CLI | Runtime prompt | Every terminal creation | `get_skill` MCP tool |
117+
| Claude Code | Runtime prompt | Every terminal creation | `load_skill` MCP tool |
118+
| Codex | Runtime prompt | Every terminal creation | `load_skill` MCP tool |
119+
| Gemini CLI | Runtime prompt | Every terminal creation | `load_skill` MCP tool |
120+
| Kimi CLI | Runtime prompt | Every terminal creation | `load_skill` MCP tool |
121121
| Kiro CLI | Native `skill://` resources | Every terminal creation | Kiro progressive loading |
122-
| Q CLI | Baked into agent JSON at install | On `cao skills add/remove` | `get_skill` MCP tool |
123-
| Copilot CLI | Baked into `.agent.md` at install | On `cao skills add/remove` | `get_skill` MCP tool |
122+
| Q CLI | Baked into agent JSON at install | On `cao skills add/remove` | `load_skill` MCP tool |
123+
| Copilot CLI | Baked into `.agent.md` at install | On `cao skills add/remove` | `load_skill` MCP tool |
124124

125125
### Runtime Prompt Providers (Claude Code, Codex, Gemini CLI, Kimi CLI)
126126

127127
For these providers, the skill catalog is built fresh each time a terminal is created. The catalog — a list of skill names and descriptions — is appended to the system prompt via the provider's native CLI flags.
128128

129-
The agent retrieves full skill content at runtime by calling the `get_skill` MCP tool, which fetches the skill body from the CAO server.
129+
The agent retrieves full skill content at runtime by calling the `load_skill` MCP tool, which fetches the skill body from the CAO server.
130130

131131
No action is needed after `cao skills add` or `cao skills remove` — the next terminal created will automatically reflect the current set of installed skills.
132132

src/cli_agent_orchestrator/mcp_server/server.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
""",
4040
)
4141

42-
GET_SKILL_TOOL_DESCRIPTION = """Retrieve the full Markdown body of an available skill from cao-server.
42+
LOAD_SKILL_TOOL_DESCRIPTION = """Retrieve the full Markdown body of an available skill from cao-server.
4343
4444
Use this tool when your prompt lists a CAO skill and you need its full instructions at runtime.
4545
@@ -266,7 +266,7 @@ def _extract_error_detail(response: requests.Response, fallback: str) -> str:
266266
return fallback
267267

268268

269-
def _get_skill_impl(name: str) -> Union[str, Dict[str, Any]]:
269+
def _load_skill_impl(name: str) -> Union[str, Dict[str, Any]]:
270270
"""Fetch a skill body from cao-server and return content or a structured error."""
271271
try:
272272
response = requests.get(f"{API_BASE_URL}/skills/{name}")
@@ -608,12 +608,12 @@ async def send_message(
608608
return _send_message_impl(receiver_id, message)
609609

610610

611-
@mcp.tool(description=GET_SKILL_TOOL_DESCRIPTION)
612-
async def get_skill(
611+
@mcp.tool(description=LOAD_SKILL_TOOL_DESCRIPTION)
612+
async def load_skill(
613613
name: str = Field(description="Name of the skill to retrieve"),
614614
) -> Any:
615615
"""Retrieve skill content from cao-server."""
616-
return _get_skill_impl(name)
616+
return _load_skill_impl(name)
617617

618618

619619
def main():

src/cli_agent_orchestrator/utils/skills.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
SKILL_CATALOG_INSTRUCTION = (
1616
"The following skills are available exclusively in this CAO orchestration context. "
17-
"To load a skill's full content, use the `get_skill` MCP tool provided by the CAO MCP server. "
17+
"To load a skill's full content, use the `load_skill` MCP tool provided by the CAO MCP server. "
1818
"These skills are not accessible through provider-native skill commands or directories."
1919
)
2020

test/e2e/test_skills.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Tests the full skill pipeline — validates that:
44
1. The skill catalog text is injected into the provider CLI command
55
(verified by inspecting the tmux scrollback, not LLM output)
6-
2. The get_skill API endpoint returns installed skill content
6+
2. The load_skill MCP tool / API endpoint returns installed skill content
77
88
Requires: running CAO server, authenticated CLI tools, tmux, seeded skills.
99

test/mcp_server/test_get_skill.py

Lines changed: 0 additions & 131 deletions
This file was deleted.

test/services/test_terminal_service_full.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def test_create_terminal_appends_skill_catalog(
163163
mock_build_skill_catalog.return_value = (
164164
"## Available Skills\n\n"
165165
"The following skills are available exclusively in this CAO orchestration context. "
166-
"To load a skill's full content, use the `get_skill` MCP tool provided by the "
166+
"To load a skill's full content, use the `load_skill` MCP tool provided by the "
167167
"CAO MCP server. These skills are not accessible through provider-native skill "
168168
"commands or directories.\n\n"
169169
"- **cao-worker-protocols**: Worker communication\n"
@@ -180,7 +180,7 @@ def test_create_terminal_appends_skill_catalog(
180180
assert skill_prompt == (
181181
"## Available Skills\n\n"
182182
"The following skills are available exclusively in this CAO orchestration context. "
183-
"To load a skill's full content, use the `get_skill` MCP tool provided by the "
183+
"To load a skill's full content, use the `load_skill` MCP tool provided by the "
184184
"CAO MCP server. These skills are not accessible through provider-native skill "
185185
"commands or directories.\n\n"
186186
"- **cao-worker-protocols**: Worker communication\n"
@@ -266,7 +266,7 @@ def test_create_terminal_does_not_pass_skill_prompt_to_non_runtime_provider(
266266
mock_build_skill_catalog.return_value = (
267267
"## Available Skills\n\n"
268268
"The following skills are available exclusively in this CAO orchestration context. "
269-
"To load a skill's full content, use the `get_skill` MCP tool provided by the "
269+
"To load a skill's full content, use the `load_skill` MCP tool provided by the "
270270
"CAO MCP server. These skills are not accessible through provider-native skill "
271271
"commands or directories.\n\n"
272272
"- **python-testing**: Pytest conventions"

test/utils/test_skills.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def test_renders_all_installed_skills(self, mock_list_skills):
268268
assert build_skill_catalog() == (
269269
"## Available Skills\n\n"
270270
"The following skills are available exclusively in this CAO orchestration context. "
271-
"To load a skill's full content, use the `get_skill` MCP tool provided by the "
271+
"To load a skill's full content, use the `load_skill` MCP tool provided by the "
272272
"CAO MCP server. These skills are not accessible through provider-native skill "
273273
"commands or directories.\n\n"
274274
"- **cao-worker-protocols**: Worker communication\n"

0 commit comments

Comments
 (0)