docx-add-screenshots

docx-add-screenshots is a skill for Claude Code, Codex from Fa-ce/historiographer-skills. It costs 113 tokens per session (1,004 once invoked), scanned A, original, MIT.

A tool that inserts browser screenshots into specified sections of a Word document and adds numbered captions. It uses openCLI to bind to the active Chrome tab, capture the page, and place the image in the document.

In plain words
What is it for?
Use it to document software interfaces or workflows by adding screenshots beneath matching headings in a DOCX file, with centered images and captions such as “图 1”.
Why use it?
It avoids manually taking, resizing, positioning, and captioning screenshots in a document. The binding and URL checks help ensure the screenshot comes from the intended page.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to document software interfaces or workflows by adding screenshots beneath matching headings in a DOCX file, with centered images and captions such as “图 1”.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fa-ce/historiographer-skills/docx-add-screenshots
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Fa-ce/historiographer-skills --skill docx-add-screenshots
Clone the repo
git clone --depth 1 https://github.com/Fa-ce/historiographer-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docx-add-screenshots

README.md
[![agentmods](https://agentmods.dev/badge/skills/fa-ce/historiographer-skills/docx-add-screenshots/github.svg)](https://agentmods.dev/skills/fa-ce/historiographer-skills/docx-add-screenshots)
Your own site
<a href="https://agentmods.dev/skills/fa-ce/historiographer-skills/docx-add-screenshots"><img src="https://agentmods.dev/badge/skills/fa-ce/historiographer-skills/docx-add-screenshots/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for docx-add-screenshots

Your own site · 80×15
<a href="https://agentmods.dev/skills/fa-ce/historiographer-skills/docx-add-screenshots"><img src="https://agentmods.dev/badge/skills/fa-ce/historiographer-skills/docx-add-screenshots.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,004 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00113 $0.01004
Opus 5 $0.00056 $0.00502
Sonnet 5 $0.00023 $0.00201
Haiku 4.5 $0.00011 $0.00100

Measured 11d ago against content hash 0450453b130a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

docx-add-screenshots scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/docx_screenshot_inserter.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/docx-add-screenshots/SKILL.md · 89 lines

What it actually says

docx-add-screenshots

快速开始

python3 scripts/docx_screenshot_inserter.py --docx <文档路径> --opencli <opencli路径> [--session <session名>] [--width <宽>] [--height <高>]

工作流程

  1. 备份:自动创建 .backup.docx
  2. 解包:解析 docx 内部 XML 结构
  3. 遍历目标:找到所有匹配的标题段落
  4. 逐个处理(半自动):
    • 显示当前标题 → 等待用户在浏览器中导航到目标界面
    • 用户按回车 → 自动 bind 绑定当前活跃 Chrome 标签页
    • 验证绑定的页面地址是否正确
    • 截图 → 插入文档(居中图片 + 下方"图 N"标注)
  5. 打包:重新生成 docx

截图流程(openCLI)

每次截图前自动执行:

  1. bind — 绑定当前活跃 Chrome 标签页,获取 URL 并显示给用户确认
  2. screenshot — 截取当前页面
  3. 验证截图文件存在

防错机制bind 后显示绑定的 URL,用户可在交互界面确认是否正确。如果绑定到错误窗口,用户可以输入 r 重新 bind。

图片格式规范

每张截图在文档中以两个段落呈现:

        [居中的嵌入式图片]          ← 图片段落,inline 嵌入,6.5" 宽度自适应
          图 N                      ← 图片标注,加粗居中
  • 图片:inline 嵌入(非浮动),宽度 6.5 英寸(标准页面可用宽度),高度按原始比例自动计算
  • 标注:格式为 图 N(N 从 1 递增),宋体加粗,居中对齐
  • 单位:使用 EMU(English Metric Units),1 英寸 = 914400 EMU

跨平台配置

脚本自动检测环境。用户需提供 openCLI 路径参数:

环境 opencli 参数示例 说明
WSL opencli.cmd 通过 powershell.exe 间接调用
Windows 原生 opencliopencli.cmd 直接调用
自定义命令 --opencli-cmd "full command" 完全自定义命令模板

WSL 环境额外参数

--powershell /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe

脚本参数

--docx PATH          目标 docx 文件路径(必需)
--opencli PATH       opencli 可执行文件路径(必需)
--session NAME       openCLI session 名(默认: work)
--powershell PATH    powershell.exe 路径(WSL 环境需要)
--width NUM          截图宽度(默认: 1920)
--height NUM         截图高度(默认: 1080)
--output-dir PATH    截图保存目录(默认: 文档同级 screenshots/)
--heading-style VAL  目标标题的 style ID(默认自动检测所有 heading)
--heading-text TEXT  按文本匹配标题(支持子串匹配,多个用逗号分隔)

交互命令

运行过程中可用的交互命令:

命令 说明
回车 确认当前绑定正确,执行截图
r 重新 bind 当前活跃标签页(修正绑定窗口)
s 跳过当前小节
q 退出并保存已完成的部分
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 89 lines · 113 tokens per session scan A 0450453b130a

Subscribe to this mod's changes

docx-add-screenshots is a skill published in the GitHub repository Fa-ce/historiographer-skills (2 stars, last pushed 3mo ago), licensed MIT. It adds 113 tokens to every session and 1,004 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

baoyu-url-to-markdown

Fetch any URL and convert to markdown using baoyu-fetch CLI (Chrome CDP with site-specific adapters). Built-in adapters for X/Twitter, YouTube transcripts, Hacker News threads, and generic pages via Defuddle. Handles login/CAPTCHA via interaction wait modes. Use when user wants to save a webpage as markdown.

JimLiu/baoyu-skills · 72 tokens

fetching-and-converting-urls

Use when fetching a live URL and converting it to Markdown. Covers --url, custom user agents, preprocessing for noisy pages, and the --json ConversionResult shape.

xberg-io/html-to-markdown · 41 tokens

url2ebook

A web-page converter that fetches the main content from a URL and creates an ebook for offline reading. The output is generated as an ebook file.

CoderWanFeng/python-office · 40 tokens

km-content-extraction

Content extraction routing for KM - local documents (HWP/HWPX/PDF/DOCX/XLSX), web, and vault sources. Use when input is a local file or when km-workflow reaches Phase 2 with a non-URL input.

treylom/knowledge-manager · 57 tokens

thumbnail-of-pptx

Capture a thumbnail image of a slide from a OneDrive/Office presentation link. Opens the PowerPoint web viewer in a headless browser and screenshots the slide canvas, producing a clean 16:9 image with no viewer chrome. Works even when the PPTX is not downloadable (e.g. personal OneDrive shares), since it screenshots…

pamelafox/presentation-skills · 111 tokens

puppeteer-skill

Generates Puppeteer scripts for browser automation, scraping, and PDF generation. Triggers on: "Puppeteer", "headless Chrome", "page.goto", "scrape", "PDF generation".

LambdaTest/agent-skills · 47 tokens