agentleFS
guoliang1114-boopguoliang1114-boop/AriaAI/skills/office-document-editor/SKILL.md

office-document-editor

Skill40 starsChanged 3 months agoMITView on GitHub

Edit existing Office documents in the project space. Use when the user asks to (1) modify a PPT slide's title/content/data, (2) update a Word document's section/paragraph/table, (3) change Excel cell values/formulas/rows/columns, (4) add/remove/reorder slides or pages, (5) fix formatting, update data, or make corrections to an existing file. Covers PPT, Word, Excel editing. Does NOT create new files from scratch — use presentation-builder or write_project_office_document for that.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this Skill when the user wants to:

    line 16
  2. Very specific:

    Do NOT use this Skill for creating brand new files.

    line 24
  3. Distinctive:

    Always read the file first to understand its structure:

    line 45
  4. Distinctive:

    After reading, outline the changes clearly:

    line 57
  5. Very specific:

    Use edit_project_office_document to apply changes directly to the file.

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Office Document Editor

Edit existing Office documents (PPTX, DOCX, XLSX) in the project space using direct file manipulation.

When To Use

Use this Skill when the user wants to:

  • 修改现有 PPT 的页面内容、标题、数据
  • 更新 Word 文档的段落、章节、表格
  • 修改 Excel 的单元格、公式、行列
  • 给现有文档添加/删除内容
  • 修复格式问题

Do NOT use this Skill for creating brand new files. For new file creation, use write_project_office_document directly.

Tools

ToolPurpose
read_project_fileRead existing file content to understand structure
edit_project_office_documentApply edits to existing PPTX/DOCX/XLSX files
write_project_office_documentOnly used when creating a new file from scratch

Workflow

1. Read    → read_project_file to understand file structure
2. Plan    → Identify what needs to change
3. Edit    → edit_project_office_document with specific edits
4. Confirm → Report changes to user

Step 1: Read the Existing File

Always read the file first to understand its structure:

read_project_file(project_id=X, action='read', file_id=Y)
  • PPTX: Returns slide-by-slide text with titles, body, layout info
  • DOCX: Returns section headings, paragraph text, table content
  • XLSX: Returns sheet names, cell values, structure

Step 2: Plan Modifications

After reading, outline the changes clearly:

修改计划:
- 第 3 页:标题从 "XXX" 改为 "YYY"
- 第 5 页:更新 body text
- Excel Sheet1:更新 B2:B10 的数据

Step 3: Apply Edits

Use edit_project_office_document to apply changes directly to the file.

PPTX Edit Actions

update_slide — Update slide title and/or content

{
  "file_id": 123,
  "edits": [
    {
      "action": "update_slide",
      "slide_index": 2,
      "title": "New Slide Title",
      "content": "- Point 1\n- Point 2\n- Point 3"
    }
  ]
}

update_text — Replace specific text on a slide

{
  "file_id": 123,
  "edits": [
    {
      "action": "update_text",
      "slide_index": 2,
      "old_text": "2023年数据",
      "new_text": "2024年数据"
    }
  ]
}

add_slide — Add a new slide

{
  "file_id": 123,
  "edits": [
    {
      "action": "add_slide",
      "layout_index": 1,
      "title": "New Section Title",
      "content": "- Content line 1\n- Content line 2"
    }
  ]
}

delete_slide — Delete a slide by index

{
  "file_id": 123,
  "edits": [
    {"action": "delete_slide", "slide_index": 4}
  ]
}

DOCX Edit Actions

update_text — Replace text throughout the document

{
  "file_id": 456,
  "edits": [
    {
      "action": "update_text",
      "old_text": "旧公司名称",
      "new_text": "新公司名称"
    }
  ]
}

replace_paragraph — Replace all content under a heading

{
  "file_id": 456,
  "edits": [
    {
      "action": "replace_paragraph",
      "heading": "第二章 市场分析",
      "content": "Updated market analysis content...\nSecond paragraph..."
    }
  ]
}

add_paragraph — Add content after a heading

{
  "file_id": 456,
  "edits": [
    {
      "action": "add_paragraph",
      "after_heading": "结论",
      "content": "新增的风险分析段落..."
    }
  ]
}

XLSX Edit Actions

update_cell — Update a single cell

{
  "file_id": 789,
  "edits": [
    {
      "action": "update_cell",
      "sheet": "Sheet1",
      "cell": "B2",
      "value": 15000
    }
  ]
}

update_cells — Update multiple cells at once

{
  "file_id": 789,
  "edits": [
    {
      "action": "update_cells",
      "sheet": "Sheet1",
      "updates": {
        "B2": 15000,
        "B3": 23000,
        "C2": "=B2*1.1"
      }
    }
  ]
}

update_row — Replace an entire row

{
  "file_id": 789,
  "edits": [
    {
      "action": "update_row",
      "sheet": "Sheet1",
      "row": 5,
      "values": ["Q2", 15000, 23000, 38000]
    }
  ]
}

add_row — Insert or append a row

{
  "file_id": 789,
  "edits": [
    {
      "action": "add_row",
      "sheet": "Sheet1",
      "after_row": 10,
      "values": ["Total", "=SUM(B2:B10)"]
    }
  ]
}

delete_row — Delete a row

{
  "file_id": 789,
  "edits": [
    {"action": "delete_row", "sheet": "Sheet1", "row": 11}
  ]
}

add_sheet — Add a new worksheet

{
  "file_id": 789,
  "edits": [
    {"action": "add_sheet", "name": "Summary"}
  ]
}

Saving Behavior

  • Default: Overwrites the original file
  • New copy: Provide output_name to save as a new file instead of overwriting
{
  "file_id": 123,
  "output_name": "报告_修改版.pptx",
  "edits": [...]
}

Important Rules

  1. Always read before editing — Never guess the content of an existing file
  2. Use slide_index correctly — PPTX slide indices are 0-based (first slide = 0)
  3. Preserve structure — Don't break the document's logical structure
  4. Confirm destructive changes — If overwriting the original, confirm with user
  5. Name clearly — Use output_name for edited copies (e.g., "报告_修改版.pptx")

Modification Patterns

Pattern 1: Single Slide Edit

User: "把 PPT 第 3 页的标题改一下" → read_project_file → edit_project_office_document(action=update_slide, slide_index=2)

Pattern 2: Data Update

User: "把 Excel 里的 2024 年数据更新一下" → read_project_file → edit_project_office_document(action=update_cells, updates={...})

Pattern 3: Add Content

User: "在 Word 的结论后面加一段风险分析" → read_project_file → edit_project_office_document(action=add_paragraph, after_heading="结论")

Pattern 4: Replace Text

User: "把 PPT 里所有的 '旧公司' 改成 '新公司'" → read_project_file → edit_project_office_document(action=update_text, old_text="旧公司", new_text="新公司")

Pattern 5: Create Edited Copy

User: "基于这个 PPT 做一个修改版,不要改原文件" → read_project_file → edit_project_office_document(output_name="修改版.pptx", edits=[...])

Capability Upgrade

Mode Selection

  • Quick: 执行明确的单点修改,如替换文字、改标题或更新单页。
  • Standard: 执行多处结构化编辑,并保留原格式和可追踪说明。
  • Deep: 结合用户意图、文档结构、品牌格式、内容逻辑和版本管理,生成可交付修订版。

Editing Decision Logic

先判断用户要“改内容、改结构、改格式、改数据、改风格还是创建副本”。不同意图对应不同编辑策略;不明确时优先创建副本,避免破坏原文件。

Quality Gates

  • 明确是否修改原文件或创建副本。
  • 保留原有版式、编号、表格和图片位置。
  • 多处替换前确认大小写、全角半角和语境。
  • 对 PPT/Word/Excel 分别检查格式和数据一致性。
  • 输出说明修改了哪些位置,便于用户复核。

Deliverable Catalog

DeliverableWhen to useMinimum contentFormat
Edited document copy修改正式文件新文件、修改内容、保留格式和修改摘要DOCX / PPTX / XLSX
Change summary用户复核文件、位置、原内容、新内容、原因和影响Markdown
Redline-style revision note需要审阅修改点、建议、风险、待确认问题Word / Markdown
PPT update package修改演示文稿页码、标题、内容、图表、备注和版式检查PPTX
Excel update package修改表格sheet、单元格、公式、数据源和校验结果XLSX
Document QA checklist交付前格式、编号、链接、图片、表格、公式和版本Checklist

Delivery Verification Materials

  • 场景与预期交付:合成案例及缺失输入、注入指令变体。
  • 逐项验收依据:本能力特有的检查项与复核记录。

Diagnostic Intake

先用项目 ID、文件 ID、文件类型和版本定位目标,不能只凭同名文件。 明确修改位置、期望值、单位、格式和必须保留的公式/章节。 读取目标后校验工具索引约定;目标不唯一或版本变化时重新读取。 用户已明确的编辑范围直接执行;需要写入时沿用 Aria 权限与 HITAS。 工具报错、文件被占用或修改冲突时保留原文件并报告实际状态。 保存后复读目标,并返回真实文件链接与修改回执。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.