mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-06-06 10:30:39 +08:00
fix(skills): 添加脚本路径强制规则,修复 docx/pptx/xlsx 脚本找不到的问题
Agent 执行技能内置脚本时 cwd 不在技能目录,导致 python scripts/... 相对路径失败。 在 L2 规范中增加 Script Path Rule,要求使用 <skill-dir> 拼接完整路径。
This commit is contained in:
@@ -38,7 +38,7 @@ metadata:
|
||||
description: >-
|
||||
Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill. Use when 用户提到 PPT、演示文稿、幻灯片、演讲稿、汇报材料、 pptx、创建演示、编辑幻灯片。
|
||||
body: ./SKILL.zh-CN.md
|
||||
source_hash: sha256:761da55f1e450adc
|
||||
source_hash: sha256:a952bf5622ede8e0
|
||||
translated_by: human
|
||||
en-US:
|
||||
name: Presentation Processing
|
||||
@@ -46,8 +46,8 @@ metadata:
|
||||
description: >-
|
||||
Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill. Use when the user mentions PPT, presentation, slides, speaker notes, briefing materials, pptx, creating presentations, or editing slides.
|
||||
body: ./SKILL.md
|
||||
source_hash: sha256:761da55f1e450adc
|
||||
translated_by: ai:claude-opus-4-7
|
||||
source_hash: sha256:a952bf5622ede8e0
|
||||
translated_by: human
|
||||
translated_at: '2026-05-03'
|
||||
market:
|
||||
icon: >-
|
||||
@@ -91,6 +91,19 @@ pptx is a **Procedural Skill** providing full PowerPoint presentation processing
|
||||
|
||||
## L2: Detailed Specification
|
||||
|
||||
### Script Path Rule (mandatory)
|
||||
|
||||
The Python scripts bundled with this skill live inside the skill installation directory. You **MUST use full paths** when invoking them — never use bare relative paths.
|
||||
|
||||
The skill directory is provided by the `<skill-dir>` tag in the context. Prefix all `scripts/` commands accordingly:
|
||||
|
||||
```bash
|
||||
python "<skill-dir>/scripts/office/unpack.py" presentation.pptx unpacked/
|
||||
python "<skill-dir>/scripts/office/pack.py" unpacked/ output.pptx
|
||||
```
|
||||
|
||||
**NEVER** run `python scripts/office/unpack.py` directly — that relative path does not exist in the user's working directory.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Python 3 (required — needed when reading and editing existing PPTX)
|
||||
|
||||
@@ -21,6 +21,19 @@ pptx 是一个**流程型技能(Procedural Skill)**,提供 PowerPoint 演
|
||||
|
||||
## L2:详细规范
|
||||
|
||||
### 脚本路径规则(强制)
|
||||
|
||||
本技能自带的 Python 脚本位于技能安装目录内。执行时**必须使用完整路径**,不能使用相对路径。
|
||||
|
||||
技能目录由上下文中的 `<skill-dir>` 标签提供。所有 `scripts/` 开头的命令都应拼接为:
|
||||
|
||||
```bash
|
||||
python "<skill-dir>/scripts/office/unpack.py" presentation.pptx unpacked/
|
||||
python "<skill-dir>/scripts/office/pack.py" unpacked/ output.pptx
|
||||
```
|
||||
|
||||
**禁止**直接执行 `python scripts/office/unpack.py`——该相对路径在用户工作目录下不存在。
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Python 3(必需 — 读取和编辑现有 PPTX 时需要)
|
||||
|
||||
Reference in New Issue
Block a user