在 "Skill Execution Workflow" 之前新增了 "Skills vs Tools - CRITICAL DISTINCTION"

段落
This commit is contained in:
朱潮 2026-04-04 23:24:07 +08:00
parent 1321471202
commit 044749e2ce
2 changed files with 27 additions and 3 deletions

View File

@ -14,7 +14,19 @@ The filesystem backend is currently operating in: `{agent_dir_path}`
- Never use relative paths in bash commands - always construct full absolute paths - Never use relative paths in bash commands - always construct full absolute paths
- Use the working directory from <env> to construct absolute paths - Use the working directory from <env> to construct absolute paths
**2. Skill Script Path Conversion** **2. Skills vs Tools - CRITICAL DISTINCTION**
**Skills are NOT tools.** Do NOT attempt to call a skill as a tool_call/function_call.
- **Tools** (e.g., `rag_retrieve`, `read_file`, `bash`): Directly callable via tool_call interface with structured parameters.
- **Skills** (e.g., `baidu-search`, `pdf`, `xlsx`): Multi-step workflows executed by: (1) reading SKILL.md, (2) extracting the command, (3) running it via the `bash` tool.
❌ WRONG: Generating a tool_call with `{"name": "baidu-search", "arguments": {...}}`
✅ CORRECT: Using `read_file` to read SKILL.md, then using `bash` to execute the script
If you see a skill name in the "Available Skills" list, it is NEVER a tool you can call directly.
**3. Skill Script Path Conversion**
When executing scripts from SKILL.md files, you MUST convert relative paths to absolute paths: When executing scripts from SKILL.md files, you MUST convert relative paths to absolute paths:
@ -29,14 +41,14 @@ When executing scripts from SKILL.md files, you MUST convert relative paths to a
└── scriptB.py # Actual script B file └── scriptB.py # Actual script B file
``` ```
**3. Workspace Directory Structure** **4. Workspace Directory Structure**
- **`{agent_dir_path}/skills/`** - Skill packages with embedded scripts - **`{agent_dir_path}/skills/`** - Skill packages with embedded scripts
- **`{agent_dir_path}/dataset/`** - Store file datasets and document data - **`{agent_dir_path}/dataset/`** - Store file datasets and document data
- **`{agent_dir_path}/executable_code/`** - Place generated executable scripts here (not skill scripts) - **`{agent_dir_path}/executable_code/`** - Place generated executable scripts here (not skill scripts)
- **`{agent_dir_path}/download/`** - Store downloaded files and content - **`{agent_dir_path}/download/`** - Store downloaded files and content
**4. Executable Code Organization** **5. Executable Code Organization**
When creating scripts in `executable_code/`, follow these organization rules: When creating scripts in `executable_code/`, follow these organization rules:

View File

@ -83,6 +83,18 @@ When using the write_todos tool:
The todo list is a planning tool - use it judiciously to avoid overwhelming the user with excessive task tracking. The todo list is a planning tool - use it judiciously to avoid overwhelming the user with excessive task tracking.
### Skills vs Tools - CRITICAL DISTINCTION
**Skills are NOT tools.** Do NOT attempt to call a skill as a tool_call/function_call.
- **Tools** (e.g., `rag_retrieve`, `read_file`, `bash`): Directly callable via tool_call interface with structured parameters.
- **Skills** (e.g., `baidu-search`, `pdf`, `xlsx`): Multi-step workflows executed by: (1) reading SKILL.md, (2) extracting the command, (3) running it via the `bash` tool.
❌ WRONG: Generating a tool_call with `{"name": "baidu-search", "arguments": {...}}`
✅ CORRECT: Using `read_file` to read SKILL.md, then using `bash` to execute the script
If you see a skill name in the "Available Skills" list, it is NEVER a tool you can call directly.
### Skill Execution Workflow ### Skill Execution Workflow
**CRITICAL**: When you need to use a skill, follow this exact workflow: **CRITICAL**: When you need to use a skill, follow this exact workflow: