jpskill.com
📄 ドキュメント コミュニティ

skywork-document

ビジネス文書を、ユーザーのファイルや最新のウェブ検索結果をもとに、様々な形式(docx、pdfなど)で作成できるSkillで、短い回答やコード作成、雑談には向かず、構造化された長文の作成に役立ちます。

📜 元の英語説明(参考)

Generate professional documents in multiple formats (docx, pdf, html, md) from scratch or based on user files. Supports web search for up-to-date content. Use when the expected output is longer than a short answer and benefits from structure and formatting. Do NOT use for short plain-text answers, code files, or casual Q&A.

🇯🇵 日本人クリエイター向け解説

一言でいうと

ビジネス文書を、ユーザーのファイルや最新のウェブ検索結果をもとに、様々な形式(docx、pdfなど)で作成できるSkillで、短い回答やコード作成、雑談には向かず、構造化された長文の作成に役立ちます。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o skywork-document.zip https://jpskill.com/download/20828.zip && unzip -o skywork-document.zip && rm skywork-document.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/20828.zip -OutFile "$d\skywork-document.zip"; Expand-Archive "$d\skywork-document.zip" -DestinationPath $d -Force; ri "$d\skywork-document.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して skywork-document.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → skywork-document フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
4

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

ドキュメント — プロフェッショナルなドキュメントジェネレーター

Skywork Office Doc API を呼び出すことで、プロフェッショナルで美しくフォーマットされたドキュメントを生成します。


認証 (最初に必須)

このスキルを使用する前に、認証を完了する必要があります。まず、認証スクリプトを実行してください。

# Authenticate: checks env token / cached token / browser login
python3 <skill-dir>/scripts/skywork_auth.py || exit 1

トークンの優先順位:

  1. 環境変数 SKYBOT_TOKEN → 設定されている場合、直接使用します。
  2. キャッシュされたトークンファイル ~/.skywork_token → API 経由で検証し、有効な場合は使用します。
  3. 有効なトークンがない場合 → ログインのためにブラウザを開き、完了するまでポーリングし、トークンを保存します。

重要 - ログイン URL の処理: スクリプトの出力に [LOGIN_URL] で始まる行が含まれている場合、その URL をユーザーにクリック可能なメッセージ (例: 「ログインするには、このリンクを開いてください: <url>」) で直ちに送信する必要があります。ユーザーはブラウザが自動的に開かない環境にいる可能性があるため、常にログイン URL を表示してください。


ワークフロー

ステップ 0: 意図の認識 (重要 - これを最初に行う)

スクリプトを呼び出す前に、ユーザーのリクエストを分析し、以下を判断してください:

  1. ユーザーは参照ファイルを提供していますか、それとも執筆タスクを進めるために特定のファイルが必要であることを示唆していますか?

    • ファイルパス、添付ファイル、または「この PDF に基づいて」、「アップロードされたドキュメントを使用する」といった言及を探してください。執筆タスクに役立つ情報を事前に収集した場合 (例: Web 検索、他のツール)、それをファイルとしてディスクに保存し、ステップ 1 で参照ファイルとして渡してください。
    • YES の場合: ファイルパスを見つける/抽出する → ステップ 1 に進みます。
    • NO の場合: ステップ 2 にスキップします。
  2. 出力はどの言語であるべきですか?

    • ユーザーのリクエスト言語または明示的な要件を分析してください。指定されていない場合は、ユーザーの言語またはアップロードされたファイルで使用されている言語から推測してください。
    • --language パラメータを設定します: English中文简体 など。
    • デフォルト: English
  3. ユーザーはどのフォーマットを望んでいますか?

    • キーワードを探してください: 「Word ドキュメント」→ docx、「PDF」→ pdf、「HTML」→ html、「Markdown」→ md
    • 指定されていない場合のデフォルト: docx
    • サポートされているフォーマット: docxpdfhtmlmd
  4. コンテンツプロンプトをどのように記述しますか?

    • --content パラメータは書き換えクエリのようなものです。
    • ユーザーの要件 (複数の会話ターンからの可能性あり) を統合してください。
    • 構造、セクション、トーン、主要なポイントを具体的に記述してください。冗長すぎたり、ユーザーの元の要件から大きく逸脱したりしないようにし、正確性を確保するために意図に忠実に記述してください。

