← Back to Skills Marketplace
flywhale-666

Doc

by flywhale · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
720
Downloads
0
Stars
12
Active Installs
1
Versions
Install in OpenClaw
/install doc
Description
Use when the task involves reading, creating, or editing `.docx` documents, especially when formatting or layout fidelity matters; prefer `python-docx` plus...
README (SKILL.md)

DOCX Skill

When to use

  • Read or review DOCX content where layout matters (tables, diagrams, pagination).
  • Create or edit DOCX files with professional formatting.
  • Validate visual layout before delivery.

Workflow

  1. Prefer visual review (layout, tables, diagrams).
    • If soffice and pdftoppm are available, convert DOCX -> PDF -> PNGs.
    • Or use scripts/render_docx.py (requires pdf2image and Poppler).
    • If these tools are missing, install them or ask the user to review rendered pages locally.
  2. Use python-docx for edits and structured creation (headings, styles, tables, lists).
  3. After each meaningful change, re-render and inspect the pages.
  4. If visual review is not possible, extract text with python-docx as a fallback and call out layout risk.
  5. Keep intermediate outputs organized and clean up after final approval.

Temp and output conventions

  • Use tmp/docs/ for intermediate files; delete when done.
  • Write final artifacts under output/doc/ when working in this repo.
  • Keep filenames stable and descriptive.

Dependencies (install if missing)

Prefer uv for dependency management.

Python packages:

uv pip install python-docx pdf2image

If uv is unavailable:

python3 -m pip install python-docx pdf2image

System tools (for rendering):

# macOS (Homebrew)
brew install libreoffice poppler

# Ubuntu/Debian
sudo apt-get install -y libreoffice poppler-utils

If installation isn't possible in this environment, tell the user which dependency is missing and how to install it locally.

Environment

No required environment variables.

Rendering commands

DOCX -> PDF:

soffice -env:UserInstallation=file:///tmp/lo_profile_$$ --headless --convert-to pdf --outdir $OUTDIR $INPUT_DOCX

PDF -> PNGs:

pdftoppm -png $OUTDIR/$BASENAME.pdf $OUTDIR/$BASENAME

Bundled helper:

python3 scripts/render_docx.py /path/to/file.docx --output_dir /tmp/docx_pages

Quality expectations

  • Deliver a client-ready document: consistent typography, spacing, margins, and clear hierarchy.
  • Avoid formatting defects: clipped/overlapping text, broken tables, unreadable characters, or default-template styling.
  • Charts, tables, and visuals must be legible in rendered pages with correct alignment.
  • Use ASCII hyphens only. Avoid U+2011 (non-breaking hyphen) and other Unicode dashes.
  • Citations and references must be human-readable; never leave tool tokens or placeholder strings.

Final checks

  • Re-render and inspect every page at 100% zoom before final delivery.
  • Fix any spacing, alignment, or pagination issues and repeat the render loop.
  • Confirm there are no leftovers (temp files, duplicate renders) unless the user asks to keep them.
Usage Guidance
This skill is coherent and generally safe for working with DOCX files, but take ordinary cautions: run it in an isolated environment for untrusted documents (DOCM files can contain macros) and avoid opening unknown attachments with macros enabled. Install LibreOffice and Poppler from official repositories (brew/apt or vendor websites). The helper script invokes local commands (soffice, pdftoppm) and will write output files (it can overwrite existing output files), so review output paths and run on copies of originals if you need to preserve source files. If you cannot install the system tools in this environment, the skill will fall back to extracting text only — the SKILL.md explains how to proceed. Finally, the SKILL.md mentions a tool called "uv" for dependency management; if unfamiliar, ignore that line and use pip directly as shown.
Capability Analysis
Type: OpenClaw Skill Name: doc Version: 1.0.0 The skill is classified as suspicious primarily due to the explicit instruction in `SKILL.md` to use `sudo apt-get install -y libreoffice poppler-utils` for dependency installation. While the intent is to install legitimate tools, directly instructing an AI agent to execute commands with `sudo` introduces a significant privilege escalation vulnerability if the agent's execution environment is not adequately sandboxed or if the agent is compromised. This allows the skill to perform privileged operations without explicit user confirmation, which is a high-risk capability. The `scripts/render_docx.py` Python code, however, appears to handle subprocess calls safely by using lists of arguments, mitigating direct shell injection within the script itself.
Capability Assessment
Purpose & Capability
Name and description (DOCX editing and visual fidelity) match the included SKILL.md and the bundled scripts. The script's use of python-docx, LibreOffice (soffice), Poppler (pdftoppm), and pdf2image is expected for rendering and layout checks.
Instruction Scope
SKILL.md stays on task: it describes installing python packages and system tools, running the bundled render_docx.py, converting DOCX→PDF→PNG, and cleaning up temp files. The instructions reference only the input DOCX, temporary and output dirs, and required render tools; they do not ask for unrelated files, environment variables, or external endpoints.
Install Mechanism
There is no automated install spec or remote download; the skill is instruction-only with a bundled helper script. Recommended system packages are installed via standard package managers (brew or apt) and Python packages via pip — no obscure or remote install URLs are used.
Credentials
The skill declares no environment variables or credentials. The runtime accesses only local tools (soffice, pdftoppm) and local filesystem paths described in the SKILL.md; this is proportional to the stated functionality.
Persistence & Privilege
always is false and the skill is user-invocable. The included script operates on user-supplied files and temporary/output directories; it does not attempt to persist configuration, modify other skills, or change system-wide agent settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install doc
  3. After installation, invoke the skill by name or use /doc
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of the doc skill for DOCX document handling. - Provides guidance for reading, creating, and editing DOCX files with emphasis on formatting and layout fidelity. - Recommends workflows and tools for visual rendering and review (using soffice, pdftoppm, or scripts/render_docx.py). - Lists conventions for intermediate and output file management. - Details required dependencies and installation steps. - Outlines quality and delivery expectations for client-ready documents. - Includes troubleshooting steps and fallback approaches for environments with missing dependencies.
Metadata
Slug doc
Version 1.0.0
License
All-time Installs 14
Active Installs 12
Total Versions 1
Frequently Asked Questions

What is Doc?

Use when the task involves reading, creating, or editing `.docx` documents, especially when formatting or layout fidelity matters; prefer `python-docx` plus... It is an AI Agent Skill for Claude Code / OpenClaw, with 720 downloads so far.

How do I install Doc?

Run "/install doc" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Doc free?

Yes, Doc is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Doc support?

Doc is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Doc?

It is built and maintained by flywhale (@flywhale-666); the current version is v1.0.0.

💬 Comments