agentleFS
HybridAIOneHybridAIOne/hybridclaw/skills/docx/SKILL.md

docx

Skill157 starsChanged 7 months agoMITView on GitHub

Create, inspect, and edit `.docx` files safely, including comments and OOXML-preserving changes.

195 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use context7-efficient, file-reading and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • hfzarslanSkill

    context7-efficient

    Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.

    Also in 5 projects that use this

  • SeifBenayedSkill

    file-reading

    Use this skill when a file has been uploaded but its content is NOT in your context — only its path at /mnt/user-data/uploads/ is listed in an uploaded_files block. This skill is a router: it tells you which tool to use for each file type (pdf, docx, xlsx, csv, json, images, archives, ebooks) so you read the right amount the right way instead of blindly running cat on a binary. Triggers: any mention of /mnt/user-data/uploads/, an uploaded_files section, a file_path tag, or a user asking about an uploaded file you have not yet read. Do NOT use this skill if the file content is already visible in your context inside a documents block — you already have it.

    Also in 6 projects that use this

  • SeifBenayedSkill

    pdf-reading

    Use this skill when you need to read, inspect, or extract content from PDF files — especially when file content is NOT in your context and you need to read it from disk. Covers content inventory, text extraction, page rasterization for visual inspection, embedded image/attachment/table/form-field extraction, and choosing the right reading strategy for different document types (text-heavy, scanned, slide-decks, forms, data-heavy). Do NOT use this skill for PDF creation, form filling, merging, splitting, watermarking, or encryption — use the pdf skill instead.

    Also in 6 projects that use this

  • jjyaoaoSkill

    gift-evaluator

    The PRIMARY tool for Spring Festival gift analysis and social interaction generation. Use this skill when users upload photos of gifts (alcohol, tea, supplements, etc.) to inquire about their value, authenticity, or how to respond socially. Integrates visual perception, market valuation, and HTML card generation.

    Also in 4 projects that use this

  • jjyaoaoSkill

    Podcast Generate

    Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast. Duration scales with content size (3-20 minutes, ~240 chars/min). Uses z-ai-web-dev-sdk for LLM script generation and TTS audio synthesis. Outputs both a podcast script (Markdown) and a complete audio file (WAV).

    Also in 4 projects that use this

  • unicorn-pluginsSkill

    product-self-knowledge

    Anthropic 제품 지식 — Claude Code, Claude API, Claude.ai 관련 정확한 정보 제공

    Also in 7 projects that use this

  • +2 more from jjyaoao

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 189 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill whenever the user asks to create, revise, comment on, or inspect a .docx document.

    line 26
  2. Distinctive:

    Use DXA table widths and explicit cell widths instead of percentages when layout must survive Word and Google Docs.

    line 54
  3. Distinctive:

    Keep relationship ids, comment ids, and content-type overrides consistent when adding parts.

    line 55
  4. Very specific:

    Never write plain text or placeholder text directly to a .docx file path.

    line 56
  5. Very specific:

    Use node skills/docx/scripts/comment.cjs --help to insert a comment around an exact text match inside an unpacked DOCX tree.

    line 60
  6. Very specific:

    Use node skills/docx/scripts/accept_changes.cjs /tmp/docx-edit --json to accept straightforward tracked changes after unpacking.

    line 61
  7. Very specific:

    Prefer user-provided .docx templates from the current workspace for letterhead, memos, and branded report formats.

    line 73

“Common” is measured: kept by at least 6 in 10 of the 189 edited versions of this file we could read. “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

DOCX

Use this skill whenever the user asks to create, revise, comment on, or inspect a .docx document.

Default Workflow

  • For new documents with straightforward structure, write Markdown first and convert it with pandoc.
  • For programmatic creation, write a CommonJS .cjs script and use require("docx"). The container exposes global Node packages through NODE_PATH; avoid bare ESM import "docx" examples.
  • For editing an existing .docx, never round-trip the original file through docx or pandoc. Unpack the OOXML, edit the XML you need, and repack it.

Existing-File Editing Workflow

node skills/office/unpack.cjs input.docx tmp/docx-edit
node skills/office/validate.cjs tmp/docx-edit
node skills/office/pack.cjs tmp/docx-edit output.docx

Edit only the relevant parts under tmp/docx-edit/word/:

  • document.xml for the main body
  • styles.xml for styles
  • numbering.xml for list definitions
  • header*.xml / footer*.xml for page furniture
  • _rels/*.rels when you add new parts

Rules

  • Preserve existing formatting by editing OOXML directly for in-place revisions.
  • Escape XML-sensitive characters (&, <, >) and preserve xml:space="preserve" when surrounding spaces matter.
  • Use DXA table widths and explicit cell widths instead of percentages when layout must survive Word and Google Docs.
  • Keep relationship ids, comment ids, and content-type overrides consistent when adding parts.
  • Never write plain text or placeholder text directly to a .docx file path. If generation fails, stop and report the error.

Comments And Reviews

  • Use node skills/docx/scripts/comment.cjs --help to insert a comment around an exact text match inside an unpacked DOCX tree.
  • Use node skills/docx/scripts/accept_changes.cjs /tmp/docx-edit --json to accept straightforward tracked changes after unpacking.
  • The helper currently targets word/document.xml. For complex tracked changes, nested fields, or multi-run matches, edit the OOXML manually after unpacking.

Useful Commands

pandoc draft.docx -t gfm -o draft.md
pandoc outline.md -o report.docx

Templates

  • Prefer user-provided .docx templates from the current workspace for letterhead, memos, and branded report formats.
  • Preserve headers, footers, styles, numbering, and section geometry unless the user explicitly asks for a layout change.

Minimal Creation Pattern

const fs = require("node:fs");
const { Document, Packer, Paragraph, TextRun } = require("docx");

const document = new Document({
  sections: [
    {
      children: [
        new Paragraph({
          children: [new TextRun({ text: "Quarterly Update", bold: true })],
        }),
        new Paragraph("Prepared for leadership review."),
      ],
    },
  ],
});

Packer.toBuffer(document).then((buffer) => {
  fs.writeFileSync("quarterly-update.docx", buffer);
});

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.