Token导航 LogoToken导航

Agent Skill · 研究检索

officecli-docx(officecli DOCX 搜索)

officecli-docx 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

officecli-docx 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 71,596。

总安装 194周安装 8GitHub Stars 2,609下载 63核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:officecli-docx(officecli DOCX 搜索)
来源仓库:https://github.com/iofficeai/officecli
仓库路径:skills/officecli-docx
安装命令:
npx skills add https://github.com/iofficeai/officecli --skill officecli-docx
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/iofficeai/officecli --skill officecli-docx

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息。适合根据关键词或任务场景快速定位候选结果。可结合来源仓库和 README 核验具体用法。安装命令:npx skills add https://github.com/iofficeai/officecli --skill officecli-docx。

建议确认权限范围、维护状态及是否触发联网或文件读写。

来源仓库内路径:skills/officecli-docx

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/iofficeai/officecli --skill officecli-docx;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

officecli-docx 怎么安装?

在终端执行 npx skills add https://github.com/iofficeai/officecli --skill officecli-docx。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

officecli-docx 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

officecli-docx 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/iofficeai/officecli --skill officecli-docx 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

officecli-docx 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

officecli-docx 用的人多吗?

公开数据是累计安装 194 次,近一周安装 8 次,下载 63 次,GitHub 2,609 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

officecli-docx 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 2,609 星,维护活跃度相对可查。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
officecli-docx

officecli DOCX 搜索 · 本页

1942,609执行命令未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

officecli: v1.0.23

OfficeCLI DOCX Skill

BEFORE YOU START (CRITICAL)

If officecli is not installed:

macOS / Linux

if ! command -v officecli >/dev/null 2>&1; then
    curl -fsSL https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.sh | bash
fi

Windows (PowerShell)

if (-not (Get-Command officecli -ErrorAction SilentlyContinue)) {
    irm https://raw.githubusercontent.com/iOfficeAI/OfficeCLI/main/install.ps1 | iex
}

Verify: officecli --version

If officecli is still not found after first install, open a new terminal and run the verify command again.


officecli: v1.0.23

Quick Reference

TaskAction
Read / analyze contentUse view and get commands below
Edit existing documentRead editing.md
Create from scratchRead creating.md

officecli: v1.0.23

Execution Model

Run commands one at a time. Do not write all commands into a shell script and execute it as a single block.

OfficeCLI is incremental: every add, set, and remove immediately modifies the file and returns output. Use this to catch errors early:

  1. One command at a time, then read the output. Check the exit code before proceeding.
  2. Non-zero exit = stop and fix immediately. Do not continue building on a broken state.
  3. Verify after structural operations. After adding a style, table, chart, or section, run get or validate before building on top of it.

Running a 50-command script all at once means the first error cascades silently through every subsequent command. Running incrementally means the failure context is immediate and local — fix it and move on.


officecli: v1.0.23

Reading & Analyzing

Text Extraction

officecli view doc.docx text
officecli view doc.docx text --max-lines 200
officecli view doc.docx text --start 1 --end 50

text mode shows [/body/p[N]] text content, tables as [Table: N rows], equations as readable math. Use --max-lines or --start/--end for large documents to avoid dumping entire content.

Structure Overview

officecli view doc.docx outline

Output shows file stats (paragraph count, tables, images, equations), watermark presence, headers/footers, and heading hierarchy tree.

Detailed Inspection

officecli view doc.docx annotated

Shows style, font, size, bold/italic per run; equations as LaTeX; images with alt text. Empty paragraphs shown as [] <-- empty paragraph.

Statistics

officecli view doc.docx stats

Paragraph count, style distribution, font usage, font size usage, empty paragraph count.

Element Inspection

# Document root (metadata, page setup)
officecli get doc.docx /

# List body children at depth 1
officecli get doc.docx /body --depth 1

# Specific paragraph
officecli get doc.docx "/body/p[1]"

