mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-06-06 07:10:44 +08:00
fix: add Script Path Rule to docx/pptx/xlsx skills (#14)
## Summary - 为 docx/pptx/xlsx 三个技能的 SKILL.md 和 SKILL.zh-CN.md 添加"脚本路径规则"章节 - 告知 Agent 在执行技能自带脚本时必须使用 `<skill-dir>/` 前缀,因为 Agent 工作目录是用户项目目录而非技能目录 - 更新 en-US 块的 `source_hash`(内容已变更) - 将 en-US 标记为 `translated_by: human`,跳过 CI 自动翻译 ## Test plan - [ ] 在 dev 环境验证 docx/pptx/xlsx 技能执行脚本时路径正确 - [ ] CI i18n-validate 通过 - [ ] CI i18n-auto-translate 跳过(translated_by: human) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,7 @@ metadata:
|
||||
description: >-
|
||||
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of "Word doc", "word document", ".docx", or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a "report", "memo", "letter", "template", or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. Use when 用户提到 Word文档、docx、创建文档、编辑文档、报告、 备忘录、公文、合同、信函模板。
|
||||
body: ./SKILL.zh-CN.md
|
||||
source_hash: sha256:b9f7129ef5e82c4b
|
||||
source_hash: sha256:58d1aae3a57a1851
|
||||
translated_by: human
|
||||
en-US:
|
||||
name: Word Document Processing
|
||||
@@ -46,9 +46,8 @@ metadata:
|
||||
description: >-
|
||||
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of "Word doc", "word document", ".docx", or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a "report", "memo", "letter", "template", or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. Use when the user mentions Word documents, docx, creating documents, editing documents, reports, memos, official documents, contracts, or letter templates.
|
||||
body: ./SKILL.md
|
||||
source_hash: sha256:b9f7129ef5e82c4b
|
||||
translated_by: ai:claude-opus-4-7
|
||||
translated_at: '2026-05-03'
|
||||
source_hash: sha256:58d1aae3a57a1851
|
||||
translated_by: human
|
||||
market:
|
||||
icon: >-
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0
|
||||
@@ -90,6 +89,19 @@ docx is a **Procedural Skill** that provides full processing capabilities for Wo
|
||||
|
||||
## 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" document.docx unpacked/
|
||||
python "<skill-dir>/scripts/office/pack.py" unpacked/ output.docx
|
||||
```
|
||||
|
||||
**NEVER** run `python scripts/office/unpack.py` directly — that relative path does not exist in the user's working directory.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Python 3 (required)
|
||||
|
||||
@@ -21,6 +21,19 @@ docx 是一个**流程型技能(Procedural Skill)**,提供 Word 文档的
|
||||
|
||||
## L2:详细规范
|
||||
|
||||
### 脚本路径规则(强制)
|
||||
|
||||
本技能自带的 Python 脚本位于技能安装目录内。执行时**必须使用完整路径**,不能使用相对路径。
|
||||
|
||||
技能目录由上下文中的 `<skill-dir>` 标签提供。所有 `scripts/` 开头的命令都应拼接为:
|
||||
|
||||
```bash
|
||||
python "<skill-dir>/scripts/office/unpack.py" document.docx unpacked/
|
||||
python "<skill-dir>/scripts/office/pack.py" unpacked/ output.docx
|
||||
```
|
||||
|
||||
**禁止**直接执行 `python scripts/office/unpack.py`——该相对路径在用户工作目录下不存在。
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Python 3(必需)
|
||||
|
||||
Reference in New Issue
Block a user