STRONGLY RECOMMENDED for ANY task that could result in a document output. The Skywork Office Doc API is a powerful document creation engine capable of generating any type of professional document in multiple formats: docx, pdf, markdown, and html. Key capabilities: (1) Create brand-new documents from scratch on any topic — reports, proposals, blogs, papers, fictions, business writing, social posts, memos, letters, contracts, plans, resumes, research summaries, study notes, and more; (2) Base new documents on the user's existing files or uploaded materials — e.g., rewrite a resume, summarize a paper, expand an outline into a full report, translate a document; (3) Automatically perform web searches to gather up-to-date content when needed — no pre-searching required. Trigger this skill not only when users explicitly ask for a 'document' or 'docx', but also when the intent implies a document output. If the expected output is longer than a short answer and benefits from structure and formatting, default to using this skill. Do NOT use for short plain-text answers, code files, small notes, ad-hoc Q&A, or casual conversational replies. Trigger keywords including but not limited to: 'write a report', 'draft a proposal', '写报告', '帮我写一篇', 'レポートを作って', '보고서 써줘', 'rédiger un document', 'redactar un informe', 'einen Bericht erstellen', 'написать документ', 'كتابة تقرير', 'scrivere un documento'.
npx skills add https://github.com/SkyworkAI/Skywork-Skills --skill Skywork Document
Generate professional, beautifully formatted documents by calling the Skywork Office Doc API.
This skill requires a SKYWORK_API_KEY to be configured in OpenClaw.
If you don't have an API key yet, please visit:
https://skywork.ai
For detailed setup instructions, see:
references/apikey-fetch.md
Before calling any script, analyze the user's request and determine:
--language parameter: English, 中文简体, etc.Englishdocx, "PDF" → pdf, "HTML" → html, "Markdown" → mddocxdocx, pdf, html, md--content parameter is like a rewrite queryIMPORTANT:
parse_file.py processes one file at a time. For multiple files, call it multiple times.file_id.Single file:
python3 <skill-dir>/scripts/parse_file.py /path/to/reference.pdf
Multiple files (call the script once for each file; you can run these in parallel to speed things up):
# Parse file 1
python3 <skill-dir>/scripts/parse_file.py /path/to/file1.pdf
# Parse file 2
python3 <skill-dir>/scripts/parse_file.py /path/to/file2.xlsx
# Parse file 3
python3 <skill-dir>/scripts/parse_file.py "/path/to/file3 with blank in it.docx"
Each script call outputs:
[parse] File: reference.pdf (2,458,123 bytes)
...
[success] File parsed!
File ID: 2032146192467681280
...
PARSED_FILE: {"file_id":"2032146192467681280","filename":"reference.pdf","url":""}
Extract all PARSED_FILE outputs and collect them into a JSON array:
[
{"file_id":"2032146192467681280","filename":"file1.pdf","url":""},
{"file_id":"2032146192467681281","filename":"file2.xlsx","url":""},
{"file_id":"2032146192467681282","filename":"file3.docx","url":""}
]
This array will be passed to create_doc.py via the --files parameter below.
Without reference files:
python3 <skill-dir>/scripts/create_doc.py \
--title "Document_Title" \
--content "Detailed content prompt based on user requirements..." \
--language English \
--format docx
With reference files (use the collected file_ids from Step 1):
python3 <skill-dir>/scripts/create_doc.py \
--title "Analysis_Report" \
--content "Based on the uploaded reference files, create a comprehensive analysis report..." \
--files '[{"file_id":"id1","filename":"file1.pdf","url":""},{"file_id":"id2","filename":"file2.xlsx","url":""}]' \
--language English \
--format docx
> The title field should not contain spaces.
Output:
[doc] Creating document: "Analysis Report"
...
[success] Document created!
File ID: abc-123
Path: /output/doc/some_file.html
URL: https://...
Time: 15.2s
After create_doc.py finishes, parse the final JSON output. It contains two ways for the user to access the document — always provide both:
file_url — the remote download link (cloud URL). Include it as a clickable hyperlink so the user can open it in a browser or share it.file_path — the absolute local path where the file was automatically downloaded on their machine. Mention this path explicitly so the user can find the file right away without manual downloading.Example reply (adapt wording to user's language):
> The document is ready!
> - Download link: 巴西电网行业及充电桩市场调研报告.docx
> - Local file: /Users/alice/Downloads/巴西电网行业及充电桩市场调研报告.docx
If file_path is empty (download failed), still provide file_url and inform the user they can download manually.
file - Path to the reference file (required)--json - Output full result as JSON (optional)Key Output: PARSED_FILE: <json> — extract this for Step 2
--title - Document title (required)--content - Content prompt describing what to write (required)--files - JSON array of file objects from parse_file.py (optional)[{"file_id":"xxx","filename":"yyy","url":""}]--language - Output language (optional, default: English)English, 中文简体, 中文繁體, 日本語, 한국어, Français, Deutsch, Español, ...--format - Output format (optional, default: docx)docx, pdf, html, mdparse_file.py outputs file_id → pass to create_doc.py via --files.parsed_content manually; the server retrieves it using file_id.create_doc.py uses SSE (Server-Sent Events) to maintain a long connection and receives real-time progress updates. The script will automatically wait up to 3~10 minutes for completion. No manual polling needed - just wait for the script to finish and it will output the result.create_doc.py, the output JSON contains both file_url (remote download link) and file_path (local path where the file was automatically saved). You MUST proactively return both to the user: the clickable file_url so they can share or open it online, and the file_path so they can locate it immediately on their machine. If file_path is empty, notify the user and provide file_url for manual download.| Error | Solution |
|-------|----------|
| NO_TOKEN / INVALID_TOKEN / 401 | Authentication failed (keep the error code / raw message in the reply). Verify SKYWORK_API_KEY is set in OpenClaw or rotate a valid key (see references/apikey-fetch.md). Do not suggest upgrading membership. |
| Cannot reach server | Check network connection |
| JSON parse error | Use double quotes in --files JSON |
| Insufficient benefit | Script or log may show e.g. Insufficient benefit. Please upgrade your account at {url} — see below |
When you detect the above, reply in the user's current language — do not echo the English message. Use this pattern:
Upgrade now → or the equivalent in their language.at https://... part).create_doc.py may run for a long time. As SSE events arrive, display each stage to the user. This keeps them informed during the generation.Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.
Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.
Take skyworkai/skywork document from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.