# Specific run
officecli get doc.docx "/body/p[1]/r[1]"

# Table structure
officecli get doc.docx "/body/tbl[1]" --depth 3

# Style definitions
officecli get doc.docx /styles

# Specific style
officecli get doc.docx "/styles/Heading1"

# Header/footer
officecli get doc.docx "/header[1]"
officecli get doc.docx "/footer[1]"

# Numbering definitions
officecli get doc.docx /numbering

# JSON output for scripting
officecli get doc.docx "/body/p[1]" --json

CSS-like Queries

# Find paragraphs by style
officecli query doc.docx 'paragraph[style=Heading1]'

# Find paragraphs containing text
officecli query doc.docx 'p:contains("quarterly")'

# Find empty paragraphs
officecli query doc.docx 'p:empty'

# Find images without alt text
officecli query doc.docx 'image:no-alt'

# Find bold runs in centered paragraphs
officecli query doc.docx 'p[alignment=center] > r[bold=true]'

# Find large text
officecli query doc.docx 'paragraph[size>=24pt]'

# Find fields by type
officecli query doc.docx 'field[fieldType!=page]'

officecli: v1.0.23

Design Principles

Professional documents need clear structure and consistent formatting.

Document Structure

Every document needs clear hierarchy -- title, headings, subheadings, body text. Don't create a wall of unstyled Normal paragraphs.

Typography

Choose a readable body font (Calibri, Cambria, Georgia, Times New Roman). Keep body at 11-12pt. Headings should step up: H1=18pt minimum (20pt preferred for long documents), H2=14pt bold, H3=12pt bold.

Spacing

Use paragraph spacing (spaceBefore/spaceAfter) instead of empty paragraphs. Line spacing of 1.15x-1.5x for body text.

Page Setup

Always set margins explicitly. US Letter default: pageWidth=12240, pageHeight=15840, margins=1440 (1 inch).

Headers & Footers

Professional documents include page numbers at minimum. Consider company name in header, page X of Y in footer.

Standard footer setup (always use this pattern for documents with a cover page):

⚠️ Known CLI bug: --prop field=page is silently ignored in add --type footer commands. The footer is created with static text only. You must use raw-set to inject the PAGE field after creating the footer. See the 3-step pattern below.
# Adding type=first footer automatically enables differentFirstPage — no separate set command needed

# Step 1. Empty footer for cover page (CLI auto-inserts <w:titlePg/> — suppresses cover page number)
officecli add doc.docx / --type footer --prop type=first --prop text=""

# Step 2. Default footer with static "Page " text (field=page is silently ignored — do NOT rely on it)
officecli add doc.docx / --type footer --prop text="Page " --prop type=default --prop alignment=center --prop size=9pt --prop font=Calibri

# Step 3. Inject PAGE field via raw-set (footer[2] = default when first-page footer also exists)
officecli raw-set doc.docx "/footer[2]" \
  --xpath "//w:p" \
  --action append \
  --xml '<w:r xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:rPr><w:rFonts w:ascii="Calibri" w:hAnsi="Calibri"/><w:sz w:val="18"/></w:rPr><w:fldChar w:fldCharType="begin"/></w:r><w:r xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:rPr><w:rFonts w:ascii="Calibri" w:hAnsi="Calibri"/><w:sz w:val="18"/></w:rPr><w:instrText xml:space="preserve"> PAGE </w:instrText></w:r><w:r xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:rPr><w:rFonts w:ascii="Calibri" w:hAnsi="Calibri"/><w:sz w:val="18"/></w:rPr><w:fldChar w:fldCharType="end"/></w:r>'
