当前位置: 首页 > Skill >

Skywork Excel

Skywork Excel

1.0.8 2026.11.25 浏览:773
获取Skill文件查看使用说明
作者:顾澄许可证:
本文目录展开

Excel Generator

Generate professional Excel files and data analysis reports using the Skywork Excel backend service.

Prerequisites

API Key Configuration (Required First)

This skill requires a SKYWORK_API_KEY to be configured before use.

If you don't have an API key yet, please visit: https://skywork.ai

For detailed setup instructions, see: references/apikey-fetch.md

🚫 CRITICAL: Pass Query As-Is, Do NOT Read User Files

  • NEVER use the read tool on user-provided files (Excel, PDF, CSV, images, etc.). Pass file paths via --files and let the backend handle reading.
  • Do NOT rewrite, expand, or reinterpret the user's query. Pass it as-is. The backend agent has its own understanding capabilities.
  • Only two modifications are allowed:
    1. Time info: For time-sensitive queries, prepend current time: [Current time: 2026-03-14] User request: ...
    2. File paths: Replace absolute paths with filenames only (e.g., /Users/xxx/report.xlsx → report.xlsx)

Workflow

Excel tasks take 5-25 minutes. Run the script in background and poll the log every 60 seconds.

Step 1: Start Task

EXCEL_LOG=/tmp/excel_$(date +%s).log

python3 scripts/excel_api_client.py "user's query" 
  --files "/path/to/file1.xlsx" "/path/to/file2.pdf" 
  --language zh-CN 
  --log-path "$EXCEL_LOG" 
  > /dev/null 2>&1 &

echo "Task started. Log: $EXCEL_LOG"
  • --files: Upload user-provided files (Excel, CSV, PDF, Image). Omit if no files.
  • --language: zh-CN (default) or en-US — match the user's language.
  • --session <id>: For follow-up tasks — see Multi-Turn Sessions.

Step 2: Monitor Progress

Execution pattern (required):

  • Run the Step 1 start command in background and note the EXCEL_LOG path from the output.
  • Then execute the Step 2 monitor command separately every 60 seconds (do not use a while loop).
  • $EXCEL_LOG does not persist between exec calls — Step 2 MUST recover the path (see monitor command below).

Rules — no exceptions:

  • Poll every 60 seconds by calling exec tool repeatedly. Do NOT use a while loop.
  • Show only the last TASK PROGRESS UPDATE block. Do not output full log (tail -50, etc.) or summarize/interpret it.
  • Never restart the task. The agent handles errors internally and auto-recovers.
  • Ignore transient errors in the log (❌, Missing parameter, heartbeat pings, etc.) — the agent retries automatically.
  • Use heartbeat as liveness signal: check heartbeat lines every poll to confirm the task is still running, but do NOT output raw heartbeat lines to the user.

Every 60 seconds, run:

# Recover log path: use the path printed by Step 1, or find the most recent log
EXCEL_LOG=$(ls -t /tmp/excel_*.log 2>/dev/null | head -1)
if [ -z "$EXCEL_LOG" ] || [ ! -f "$EXCEL_LOG" ]; then
  echo "ERROR: Log not found. Ensure Step 1 ran with --log-path."; exit 1
fi
sleep 60
echo "=== Progress Update ==="
grep -A8 "TASK PROGRESS UPDATE" "$EXCEL_LOG" | tail -10
grep -E "[HEARTBEAT]" "$EXCEL_LOG" | tail -1
grep -E "[DONE]|All done" "$EXCEL_LOG" | tail -1

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

Stop polling when log contains [DONE] or ✅ All done! → read final output:

tail -30 "$EXCEL_LOG"
  • If NOT done → report progress to user, then call exec again after 60 seconds with the same monitor command.
  • Repeat until done — keep calling exec every 60 seconds until [DONE] or All done appears.
  • Do NOT stop after a single poll.

Step 3: Deliver Result

After completion, provide the user with both:

  • OSS download URL — cloud link for sharing (show as a clickable hyperlink)
  • Local file path — absolute path on their machine

Example reply:

✅ Report generated!

📥 Download: https://picture-search.skywork.ai/skills/upload/2026-03-14/xxx.xlsx
💾 Local: /Users/xxx/.openclaw/workspace/report.xlsx

Do NOT use sandbox:// or [filename](sandbox://...) format — these are not clickable. If oss_url is unavailable, provide the local path only.

Multi-Turn Sessions

To continue a previous task, use --session with the ID printed at the end of the previous run:

# First turn — no --session needed; session ID is printed at end
python3 scripts/excel_api_client.py "Create a sales report" 
  --language zh-CN --log-path "$EXCEL_LOG" > /dev/null 2>&1 &
# Output: 💡 To continue this conversation, use: --session abc123def456

# Follow-up turn — add --session
python3 scripts/excel_api_client.py "Add a pie chart" 
  --session abc123def456 
  --language zh-CN --log-path "$EXCEL_LOG" > /dev/null 2>&1 &

When to use --session: User says "continue", "modify", "add a chart", "change colors", "based on the previous...", or references prior output.

⛔ Without --session, the agent starts fresh and loses all previous context.

Error Handling

Error Solution
Unauthorized (401) SKYWORK_API_KEY is missing, invalid, or expired — set or rotate the key in OpenClaw skill env
Connection timeout Use --timeout 1500 for complex tasks (default: 900s)
Agent produces wrong output Be more specific; use multi-turn to refine iteratively
Insufficient benefit See below

When benefit is insufficient

Script output may show: Insufficient benefit. Please upgrade your account at {url}

Reply in the user's language:

  • Convey: "Sorry, Excel/report generation failed. This skill requires upgrading your Skywork membership."
  • Format: One short sentence + [Upgrade now →](url) (or equivalent in user's language)
  • URL: Extract from the at https://... part of the log output

Security Notes

  • Never commit SKYWORK_API_KEY to version control
  • Set the key in OpenClaw skill env or as an environment variable
  • Tokens expire — the client will auto-refresh when needed

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,033
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,018
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,016
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,012
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,012
Skill 文件
  • SKILL.md
    • Excel Generator
    • Prerequisites
      • API Key Configuration (Required First)
    • 🚫 CRITICAL: Pass Query As-Is, Do NOT Read User Files
    • Workflow
      • Step 1: Start Task
      • Step 2: Monitor Progress
      • What to report to user
      • Step 3: Deliver Result
    • Multi-Turn Sessions
    • Error Handling
      • When benefit is insufficient
    • Security Notes
  • 项目或源文件

相关 Skill

更多
Rvt To Excel Rvt To Excel 将RVT/RFA文件转换为Excel数据库,提取BIM构件数据、属性及数量。
Excel To Markdown Excel To Markdown 文档转 Markdown 转换器 - 将 DOCX、PPTX、Excel 文件转换为 Markdown。用于从 Word 文档、PowerPoint 演示文稿或 E... 提取内容。
csv to excel csv to excel 将CSV文件转换为支持中文字符、自动格式化、多工作表的专业Excel工作簿。
Excel数据合并 Excel数据合并 Excel多文件智能合并工具;自动对齐表头、过滤空行、适配列数;支持并行读取/分块处理/高效写入/格式保留;当用户需要合并多个Excel、汇总表格数据或整理报表时使用
Microsoft Excel Microsoft Excel 通过托管 OAuth 集成 Microsoft Excel API,实现对 OneDrive 中 Excel 工作簿、工作表、区域、表格和图表的读写。使用此技能...