skywork-excel
AIでデータ分析やグラフ作成、数式生成、ウェブ検索を行い、スプレッドシート作成、CSV/Excel/PDFファイル分析、HTMLレポート作成、リアルタイムデータ取得などをExcel上で支援するSkill。
📜 元の英語説明(参考)
Excel generator with AI-powered data analysis, charts, formulas, and web search. Create spreadsheets, analyze CSV/Excel/PDF files, generate HTML reports, and get real-time data.
🇯🇵 日本人クリエイター向け解説
AIでデータ分析やグラフ作成、数式生成、ウェブ検索を行い、スプレッドシート作成、CSV/Excel/PDFファイル分析、HTMLレポート作成、リアルタイムデータ取得などをExcel上で支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o skywork-excel.zip https://jpskill.com/download/20829.zip && unzip -o skywork-excel.zip && rm skywork-excel.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/20829.zip -OutFile "$d\skywork-excel.zip"; Expand-Archive "$d\skywork-excel.zip" -DestinationPath $d -Force; ri "$d\skywork-excel.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
skywork-excel.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
skywork-excelフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 3
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[スキル名] skywork-excel
Excelジェネレーター
⚠️ 複数ターンセッションのルール (重要)
ユーザーのリクエストが以前のExcelタスクの続きである場合、--sessionパラメーターを必ず使用してください。
継続タスクの検出方法:
- ユーザーが「続けて」「修正して」「最適化して」「調整して」「前回のものに基づいて」「前回のものを改善して」と言う場合
- ユーザーが以前の出力を参照する場合:「あのレポート」「前回のExcel」「上記の分析」
- ユーザーが既存の作業の変更を要求する場合:「グラフを追加して」「紫色に変更して」「列を追加して」
session_idの使用方法:
- 前のタスクの出力を探します:
💡 この会話を続けるには、--session xxx を使用してください - コマンドに
--session xxxを追加します:python3 scripts/excel_api_client.py "user's follow-up request" \ --session abc123def456 \ --language zh-CN \ --log-path "$EXCEL_LOG" \ > /dev/null 2>&1 &
⛔ --sessionを渡さない場合、エージェントは最初から開始し、以前のコンテキストをすべて失います!
🚫 重要: ユーザーファイルを読み込まないでください
ユーザーが提供したファイル (Excel、PDF、CSV、画像など) に対してreadツールを絶対に使用しないでください。
バックエンドエージェントがファイルを読み込み、処理します。あなたは以下のことだけを行う必要があります:
- CLIスクリプトの
--filesパラメーターを使用してファイルをアップロードします - ユーザーのクエリを変更せずに直接渡します
ファイルを読み込むと時間が無駄になり、タイムアウトの原因となります。アップロードするだけで、バックエンドにすべてを処理させましょう。
⚠️ 重要: 進捗監視を伴うバックグラウンド実行
Excelタスクには5〜25分かかります。UIの応答性を保ち、タイムアウトを避けるために、スクリプトをバックグラウンドで実行し、5秒ごとにログをポーリングする必要があります。
ステップ1: スクリプトをバックグラウンドで開始する
EXCEL_LOG=/tmp/excel_$(date +%s).log
python3 scripts/excel_api_client.py "user query" \
--files "/path/to/file1.xlsx" "/path/to/file2.pdf" \
--language zh-CN \
--log-path "$EXCEL_LOG" \
> /dev/null 2>&1 &
echo "Log: $EXCEL_LOG"
ステップ2: 進捗を監視する (必須)
厳格なルール — 例外なし:
- execツールを繰り返し呼び出して、60秒ごとにポーリングしてください。 Excelタスクには10〜25分かかります。
- 最後のタスクの進捗更新のみを表示してください。 完全なログを出力したり、要約したりしないでください。
- タスクを再起動しないでください。 Excelエージェントは内部でエラーを処理し、自動的に回復します。
- ログ内のすべてのエラーを無視してください (例:
❌、Missing parameter、jupyter_executeエラー)。これらは正常であり、エージェントが自動的に再試行します。
60秒ごとに、この正確なシーケンスを実行してください (毎回execツールを呼び出し、whileループは使用しないでください):
# ステップ1: 60秒待機
sleep 60
# ステップ2: 進捗を確認
echo "=== Progress Update ==="
grep -A8 "TASK PROGRESS UPDATE" "$EXCEL_LOG" | tail -10
# ステップ3: 完了したか確認
grep -E "\[DONE\]|All done" "$EXCEL_LOG" | tail -1
- ログに
[DONE]または✅ All done!が含まれる場合 → ポーリングを停止し、tail -30 "$EXCEL_LOG"で最終出力を読み取り、結果を配信します。 - 完了していない場合 → ユーザーに進捗を報告し、60秒後に同じコマンドで再度execツールを呼び出します。
- 完了するまで繰り返します —
[DONE]またはAll doneが表示されるまで、60秒ごとにexecツールを呼び出し続ける必要があります。
ルール
- execツールを繰り返し呼び出してください — whileループは使用しないでください (出力がブロックされます)。60秒ごとに自分でexecを呼び出してください。
- エラーが表示されてもタスクを再起動しないでください。エージェントは内部でエラーを処理します。
- ログを要約したり解釈したりしないでください — 生のTASK PROGRESS UPDATEブロックのみを表示してください。
ユーザーに報告する内容
重要: 現在のステータスのみを出力してください。以前のステータスメッセージを繰り返したり、蓄積したりしないでください。各更新は単一の新しい行である必要があります。
ログを読み取るたびに、現在のステータスを示す1行のみを出力してください:
[メインステージ] | [現在の操作] | 経過時間: Xs
例 (この1行のみを出力し、他は何も出力しません):
Data Processing | Generating charts | Elapsed: 120s
TASK PROGRESS UPDATEをメインステージにマッピングします:
| 進捗に含まれる内容 | メインステージ |
|---|---|
| "读取" / "read" / "load" | Loading data |
| "分析" / "analysis" | Data analysis |
| "图表" / "chart" / "visualization" | Generating charts |
| "Excel" / "xlsx" | Creating Excel file |
| "HTML" / "报告" / "report" | Generating report |
| "保存" / "save" / "output" | Saving output |
ステータス更新の例:
Loading data | Reading Excel files | Elapsed: 30s
Data analysis | Processing stock data | Elapsed: 90s
Generating report | Creating HTML analysis | Elapsed: 180s
行わないこと:
tail -50や完全なログ内容を出力する- エラーやハートビートメッセージに言及する
- いかなる理由であれタスクを再起動する
- 以前のステータスメッセージを繰り返したり、蓄積したりする — 各更新は以前のものに追加されるのではなく、新しいものである必要があります
AIを活用したデータ分析、グラフ作成、数式検証、レポート生成機能を備えた洗練されたバックエンドサービスを使用して、高品質のExcelファイルを生成および更新するためのプロフェッショナルなスキルです。
認証 (最初に必須)
このスキルを使用する前に、認証を完了する必要があります。最初に認証スクリプトを実行してください:
# 認証: 環境トークン / キャッシュされたトークン / ブラウザログインを確認
python3 <skill-dir>/scripts/skywork_auth.py || exit 1
トークンの優先順位:
- 環境変数
SKYBOT_TOKEN→ 設定されている場合、直接使用 - キャッシュされたトークンファイル
~/.skywork_token→ API経由で検証し、有効な場合、それを使用 - 有効なトークンがない場合 → ログインのためにブラウザを開き、完了するまでポーリングし、トークンを保存
重要 - ログインURLの処理: スクリプト出力に[LOGIN_URL]で始まる行が含まれている場合、そのURLを直ちにクリック可能なメッセージでユーザーに送信する必要があります (例: 「ログインするには、このリンクを開いてください: <url>」)。ユーザーはブラウザが自動的に開けない環境にいる可能性があるため、常にログインURLを表示してください。
このスキルを使用するタイミング
ユーザーが以下のことを望む場合に、このスキルを使用してください:
- データ、数式、グラフ、プロフェッショナルな書式設定を含むExcelファイルをゼロから作成する
- 既存のデータファイル (Excel、CSV、PDF) を分析し、要約レポートや視覚化を生成する
- Excelファイルを更新または変換する (計算を追加する
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Excel Generator
⚠️ Multi-Turn Session Rule (CRITICAL)
When the user's request is a continuation of a previous Excel task, you MUST use the --session parameter.
How to detect a continuation task:
- User says: "continue", "modify", "optimize", "adjust", "based on the previous...", "improve the last one..."
- User references previous output: "that report", "the previous Excel", "the analysis above"
- User asks for changes to existing work: "add a chart", "change to purple", "add a column"
How to use session_id:
- Look for the previous task's output:
💡 To continue this conversation, use: --session xxx - Add
--session xxxto the command:python3 scripts/excel_api_client.py "user's follow-up request" \ --session abc123def456 \ --language zh-CN \ --log-path "$EXCEL_LOG" \ > /dev/null 2>&1 &
⛔ If you don't pass --session, the agent will start fresh and lose all previous context!
🚫 CRITICAL: DO NOT READ USER FILES
NEVER use the read tool on user-provided files (Excel, PDF, CSV, images, etc.).
The backend agent will read and process files itself. You only need to:
- Upload files using the CLI script
--filesparameter - Pass the user's query directly without modification
Reading files wastes time and causes timeouts. Just upload and let the backend handle everything.
⚠️ IMPORTANT: Background Execution with Progress Monitoring
Excel tasks take 5-25 minutes. You MUST run the script in background and poll the log every 5 seconds to keep the UI responsive and avoid timeouts.
Step 1: Start script in background
EXCEL_LOG=/tmp/excel_$(date +%s).log
python3 scripts/excel_api_client.py "user query" \
--files "/path/to/file1.xlsx" "/path/to/file2.pdf" \
--language zh-CN \
--log-path "$EXCEL_LOG" \
> /dev/null 2>&1 &
echo "Log: $EXCEL_LOG"
Step 2: Monitor progress (REQUIRED)
STRICT RULES — no exceptions:
- Poll every 60 seconds by calling exec tool repeatedly. Excel tasks take 10-25 minutes.
- Only show the LAST TASK PROGRESS UPDATE. Do NOT output full log or summarize it.
- NEVER restart the task. The Excel agent handles errors internally and will auto-recover.
- Ignore all errors in the log (e.g.,
❌,Missing parameter,jupyter_executeerrors). These are normal — the agent will retry automatically.
Every 60 seconds, run this exact sequence (call exec tool each time, do NOT use while loop):
# Step 1: Wait 60 seconds
sleep 60
# Step 2: Check progress
echo "=== Progress Update ==="
grep -A8 "TASK PROGRESS UPDATE" "$EXCEL_LOG" | tail -10
# Step 3: Check if done
grep -E "\[DONE\]|All done" "$EXCEL_LOG" | tail -1
- If log contains
[DONE]or✅ All done!→ stop polling, read final output withtail -30 "$EXCEL_LOG", then deliver results. - If NOT done → report progress to user, then call exec tool again with the same command after 60 seconds.
- Repeat until done — you must keep calling exec tool every 60 seconds until you see
[DONE]orAll done.
Rules
- Call exec tool repeatedly — do NOT use a while loop (it blocks output). Call exec every 60 seconds yourself.
- NEVER restart the task even if you see errors. The agent handles errors internally.
- Do NOT summarize or interpret the log — just show the raw TASK PROGRESS UPDATE block.
What to report to user
CRITICAL: Output ONLY the current status. Do NOT repeat or accumulate previous status messages. Each update should be a single, fresh line.
After each log read, output ONLY ONE LINE showing the current status:
[Main stage] | [current action] | Elapsed: Xs
Example (output only this single line, nothing else):
Data Processing | Generating charts | Elapsed: 120s
Map TASK PROGRESS UPDATE to main stages:
| Progress contains | Main stage |
|---|---|
| "读取" / "read" / "load" | Loading data |
| "分析" / "analysis" | Data analysis |
| "图表" / "chart" / "visualization" | Generating charts |
| "Excel" / "xlsx" | Creating Excel file |
| "HTML" / "报告" / "report" | Generating report |
| "保存" / "save" / "output" | Saving output |
Example status updates:
Loading data | Reading Excel files | Elapsed: 30s
Data analysis | Processing stock data | Elapsed: 90s
Generating report | Creating HTML analysis | Elapsed: 180s
Do NOT:
- Output
tail -50or full log content - Mention errors or heartbeat messages
- Restart the task for any reason
- Repeat or accumulate previous status messages — each update must be fresh, not appended to previous ones
A professional skill for generating and updating high-quality Excel files using a sophisticated backend service with AI-powered data analysis, charting, formula validation, and report generation capabilities.
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:
- Environment variable
SKYBOT_TOKEN→ if set, use directly - Cached token file
~/.skywork_token→ validate via API, if valid, use it - 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.
When to Use This Skill
Use this skill when the user wants to:
- Create Excel files from scratch with data, formulas, charts, and professional formatting
- Analyze existing data files (Excel, CSV, PDF) and generate summary reports or visualizations
- Update or transform Excel files (add calculations, charts, pivot tables, formatting)
- Generate data-driven reports - outputs can be Excel (.xlsx) or professional HTML reports for viewing/sharing
- Perform complex data analysis requiring pandas, numpy, or statistical operations
- Create dashboards or visualizations with charts, conditional formatting, and styled tables
- Extract and structure data from uploaded documents into Excel format
- Search the web for data - the agent can search for real-time information to include in generated outputs (no external search tools required from your side)
Output Format
The agent supports multiple output formats:
- Excel (.xlsx) - for data manipulation and editing
- HTML reports - for viewing and sharing
The backend agent automatically chooses the appropriate format based on the user's request. Just pass the user's natural language request directly.
The backend service is particularly powerful for tasks that benefit from specialized Excel knowledge, formula validation, and visual quality assurance.
How It Works
The skill uses a ReAct agent loop that:
- Accepts user requests via natural language (in English or Chinese)
- Processes uploaded files (Excel, CSV, PDF) if provided
- Streams real-time progress showing LLM reasoning and tool execution
- Executes specialized tools like
jupyter_executefor data manipulation,validate_excel_formulas,validate_excel_charts, etc. - Produces output files in
/workspace/output/(automatically registered for download) - Supports multi-turn conversations for iterative refinement
⚠️ IMPORTANT: Preserve User's Original Query (Strict No-Rewrite Policy)
When sending requests to the Excel Agent:
- Keep the user's original query exactly as-is - do NOT rewrite, expand, or reinterpret the query
- Pass the query as-is to the backend agent, which has its own understanding capabilities
- Only TWO modifications are allowed:
- Time info: For time-sensitive queries (e.g., "latest data", "this year", "this quarter"), prepend current time. Only add if you can reliably obtain the real time:
[Current time: 2026-03-14] User request: Get Xiaomi stock price this week... - File paths: Replace absolute paths with filenames only (e.g.,
/Users/xxx/report.xlsx→report.xlsx)
- Time info: For time-sensitive queries (e.g., "latest data", "this year", "this quarter"), prepend current time. Only add if you can reliably obtain the real time:
- All files mentioned in the query MUST be uploaded - use
upload_file()for each file before callingrun_agent(). If you cannot find the file at the specified path, ask the user to provide the correct file path before proceeding. Pass the returnedfile_idstorun_agent()so the backend can access the uploaded files - DO NOT read file contents to modify the query - just upload the files directly. The backend agent will read and process the files itself. In your query, only provide the mapping between
file_idand filename (e.g., "file_id abc123 is sales_data.xlsx") - NO other modifications allowed - do not add extra instructions, do not expand requirements, do not "optimize" user's wording
Core Workflow
Step 1: Health Check (Required)
Always start by checking if the backend service is healthy:
from excel_api_client import ExcelAgentClient
# Auto-login: will prompt browser login if no token available
client = ExcelAgentClient()
if not client.health_check():
print("Service unavailable or authentication failed")
exit(1)
print("Service is ready!")
Step 2: Upload Files (If Needed)
If the user mentions existing files or you have files to analyze, upload them first:
from excel_api_client import ExcelAgentClient
client = ExcelAgentClient() # Auto-login
# Upload file
file_id = client.upload_file("/path/to/data.xlsx")
print(f"Uploaded: {file_id}")
Step 3: Call the Excel Agent
Send the user's request to the backend via SSE streaming endpoint:
from excel_api_client import ExcelAgentClient
client = ExcelAgentClient() # Auto-login
# Run agent with streaming progress
output_files = client.run_agent(
message="Create a sales report with charts",
file_ids=["uploaded_file_id"], # Optional
language="zh-CN" # or "en-US"
)
# output_files contains: [{"file_id": "...", "name": "...", "size": ...}, ...]
The client handles all SSE streaming internally and displays progress to stdout.
Step 4: Download Generated Files
After the agent completes, download the output files for the user:
from excel_api_client import ExcelAgentClient
client = ExcelAgentClient() # Auto-login
# Download all output files
for f in output_files:
client.download_file(f["file_id"], f"./{f['name']}")
CLI output includes both paths — when using the command-line script, it automatically outputs:
📁 Local:— the absolute local file path where the file was downloaded☁️ OSS:— the cloud download URL for sharing
When summarizing results to the user, always include BOTH the local file path AND the OSS download link from the script output.
Important Implementation Notes
Progress Streaming
The SSE endpoint returns real-time progress updates. Always display these to the user so they understand what's happening:
progressevents: Show the agent's reasoning and thought processtool_startevents: Indicate when tools likejupyter_executestart runningtool_resultevents: Show whether tools succeeded and their output summaries
This transparency is crucial because Excel generation can take 30-120 seconds for complex tasks.
Multi-Turn Conversations (IMPORTANT)
The backend fully supports multi-turn sessions via session_id. This is critical for iterative refinement tasks.
How Multi-Turn Works
- Generate a unique
session_idat the start of a conversation (e.g.,uuid.uuid4()[:12]) - Pass the same
session_idto ALL subsequentrun_agent()calls in the same conversation - The agent automatically:
- Remembers previous conversation history (up to 40 messages)
- Preserves Python variables in the Jupyter namespace
- Keeps output files in the same
/workspace/<session_id>/output/directory
Multi-Turn Example (Recommended: Let Server Generate session_id)
from excel_api_client import ExcelAgentClient
client = ExcelAgentClient()
# First turn: don't pass session_id, server generates one and returns it
output_files, session_id = client.run_agent(
message="Create a sales report with Q1 data"
)
# session_id is now available, e.g., "a1b2c3d4e5f6"
# Second turn: pass the returned session_id
output_files, _ = client.run_agent(
message="Add a pie chart showing product category breakdown",
session_id=session_id # ← Use the returned session_id
)
# Third turn: continue with same session_id
output_files, _ = client.run_agent(
message="Change the chart colors to blue theme",
session_id=session_id
)
Multi-Turn Example (Alternative: Pre-generate session_id)
import uuid
# Generate session_id upfront
session_id = str(uuid.uuid4())[:12]
# All calls use the same session_id
client.run_agent(message="Create a report", session_id=session_id)
client.run_agent(message="Add charts", session_id=session_id)
CLI Multi-Turn Example
# First turn (no --session, server generates one)
python scripts/excel_api_client.py "Create a sales report"
# Output: 💡 To continue this conversation, use: --session abc123def456
# Second turn (use the printed session_id)
python scripts/excel_api_client.py "Add charts to the report" --session abc123def456
Clear Session (Start Fresh)
To clear conversation history and start fresh with the same session_id:
# Option 1: Use new_session=True (clears history but keeps session_id)
output_files, _ = client.run_agent(message="...", session_id=session_id, new_session=True)
# Option 2: Don't pass session_id to get a fresh one
output_files, new_session_id = client.run_agent(message="...")
⚠️ Common Mistakes
- Using different
session_idvalues: Agent treats each call as independent - Not capturing the returned
session_id: If you don't pass one, capture the returned value for subsequent calls
Error Handling
Common issues and how to handle them:
- Authentication failed (401): Token is invalid or expired - ask user to provide a valid token
- File upload fails: Ensure file paths are correct, check file size limits
- Agent timeout: Complex tasks may hit the 300s timeout - inform user and suggest breaking into smaller steps
- Clarification needed: When
clarification_neededevent fires, pause and get user input before continuing - Insufficient benefit: Script or log may show e.g.
Insufficient benefit. Please upgrade your account at {url}— reply per "How to reply when benefit is insufficient" 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, Excel/report 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).
Language Selection
The backend supports both Chinese and English:
"language": "zh-CN"- Chinese prompts and output (default)"language": "en-US"- English prompts and output
Choose based on the user's language or their explicit preference.
Backend Capabilities (Tools Available to Agent)
The backend agent has access to these powerful tools:
jupyter_execute: Run Python code with pandas, openpyxl, matplotlib, etc. for data manipulation and Excel generationvalidate_excel_formulas: Verify Excel formulas are syntactically correct before savingvalidate_excel_charts: Render charts as images to visually verify they look correctexcel_data_llm_analysis: Perform semantic analysis on large datasets (translation, classification, summarization)grep_by_keyword: Search uploaded files for specific contentread_document_pages: Extract text from PDF/DOCX filesexcel_visual_agent: Extract structured data from images/PDFs into Excelparallel_search_full: Search the web for data to include in reportsbrowse_urls: Fetch content from specific URLstodo_write: Maintain task lists to prevent goal drift during complex multi-step tasks
You don't need to explicitly call these tools - the agent automatically decides which tools to use based on the user's request.
Example Usage Patterns
Common scenarios (see Core Workflow for full code):
| Pattern | Description | Key Points |
|---|---|---|
| Create from Scratch | Create Excel from scratch | Pass message directly, no file_ids needed |
| Analyze Existing File | Analyze an existing file | Call upload_file() first, then pass file_ids |
| Generate HTML Report | Generate an HTML report | Ideal for sharing and presentation, format auto-selected |
| Multi-Turn Refinement | Iterative multi-turn edits | Keep the same session_id |
| Merge Multiple Files | Merge multiple files | Upload multiple files, process in one request |
Example requests:
- "Create a monthly expense tracker with Date, Category, Amount columns"
- "Analyze sales.xlsx, show top 10 customers by revenue with bar chart"
- "Generate an report summarizing the quarterly sales data"
- "Merge jan.csv, feb.csv, mar.csv into one workbook with summary sheet"
Output File Handling
All output files are saved to /workspace/<session_id>/output/ on the backend server. The agent automatically:
- Registers each output file in the file registry
- Uploads files to OSS for CDN access (xlsx, csv, html, pdf, png, jpg, zip)
- Returns file metadata in the
output_filesevent:{ "file_id": "abc123xyz", "name": "report.xlsx", "size": 15360, "mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "path": "/tmp/excel_agent_workspace/session_123/output/report.xlsx", "oss_url": "https://xxx.oss-cn-xxx.aliyuncs.com/excel-agent/session_123/report.xlsx" } - Makes files available via
/api/download/{file_id}(fallback if OSS unavailable)
⚠️ IMPORTANT: Present Download Links to User
After the agent completes, you MUST display the OSS download links to the user:
-
Show the raw OSS URL directly (do NOT use sandbox:// or other formats)
-
If the file was downloaded locally, also provide the local path
-
Example response to user:
✅ Report generated successfully! 📥 Download link: - report.xlsx: https://picture-search.skywork.ai/skills/upload/2026-03-14/xxx.xlsx 💾 Local file: /Users/xxx/.openclaw/workspace/report.xlsx -
Do NOT use
sandbox://or[filename](sandbox://...)format - these are not clickable -
If
oss_urlis not available, inform user the file was saved locally and provide the full path
Tips for Best Results
-
Be specific in requests: The more detail you provide, the better the output
- ❌ "Make a sales report"
- ✅ "Create a sales report with columns: Date, Product, Quantity, Revenue. Include a pivot table summarizing by product category and a bar chart of top 5 products."
-
Use the helper script: For convenience, use
scripts/excel_api_client.pywhich handles SSE streaming, file upload/download, and error handling -
Monitor progress: Always display progress events to the user - Excel generation can take time for complex tasks
-
Handle clarifications: If the agent sends a
clarification_neededevent, pause and get user input before continuing -
Session management: Use consistent session_ids for related tasks to maintain context
-
Verify outputs: After downloading files, inform the user of the file location and suggest they open it to verify results
Troubleshooting
"Unauthorized (401)"
- Token is missing, invalid, or expired
- Run
python scripts/skywork_auth.py --loginto re-authenticate
"Connection timeout"
- Complex tasks (especially PDF-to-Excel with AI reasoning models) can take 5-25 minutes
- Default timeout is now 900 seconds (15 minutes)
- Use
--timeout 1500for very complex tasks - Consider breaking very large tasks into smaller steps
"File not found after download"
- Check that
output_filesevent was received before attempting download - Verify file_id is correct
- Try downloading directly with curl (requires valid token in header)
"Agent produces wrong output"
- Be more specific in the request (include column names, chart types, formatting details)
- Try multi-turn: generate a basic version first, then refine in follow-up messages
Script Reference
Use the bundled scripts/excel_api_client.py for streamlined integration:
from excel_api_client import ExcelAgentClient
# Initialize with auto-login (recommended)
client = ExcelAgentClient()
# Check if service is ready
if not client.health_check():
print("Service unavailable or authentication failed.")
exit(1)
# Upload files if needed
file_ids = [client.upload_file("data.xlsx")]
# Run agent with progress streaming
output_files = client.run_agent(
message="Create a summary report with charts",
file_ids=file_ids
)
# Download results
for f in output_files:
client.download_file(f["file_id"], f"./{f['name']}")
Security Notes
⚠️ Important Security Practices:
- Never commit tokens to version control
- Never log full tokens - use masked format (e.g.,
qGXpDd6H...cv0) - Token is stored in
~/.skywork_token(user home directory, not in project) - Use environment variables for CI/CD pipelines
- Tokens expire - the client will auto-refresh when needed
See scripts/excel_api_client.py and scripts/skywork_auth.py for the full implementation.
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (22,537 bytes)
- 📎 scripts/excel_api_client.py (23,541 bytes)
- 📎 scripts/skywork_auth.py (9,874 bytes)