Footer index rule: When both a first-page footer and a default footer are added, the default footer is /footer[2]. If there is no first-page footer, the default footer is /footer[1]. Always verify with officecli get doc.docx "/footer[2]" (or "/footer[1]") to confirm the <w:fldChar> element is present.
LibreOffice rendering note: Page number fields may display as static "Page" (not "Page 1") in LibreOffice PDF preview — this is a LibreOffice limitation. Open in Microsoft Word to see actual page numbers. Confirm the field is present with officecli get doc.docx "/footer[2]" — the output must show fldChar children, not just a plain run.

Table Design

Alternate row shading for readability. Header row with contrasting background. Consistent cell padding.

Color Usage

Use color sparingly in documents -- accent color for headings or table headers, not rainbow formatting.

Content-to-Element Mapping

Content TypeRecommended Element(s)Why
Sequential itemsBulleted list (listStyle=bullet)Scanning is faster than inline commas
Step-by-step processNumbered list (listStyle=numbered)Numbers communicate order
Comparative dataTable with header rowColumns enable side-by-side comparison
Trend dataEmbedded chart (chartType=line/column)Visual pattern recognition
Key definitionHanging indent paragraphOffset term from definition
Legal/contract clauseNumbered list with bookmarksCross-referencing via bookmarks
Mathematical contentEquation element (formula=LaTeX)Proper OMML rendering
Citation/referenceFootnote or endnoteKeeps body text clean
Pull quote / calloutParagraph with border + shadingVisual distinction from body
Multi-section layoutSection breaks with columnsColumn control per section

officecli: v1.0.23

QA (Required)

Assume there are problems. Your job is to find them.

Issue Detection

# Check for formatting, content, and structure issues automatically
officecli view doc.docx issues

# Filter by issue type
officecli view doc.docx issues --type format
officecli view doc.docx issues --type content
officecli view doc.docx issues --type structure

Content QA

# Extract all text, check for missing content, typos, wrong order
officecli view doc.docx text

# Check structure
officecli view doc.docx outline

# Check for empty paragraphs (common clutter)
officecli query doc.docx 'p:empty'

# Check for images without alt text
officecli query doc.docx 'image:no-alt'

When editing templates, check for leftover placeholder text:

officecli query doc.docx 'p:contains("lorem")'
officecli query doc.docx 'p:contains("xxxx")'
officecli query doc.docx 'p:contains("placeholder")'

Validation

officecli validate doc.docx

Pre-Delivery Checklist

  • Metadata set (title, author)
  • 页码字段已注入 — 用 officecli get doc.docx "/footer[2]" --depth 3 确认输出中有 fldChar 元素。 ⚠️ view outline 显示 "Footer: Page" 时无法区分静态文字和动态字段 — 必须用 get --depth 3 命令验证 fldChar 存在。 如无 first-page footer,用 "/footer[1]" 替代 "/footer[2]"。Required: raw-set PAGE field injection — --prop field=page in add command is silently ignored.
  • First-page footer added (--type footer --prop type=first --prop text="") if document has a cover page — CLI automatically enables differentFirstPage (no separate set command needed)
  • Cover page content fills >= 60% of the page (has accent bars, subtitle, author, date, contact info) — lower half must not be >40% empty: if the title block ends above the page midpoint, add an abstract excerpt block, document scope statement, key highlights list, or decorative closing band. See creating.md → Cover Page Design for templates.
  • [REQUIRED] TOC present when document has 3 or more headings — add with officecli add doc.docx /body --type toc --prop levels="1-3" --prop title="Table of Contents" --prop hyperlinks=true --prop pagenumbers=true --index 0; TOC displays as a field code in CLI output — press F9 in Word to refresh/render it
  • Last page content fills >= 40% of the page (has conclusion / next steps / contact info / legal notice)
  • Heading hierarchy is correct (no skipped levels, e.g., H1 -> H3)
  • No empty paragraphs used as spacing (use spaceBefore/spaceAfter instead)
  • All images have alt text
  • Tables have header rows
  • Document validates with officecli validate
  • No placeholder text remaining