ステップ 1: 参照ファイルを解析する (ユーザーがファイルを提供する場合)

重要:

  • parse_file.py一度に 1 つのファイルを処理します。複数のファイルの場合は、複数回呼び出してください。
  • スペースを含むファイルパスは引用符で囲み、引数が正しく渡されるようにしてください。
  • ユーザーが執筆タスクに必要とするすべての参照資料をファイルとして解析してください。セッションの早い段階でファイルがすでに解析されている場合は、再解析をスキップし、その file_id を再利用してください。

単一ファイル:

python3 <skill-dir>/scripts/parse_file.py /path/to/reference.pdf

複数ファイル (各ファイルに対してスクリプトを一度呼び出します。これらを並行して実行することで高速化できます):

# 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"

各スクリプト呼び出しの出力:

[parse] File: reference.pdf (2,458,123 bytes)
...
[success] File parsed!
  File ID:    2032146192467681280
  ...
PARSED_FILE: {"file_id":"2032146192467681280","filename":"reference.pdf","url":""}

すべての PARSED_FILE 出力を抽出し、JSON 配列に収集してください:

[
  {"file_id":"2032146192467681280","filename":"file1.pdf","url":""},
  {"file_id":"2032146192467681281","filename":"file2.xlsx","url":""},
  {"file_id":"2032146192467681282","filename":"file3.docx","url":""}
]

この配列は、以下の --files パラメータを介して create_doc.py に渡されます。

ステップ 2: ドキュメントを作成する

参照ファイルなし:

python3 <skill-dir>/scripts/create_doc.py \
  --title "Document_Title" \
  --content "Detailed content prompt based on user requirements..." \
  --language English \
  --format docx

参照ファイルあり (ステップ 1 で収集した file_id を使用):

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

title フィールドにはスペースを含めないでください。

出力:

[doc] Creating document: "Analysis Report"
...
[success] Document created!
  File ID:   abc-123
  Path:      /output/doc/some_file.html
  URL:       https://...
  Time:      15.2s

ステップ 3: 結果を配信する

create_doc.py が完了したら、最終的な JSON 出力を解析してください。これには、ユーザーがドキュメントにアクセスするための 2 つの方法が含まれています — 常に両方を提供してください:

  • file_url — リモートダウンロードリンク (クラウド URL) です。ユーザーがブラウザで開いたり共有したりできるように、クリック可能なハイパーリンクとして含めてください。
  • file_path — ファイルがユーザーのマシンに自動的にダウンロードされた絶対ローカルパスです。ユーザーが手動でダウンロードすることなくすぐにファイルを見つけられるように、このパスを明示的に言及してください。

返信例 (ユーザーの言語に合わせて文言を調整してください):

ドキュメントの準備ができました!

file_path が空の場合 (ダウンロードに失敗した場合) でも、file_url を提供し、手動でダウンロードできることをユーザーに伝えてください。


スクリプトパラメータ

parse_file.py

  • file - 参照ファイルへのパス (必須)
  • --json - 完全な結果を JSON として出力 (オプション)

主要な出力: PARSED_FILE: <json> — ステップ 2 のためにこれを抽出してください。

create_doc.py

  • --title - ドキュメントのタイトル
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Doc — Professional Document Generator

Generate professional, beautifully formatted documents by calling the Skywork Office Doc API.


Authentication (Required First)

Before using this skill, authentication must be completed. Run the auth script first:

# Authenticate: checks env token / cached token / browser login
python3 <skill-dir>/scripts/skywork_auth.py || exit 1

Token priority:

  1. Environment variable SKYBOT_TOKEN → if set, use directly
  2. Cached token file ~/.skywork_token → validate via API, if valid, use it
  3. No valid token → opens browser for login, polls until complete, saves token

IMPORTANT - Login URL handling: If script output contains a line starting with [LOGIN_URL], you MUST immediately send that URL to the user in a clickable message (e.g. "Please open this link to log in: <url>"). The user may be in an environment where the browser cannot open automatically, so always surface the login URL.


Workflow

Step 0: Intent Recognition (CRITICAL - Do This First)

Before calling any script, analyze the user's request and determine:

  1. Does the user provide reference files, or imply that certain files are needed to proceed with the writing task?

    • Look for file paths, attachments, or mentions like "based on this PDF", "use the uploaded document". If you gathered info beforehand (e.g., web search, other tools) that would help the writing task, save it to disk as files and pass them as reference files in Step 1.
    • If YES: find/extract file paths → proceed to Step 1
    • If NO: skip to Step 2
  2. What language should the output be in?

    • Analyze the user's request language or explicit requirement. If unspecified, infer from the user's language or the language used in uploaded files.
    • Set --language parameter: English, 中文简体, etc.
    • Default: English
  3. What format does the user want?

    • Look for keywords: "Word document" → docx, "PDF" → pdf, "HTML" → html, "Markdown" → md
    • Default if not specified: docx
    • Supported formats: docx, pdf, html, md
  4. How to write the content prompt?

    • The --content parameter is like a rewrite query
    • Synthesize user's requirements (possibly from multiple conversation turns)
    • Be specific: describe structure, sections, tone, key points. Avoid being overly verbose or straying far from the user's original requirements; stay close to their intent to ensure accuracy.

Step 1: Parse Reference Files (If User Provides Files)

IMPORTANT:

  • parse_file.py processes one file at a time. For multiple files, call it multiple times.
  • Quote any file path that contains spaces so arguments are passed correctly.
  • Parse all reference material the user needs for the writing task as files. If a file was already parsed earlier in the session, skip re-parsing and reuse its 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.

Step 2: Create Document

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

Step 3: Deliver Result

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!

If file_path is empty (download failed), still provide file_url and inform the user they can download manually.


Script Parameters

parse_file.py

  • file - Path to the reference file (required)
  • --json - Output full result as JSON (optional)

Key Output: PARSED_FILE: <json> — extract this for Step 2

create_doc.py

  • --title - Document title (required)
  • --content - Content prompt describing what to write (required)
    • This is like a rewrite query — synthesize user's requirements
    • Be specific about structure, sections, tone, key points
  • --files - JSON array of file objects from parse_file.py (optional)
    • Format: [{"file_id":"xxx","filename":"yyy","url":""}]
  • --language - Output language (optional, default: English)
    • Examples: English, 中文简体, 中文繁體, 日本語, 한국어, Français, Deutsch, Español, ...
  • --format - Output format (optional, default: docx)
    • Supported: docx, pdf, html, md

Important Notes

  1. Intent Recognition First - Always analyze the user's request before calling scripts.
  2. Web Search Built-In - The Doc API automatically performs web searches on demand to gather relevant content for document creation. Whether you pre-search for materials externally or not is entirely optional—either approach works fine.
  3. File ID is the Bridge - parse_file.py outputs file_id → pass to create_doc.py via --files.
  4. Server Fetches Content - No need to paste parsed_content manually; the server retrieves it using file_id.
  5. Content is Rewrite Query - Synthesize the user's requirements into a clear, detailed prompt. Even when the user's instructions are long or complex, capture every requirement—don't omit anything.
  6. Generation Takes Time - Document generation typically takes 5-10 minutes, sometimes longer for complex documents.
  7. Scripts Wait Automatically - 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.
  8. Progress Display - The script shows a real-time progress bar during generation. The AI agent should relay this to the user to set expectations.
  9. Final Document Delivery - CRITICAL: Upon successful execution of 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 Handling

Error Solution
NO_TOKEN / INVALID_TOKEN Run auth workflow
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

How to reply when benefit is insufficient

When you detect the above, reply in the user's current language — do not echo the English message. Use this pattern:

  • Convey: "Sorry, document generation failed. This skill requires upgrading your Skywork membership to use." then a single call-to-action link.
  • Format: One short sentence in the user's language + a link like [Upgrade now →](url) or the equivalent in their language.
  • URL: Extract the upgrade URL from the log/script output (e.g. the at https://... part).

Technical Notes

  • Generation takes 5-10 minutes, set sufficient timeout. Because 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.

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。