xorbitsai/xagent/docx-report-editorial
Claude Code and agent skill by xorbitsai/xagent
- community
Checking that the SKILL.md file is still in the repository.
A native .docx styled as an editorial report: "Word report", "Word 文档", "memo", "proposal", "研究报告". Opens cleanly in Word / Google Docs / Pages with real heading styles and a cover page.
Install
npx vskill@latest install xorbitsai/xagent/docx-report-editorialSKILL.md
Editorial Report (.docx)
You will generate one .docx file via python-docx by writing a Python program and running it through the execute_python_code tool. The blocks below are parts of that one program, not separate runs -- later ones use the doc, palette and helpers the earlier ones define, so assemble them into a single script before executing. Save to the workspace, then report the path + a 1-line content summary.
📦 Required runtime packages
The sandboxed execute_python_code ships with pandas, numpy, matplotlib, openpyxl, and `python-docx>=1.1.0` preinstalled — no extra installation step is needed. The import name is `docx`, not python_docx:
Note:execute_python_codeaccepts onlycodeandcapture_outputarguments; there is nopackagesparameter.All required libraries are already available in the sandbox image.
💾 Saving and reporting the file
execute_python_code runs with the task's output directory as the working directory, so save with a plain filename — no /workspace, no nested output/, no BytesIO round-trip:
Then verify content, not size: an empty Document() is already ~36 KB, so a byte threshold proves nothing. Re-open and check what you wrote.
Assert the shape the request asked for, never a fixed minimum — a multi-section report can also check its tables and headings, but a one-page memo has neither, and padding one to clear a threshold breaks rule 5.
🔗 Make it clickable — REQUIRED
The executor response carries a markdown_link for each file it wrote (in file_refs[]). Use that string verbatim as the first line of your answer, as bare markdown:
market_expansion_report.docx
Never fabricate the UUID, never wrap the link in backticks (it stops rendering as a chip), and never restate it as a file_id: field. get_file_info() does not return one — the reference is already on the executor result.
⚠️ Hard rules — NO exceptions
- MATCH THE USER'S LANGUAGE. If the prompt is Chinese (中文), ALL
document text (cover kicker, headings, body, table headers, captions, footer) must be in Chinese. Translate template phrases like EXECUTIVE SUMMARY → 摘要, FINDINGS → 调查结果, RECOMMENDATIONS → 建议, As of YYYY-MM-DD → 截至 YYYY-MM-DD. Never leave English kickers in a Chinese report.
- One palette only. Pick one of the 5 palettes below; use only its
4 hex values (ink, paper, paper_tint, ink_tint). Define a palette = {...} dict ONCE at the top of the script and reference palette["ink"] etc. everywhere — do not copy literal hex values into individual styling calls.
- Two fonts only. Headings =
Georgia(serif, present on all OSes).
Body = Calibri (sans, Word default). No custom fonts — recipients won't have them and Word falls back to Times. For Chinese documents: both render Chinese via system fallback (PingFang on macOS, Microsoft YaHei on Windows) — do not switch fonts.
- Use real Word styles, not manual formatting. Headings must use the
built-in Heading 1 / Heading 2 / Heading 3 styles so Word's navigation pane and auto table-of-contents work. A document where every heading is just bold 18pt body text is broken — it has no outline.
- Forbidden:
- WordArt, drop shadows, glow, 3-D effects, gradient fills
- clipart, emoji as decoration, stock-photo placeholders
- centered body paragraphs (left-align / justify only)
- all-caps body text (kickers and labels only)
- Comic Sans, Arial Black, Times New Roman as a deliberate choice
- Real content only. No lorem ipsum, no
[Title here]placeholders,
no fabricated statistics, no fake citations. If a section has no user data, drop the section rather than padding it.
- Failure honesty — NEVER fake the deliverable.
- If
execute_python_coderaises after multiple retries, STOP and report
the actual error. Do not write a stub file like write_file("report.docx", "placeholder") to make the chip appear.
- The final answer must reflect what was actually written. Do not
describe sections or tables that aren't in the saved .docx.
🎨 Palettes — pick ONE
Same palettes as pdf-report-editorial and pptx-editorial — keep the editorial family visually consistent. Each: ink (body text + rules), paper (text on an ink band), paper_tint (table band + callout bg), ink_tint (kickers, captions, footer). The keys are underscored — the dict below is what every snippet indexes into.
- Monocle (default / business / tech / policy)
ink 0A0A0B · paper F1EFEA · paper_tint E8E5DE · ink_tint 18181A
- Indigo Porcelain (research / data-heavy)
ink 0A1F3D · paper F1F3F5 · paper_tint E4E8EC · ink_tint 152A4A
- Forest Ink (sustainability / impact)
ink 1A2E1F · paper F5F1E8 · paper_tint ECE7DA · ink_tint 253D2C
- Kraft Paper (humanities / qualitative)
ink 2A1E13 · paper EEDFC7 · paper_tint E0D0B6 · ink_tint 3A2A1D
- Dune (art / design / fashion criticism)
ink 1F1A14 · paper F0E6D2 · paper_tint E3D7BF · ink_tint 2D2620
Define it once at the top of the script, then index it everywhere:
python-docx takes hex without the # prefix, via RGBColor.from_string(palette["ink"]).
✒️ Typography (python-docx Pt sizes)
| Role | Style | Family | Size | Weight | |
|---|---|---|---|---|---|
| Cover title | Title | Georgia | 40pt | regular | |
| Cover subtitle / dek | body run | Calibri | 14pt | italic | |
| Kicker (small caps label) | body run | Calibri | 9pt, uppercase | bold, ink_tint | |
| H1 section | Heading 1 | Georgia | 22pt | regular | |
| H2 subsection | Heading 2 | Georgia | 16pt | regular | |
| H3 sub-subsection | Heading 3 | Calibri | 12pt | bold | |
| Body paragraph | Normal | Calibri | 11pt | regular, line 1.4 | |
| Pull quote | Intense Quote | Georgia | 14pt | italic | |
| Table header | table run | Calibri | 10pt | bold, paper on ink | |
| Table body | table run | Calibri | 10pt | regular | |
| Caption / footnote | Caption | Calibri | 9pt | italic, ink_tint |
📐 Page setup
Set margins, size and orientation on each section before adding content.
⚠️ Orientation gotcha: setting sec.orientation = WD_ORIENT.LANDSCAPE does NOT swap the page dimensions — Word reads the width/height, not the flag. You must swap them yourself:
Set the default body font once on the Normal style so every paragraph inherits it:
Do not pin w:eastAsia to a named CJK face. Rule 2 is that Chinese renders through each platform's own fallback — writing Microsoft YaHei into the style hard-codes a font that is absent on macOS and Linux, which is the substitution the rule exists to prevent. Leaving the attribute unset is what lets Word pick PingFang, YaHei or Noto per platform.
🏛️ Cover page pattern
The cover is its own section, so the body starts on a fresh page and can later be given its own header, footer or page numbering without touching the cover. Structure: kicker → title → dek → meta row.
🔠 Heading hierarchy
Always use the built-in styles, then restyle the style object once — not each heading individually:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/xagent/skills/builtin/docx-report-editorial/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/xorbitsai/xagent/docx-report-editorial)