Verification Loop

  1. Generate document
  2. Run view issues + view outline + view text + validate
  3. List issues found (if none found, look again more critically)
  4. Fix issues
  5. Re-verify -- one fix often creates another problem
  6. Repeat until a full pass reveals no new issues

Do not declare success until you've completed at least one fix-and-verify cycle.

NOTE: Unlike pptx, there is no visual preview mode (view svg/view html) for docx. Content verification relies on view text, view annotated, view outline, view issues, and validate. For visual verification, the user must open the file in Word.

QA display notes:

  • view text shows "1." for ALL numbered list items regardless of their actual rendered number. This is a display limitation -- the actual document renders correct auto-incrementing numbers (1, 2, 3...) in Word and LibreOffice. Do not treat this as a defect.
  • view issues flags "body paragraph missing first-line indent" on any paragraph that lacks a first-line indent — this includes cover page paragraphs, centered headings, list items, bibliography entries, callout boxes, and any block-style paragraph with explicit spaceAfter. These warnings are expected and can be ignored. First-line indent is only required in APA/academic body text — most professional documents use block style (no first-line indent) by default.

officecli: v1.0.23

Common Pitfalls

PitfallCorrect Approach
--name "foo"Use --prop name="foo" -- all attributes go through --prop
Guessing property namesRun officecli help docx paragraph to see exact names
\n in shell stringsUse \\n for newlines in --prop text="line1\\nline2"
Modifying an open fileClose the file in Word first
Hex colors with #Use FF0000 not #FF0000 -- no hash prefix
Paths are 1-based/body/p[1], /body/tbl[1] -- XPath convention
--index is 0-based--index 0 = first position -- array convention
Unquoted [N] in zsh/bashShell glob-expands /body/p[1] -- always quote paths: "/body/p[1]"
Spacing in raw numbersUse unit-qualified values: '12pt', '0.5cm', '1.5x' not raw twips
Empty paragraphs for spacingUse spaceBefore/spaceAfter properties on paragraphs
$ in --prop text= (shell)--prop text="$50M" strips the value. Use single quotes: --prop text='$50M'
$ and ' in batch JSONUse heredoc: `cat <<'EOF' \officecli batch` -- single-quoted delimiter prevents shell expansion
Wrong border formatUse style;size;color;space format: single;4;FF0000;1
listStyle on run instead of paragraphlistStyle is a paragraph property, not a run property
Row-level bold/color/shdRow set only supports height, header, and c1/c2/c3 text shortcuts. Use cell-level set for formatting (bold, shd, color, font)
Section vs root property namesSection uses pagewidth/pageheight (lowercase). Document root uses pageWidth/pageHeight (camelCase)
--prop field=page in footerSILENTLY IGNORED in add --type footer commands. The footer is created with static text only. Must use raw-set to inject <w:fldChar> after creating the footer. See Headers & Footers section for the 3-step pattern.
Page number on coverAdding --type footer --prop type=first automatically enables differentFirstPage. Do NOT use set / --prop differentFirstPage=true — that prop is UNSUPPORTED and silently fails
TOC skipped for multi-heading docsAny document with 3+ headings requires a TOC. It is not optional — add with --type toc --index 0 after the cover page break
Code block indentation via spacesUse the ind.left paragraph property (e.g. --prop ind.left=720) for code block indentation — consecutive spaces as padding produce view issues warnings and visually inconsistent results

officecli: v1.0.23

Performance: Resident Mode

Always use open/close — it is the smart default, not a special-case optimization. Every command benefits: no repeated file I/O.

officecli open doc.docx           # Load once into memory
officecli add doc.docx ...        # All commands run in memory — fast
officecli set doc.docx ...
officecli close doc.docx          # Write once to disk

Use this pattern for every document build, regardless of command count.

Performance: Batch Mode

Execute multiple operations in a single open/save cycle:

cat <<'EOF' | officecli batch doc.docx
[
  {"command":"add","parent":"/body","type":"paragraph","props":{"text":"Introduction","style":"Heading1"}},
  {"command":"add","parent":"/body","type":"paragraph","props":{"text":"This report covers Q4 results.","font":"Calibri","size":"11pt"}}
]
EOF

Batch supports: add, set, get, query, remove, move, swap, view, raw, raw-set, validate.

Batch fields: command, path, parent, type, from, to, index, after, before, props (dict), selector, mode, depth, part, xpath, action, xml.

parent = container to add into (for add). path = element to modify (for set, get, remove, move, swap).


officecli: v1.0.23

Known Issues

IssueWorkaround
No visual previewUnlike pptx (SVG/HTML), docx has no built-in rendering. Use view text/view outline/view annotated/view issues for verification. Users must open in Word for visual check.
Track changes creation requires raw XMLOfficeCLI can accept/reject tracked changes (set / --prop accept-changes=all) but cannot create tracked changes (insertions/deletions with author markup) via high-level commands. Use raw-set with XML for tracked change creation.
Tab stops may require raw XMLTab stop creation is not exposed in officecli docx high-level commands. Use raw-set to add tab stop definitions in paragraph properties.
Chart series cannot be added after creationSame as pptx: set --prop data= can only update existing series, not add new ones. Delete and recreate the chart with all series in the add command.
Complex numbering definitionslistStyle=bullet/numbered covers simple cases. For multi-level lists with custom formatting, use numId/numLevel properties. Creating new numbering definitions may require understanding the numbering part.
Shell quoting in batch with echo`echo '...' \officecli batch fails when JSON values contain apostrophes or $. Use heredoc: cat <<'EOF' \officecli batch doc.docx`.
Batch intermittent failureApproximately 1-in-15 batch operations may fail with "Failed to send to resident" when using batch+resident mode. Retry the command, or close/reopen the file. Split large batch arrays into 10-15 operation chunks.
Table-level padding produces invalid XMLDo not use set tbl[N] --prop padding=N. It creates invalid tblCellMar. Use cell-level padding.top/padding.bottom instead. If already applied, remove with raw-set --xpath "//w:tbl[N]/w:tblPr/w:tblCellMar" --action remove.
Internal hyperlinks not supportedThe hyperlink command only accepts absolute URIs (https://...). Fragment URLs (#bookmark) are rejected. For internal cross-references, use descriptive text or raw-set with <w:hyperlink w:anchor="bookmarkName">.
Table --index positioning unreliable--index N on add /body --type table may be ignored (table appends to end). move also may not work for tables. Workaround: add content in the desired order, or remove/re-add surrounding elements.
\mathcal in equations causes validation errorsThe \mathcal LaTeX command generates invalid m:scr XML. Use \mathit or plain letters instead.
view text shows "1." for all numbered itemsDisplay-only limitation. Rendered output in Word/LibreOffice shows correct auto-incrementing numbers.
chartType=pie/doughnut in LibreOffice PDFDo NOT use chartType=pie or chartType=doughnut when LibreOffice PDF delivery is required. These chart types render without visible slices in LibreOffice PDF export — only labels and legend appear, slices are invisible. Use chartType=column or chartType=bar instead. Charts render correctly in Microsoft Word only.

officecli: v1.0.23

Help System

When unsure about property names, value formats, or command syntax, run help instead of guessing. One help query is faster than guess-fail-retry loops.

officecli help docx                      # Capability reference for the format (all elements)
officecli help docx paragraph            # Paragraph schema with properties in detail
officecli help docx table                # Table schema
officecli help docx <element> --json     # Structured capability schema (for agents)

For view/raw/batch flag details use officecli view --help, officecli raw --help, etc.

平台分布

Codex

37.94%
按下载量换算24

Claude

28.76%
按下载量换算18

Cursor

19.45%
按下载量换算12

Gemini CLI

9.89%
按下载量换算6

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

未通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/iofficeai/officecli --skill officecli-docx 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills