agent-builder
Expert AI Agent Builder skill. Helps users dynamically create, configure, and build custom AI agents with specific capabilities, knowledge bases, and tools.
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.
$ npx -y skills add xorbitsai/xagent --skill docx-report-editorial --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/docx-report-editorialContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
name: docx-report-editorial description: | 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. when_to_use: | A polished .docx meant to be read as a document and further edited in Word. Use pdf-report-editorial when the deliverable is a fixed printable PDF, and pptx-editorial when the user wants slides. tags: - docx - word - report - document - editorial
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.
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`:
from docx import Document # ✅ correct import python_docx # ❌ ModuleNotFoundError
> **Note:** `execute_python_code` accepts only `code` and > `capture_output` arguments; there is no `packages` parameter. > All required libraries are already available in the sandbox image.
`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:
doc.save("market_expansion_report.docx")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.
from docx import Document
check = Document("market_expansion_report.docx")
# Cell text is not in check.paragraphs, so a table-only document would
# otherwise look empty and you would report a failure that did not happen.
has_text = any(p.text.strip() for p in check.paragraphs) or any(
cell.text.strip()
for tbl in check.tables
for row in tbl.rows
for cell in row.cells
)
assert has_text, "document has no text"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.
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](file:20fae785-3823-4906-b385-d0e8a7807dc8)
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.
0. **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. 1. **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. 2. **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. 3. **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. 4. **Forbidden:**
5. **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. 6. **Failure honesty — NEVER fake the deliverable.**
the actual error. Do not write a stub file like `write_file("report.docx", "placeholder")` to make the chip appear.
describe sections or tables that aren't in the saved `.docx`.
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.
ink `0A0A0B` · paper `F1EFEA` · paper_tint `E8E5DE` · ink_tint `18181A`
ink `0A1F3D` · paper `F1F3F5` · paper_tint `E4E8EC` · ink_tint `152A4A`
Start with a personal agent. Scale into an AI workforce. Xagent helps individuals complete real tasks, teams publish reusable agents, and enterprises run agent systems with their own tools, models, knowledge, and infrastructure — without brittle workflows.
Expert AI Agent Builder skill. Helps users dynamically create, configure, and build custom AI agents with specific capabilities, knowledge bases, and tools.
Evidence-first retrieval over a specified knowledge base: cited evidence, conflict detection, and an explicit sufficiency, confidence, and risk verdict on…
One self-contained HTML slide deck with magazine-grade editorial styling: "html deck", "editorial slides", "美观 PPT", "网页版幻灯片". Not for posters, ad creatives,…
An editorial-styled PDF report rendered from HTML via the browser: "PDF report", "whitepaper", "executive brief", "research report", "case study PDF".…
A native .pptx deck with magazine-grade editorial styling: "pitch deck", "投资人路演 PPT", "美观 PPT", board review, product launch. Named palettes, fixed typography,…
Create, read, or edit PowerPoint .pptx files: slide decks from scratch, content extraction, templates, speaker notes, combining or splitting decks. Not for…