本文へ移動
cccskills
無料GitHub で公開

docx

Use this skill whenever the user asks for a Word document, a .docx file, or a report/memo/letter/proposal delivered as one — creating a new document from scratch, editing an existing .docx, or reading/summarizing the contents of one. Covers page layout, headings, tables, numbered/bulleted lists, page breaks, and a table of contents. Does not cover converting a .docx to PDF or .doc to .docx (see file-conversion for what conversions ARE supported in this environment).

インストール方法を見る

含まれるファイル(1)

  • SKILL.md5.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Word documents (.docx)

Quick Reference

TaskApproach
Create a new .docx from scratchdocx (docx-js) — write a TypeScript program (packages: ["docx"]) and run it via your coding tool
Edit an existing .docxoffice-utils: unpack → edit XML → pack (see that skill)
Read / extract text from a .docxpython-docx or docx2python (Python, already installed — no pandoc needed)

Always CREATE documents with docx (docx-js) in TypeScript — never with python-docx. python-docx is in this environment for reading existing documents only. Run the TypeScript program via whatever coding surface you have: the run_code tool directly (language="typescript", packages=["docx"]), or the coding_agent delegate — in that case restate these library/language requirements in its goal. The library is pre-installed in the standard sandbox image, so the install step is an instant no-op there.

Creating a new document (docx-js)

docx-js (npm package docx) builds a document as a tree of JS objects, then serializes it. The hard-won pitfalls below are the difference between a .docx that opens cleanly in Word/Google Docs and one that shows a repair prompt or renders with the wrong layout — verify your generated file against every one of these before considering the task done.

  1. Page size and margins are in DXA units (twentieths of a point), not inches or pixels. A US Letter page (8.5in x 11in) is { width: 12240, height: 15840 } DXA. Always set Document.sections[0].properties.page.size explicitly — don't rely on the library default, which may not match what the user expects.
  2. Table column widths must use WidthType.DXA, not WidthType.PERCENTAGE, for predictable rendering. Percentage widths compute inconsistently across renderers (Word vs. Google Docs vs. LibreOffice) when the table has merged cells or nested tables. Compute explicit DXA widths that sum to the usable page width (page width minus left+right margins).
  3. Numbered/bulleted lists need a LevelFormat numbering config registered on the document, not literal unicode bullet characters (•, -) typed into a text run. A literal bullet character is not a list to Word — it can't be renumbered, indented, or styled as one. Define a numbering.config with LevelFormat.BULLET (or LevelFormat.DECIMAL for numbered lists) and reference it from each paragraph's numbering property.
  4. A page break is a property of a Paragraph, not a standalone element. Use new Paragraph({ children: [new PageBreak()] }) — inserting a bare PageBreak() outside a paragraph will fail to serialize correctly in some docx-js versions.
  5. A table of contents (TableOfContents) only picks up paragraphs styled with a real Heading style (HeadingLevel.HEADING_1 etc.), never plain bold text. If the user wants a working, clickable/updatable ToC, every section title must use a heading style — and the ToC itself needs a "right-click → Update Field" note in your response, since docx-js writes the ToC's field code but cannot pre-compute the resulting page numbers without a real layout engine.
  6. Always set explicit size (half-points) on any TextRun where the default (usually 11pt/22 half-points) doesn't match the user's request — half-points, not points: 12pt text is size: 24.

Editing an existing .docx

Use the office-utils skill's unpack → edit → pack cycle: the document body lives in word/document.xml inside the unpacked tree. Locate the <w:p> (paragraph) or <w:tbl> (table) you need to change, make the smallest edit that achieves the goal, and repack. Do not attempt to regenerate the whole document via docx-js just to change one paragraph — you will lose any formatting/styles the original author applied that aren't represented in your regenerated version.

Reading a .docx

  • python-docx: Document(path).paragraphs / .tables for structured access (paragraph text + style, table cell grids).
  • docx2python: better for a fast, structure-preserving plain-text dump when you just need the content, not to manipulate specific elements.

Both are already installed in the sandbox — no install_packages call needed.

Not supported in this environment

  • .doc → .docx conversion, and .docx → PDF rendering — both require LibreOffice, which is not installed in the sandbox yet. Tell the user this rather than attempting a workaround that will silently produce a wrong result.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use this skill whenever the user asks you to load, clean, aggregate, join, or otherwise analyze tabular data (csv, xlsx, json, or a database export) — 'what's the total revenue by region', 'clean up this dataset', 'join these two files on customer id'. Establishes a verification discipline so reported numbers are always numbers the code actually printed, never numbers you inferred or estimated.

日本語の概要は準備中です。原文の説明を表示しています。

pipeshub-ai/pipeshub-ai3,8292026年10月13日 更新

Use this skill whenever the user asks for a chart, graph, plot, or visualization of data — 'chart this by month', 'show me a breakdown by category', 'visualize the trend'. Covers picking the right chart type for the question being asked, labeling/readability rules, and which plotting library to reach for. Pair with data-analysis for the underlying data prep.

日本語の概要は準備中です。原文の説明を表示しています。

pipeshub-ai/pipeshub-ai3,8292026年10月13日 更新

Use this skill when the user asks to convert a file from one format to another (e.g. csv to xlsx, xlsx to json, pdf text to csv) and you're not sure which library handles that specific pair, or whether it's supported in this environment at all. Dispatches to the right library per format pair and explicitly lists conversions that are NOT supported here so you don't attempt one that will silently fail or produce a wrong result.

日本語の概要は準備中です。原文の説明を表示しています。

pipeshub-ai/pipeshub-ai3,8292026年10月13日 更新

Low-level support skill for hand-editing the raw XML inside a .docx or .pptx file (both formats are just ZIP archives of XML parts). Use this directly only when you need to unpack, inspect, or repack Open XML yourself — for example fixing a validation error in generated markup, or making one small targeted edit without regenerating a whole document from scratch. The docx and pptx skills already use this internally for their 'edit an existing file' workflow, so you rarely need to load this on its own.

日本語の概要は準備中です。原文の説明を表示しています。

pipeshub-ai/pipeshub-ai3,8292026年10月13日 更新

pdf

無料

Use this skill whenever the user asks for a PDF — generating a new one from scratch (reports, invoices, letters), extracting text/tables from an existing PDF, or filling in an existing PDF form. Does not cover converting an existing Word/PowerPoint/Excel file to PDF (that requires LibreOffice, not available in this environment — see file-conversion).

日本語の概要は準備中です。原文の説明を表示しています。

pipeshub-ai/pipeshub-ai3,8292026年10月13日 更新

pptx

無料

Use this skill whenever the user asks for a PowerPoint presentation, a .pptx file, or slides for a talk/pitch/report — creating a new deck from scratch, editing an existing .pptx, or reading/summarizing an existing deck's content. Covers slide layout, color/typography choices, and a content-quality checklist for professional-looking output. Does not cover rendering slides to images for visual QA (see the 'Not supported' section).

日本語の概要は準備中です。原文の説明を表示しています。

pipeshub-ai/pipeshub-ai3,8292026年10月13日 更新

pipeshub-ai のスキルをすべて見る

このスキルの問題を報告する