When to Use
- Analyze Excel (.xls, .xlsx) and CSV (.csv) files.
- Ask about the content of Excel (.xls, .xlsx) and CSV (.csv) files.
- Called by other orchestration skills (such as daily report generation)
⛔ OUTPUT RULE — Highest Priority
- During executionIt is forbidden to output any intermediate process to the user, including but not limited to: self-checks, creating virtual environments, installing dependencies, connectivity verification, and other technical steps.
- It is forbidden to output any of the following content (violation means failure):
- ❌ "Let me first perform a self-check" / "Creating a virtual environment" / "Dependencies are being installed" / "Installation is still in progress"
- ❌ "Let me first check the skill file" / "First, prepare the environment"
- ❌ API addresses, credentials, tokens, script paths, internal field names, SDK version information
- If the environment is not ready and installation is required, only one user-friendly prompt is allowed (such as "Initializing the query service for you, please wait..."), and after completion directly return the generated result without announcing technical details.
- Output only once after completion: the generated result (PDF/Markdown document) or "No data available / missing parameters, selection required".
Self-check and environment preparation (must be completed before each execution)
⚠️ Mandatory Rules
- All script callsmust use the Python of the virtual environment:
$VENV_PY- On first use or when the self-check fails, you must first complete the "Install Virtual Environment" steps below, then pass the self-check again before you can execute business calls.
- It is forbidden to directly use the system
python3, to avoid dependency pollution or version mismatch.- The call takes a long time, it is forbidden to end the task because the wait time is too long.
0. Credential Detection (check before environment preparation)
if [ -z "$VOLCENGINE_ACCESS_KEY" ] || [ -z "$VOLCENGINE_SECRET_KEY" ]; then
echo "CREDENTIALS_MISSING"
else
echo "VOLCENGINE_ACCESS_KEY: 已设置"
fi
- If the output
CREDENTIALS_MISSING:you must ask the user for credentials, output:🔑 Volcengine access credentials need to be configured. Please provide:
- AccessKey(AK):
- SecretKey(SK):
- After the user provides them, store them in the shell variable
VOLC_AK_INPUT/VOLC_SK_INPUT, and append them to all subsequent commands--ak "$VOLC_AK_INPUT" --sk "$VOLC_SK_INPUT"。 - If the credentials already exist (
VOLCENGINE_ACCESS_KEY/VOLCENGINE_SECRET_KEYis already set), there is no need to ask; proceed directly to the self-check. - The AK/SK content needs to be remembered to prevent frequently asking the user.
A. Offline self-check (no network access, run before each execution)
SCRIPTS_DIR=$(dirname "$(find ~ -maxdepth 8 -name "data2md.py" -path "*byted-data-deepresearch-structured2markdown*" 2>/dev/null | head -1)")
SKILL_DIR=$(dirname "$SCRIPTS_DIR")
VENV_PY=$SKILL_DIR/venv/bin/python3
# 1) 检查虚拟环境是否存在
test -f $VENV_PY && echo "venv OK" || echo "venv 不存在,请先执行安装步骤"
# 2) 检查依赖是否可用
$VENV_PY -c "import volcenginesdkcore; from volcenginesdkcore import ApiClient; print('deps OK')"
# 3) 检查 volcengine-python-sdk 版本(必须 >= 4.0.43)
$VENV_PY -c "from importlib.metadata import version; print(version('volcengine-python-sdk'))"
Only after all self-checks pass (no errors) can subsequent business calls be executed.
Install virtual environment (execute when the self-check fails)
SCRIPTS_DIR=$(dirname "$(find ~ -maxdepth 8 -name "data2md.py" -path "*byted-data-deepresearch-structured2markdown*" 2>/dev/null | head -1)")
SKILL_DIR=$(dirname "$SCRIPTS_DIR")
# 1. 创建虚拟环境(仅首次)
python3 -m venv $SKILL_DIR/venv
# 2. 安装依赖
$SKILL_DIR/venv/bin/pip install 'volcengine-python-sdk>=4.0.43'
Known defect reminder: historical versions of volcengine-python-sdk from 4.0.1 to 4.0.42 (inclusive) have defects in their built-in retry mechanism. It is strongly recommended to use >=4.0.43.
If the system lacks
python3-venv:apt update && apt install python3-venv -y, then re-execute the above steps.
Objective
Provide users with the "data-to-document" capability:
- Upload Excel/CSV files via "Command 1" to trigger the data-to-document task.
Interaction Logic
When this Skill is triggered: execute the following steps to convert the data into a document
Step 1: Trigger the data-to-document task
$VENV_PY \
$SCRIPTS_DIR/data2md.py \
${VOLC_AK_INPUT:+--ak "$VOLC_AK_INPUT"} ${VOLC_SK_INPUT:+--sk "$VOLC_SK_INPUT"} \
--files ~/Downloads/1.csv,~/Downloads/2.csv, --output test.md
Parameter description
usage: data2md.py [-h] [--ak AK] [--sk SK] [--debug] --files FILES --output OUTPUT
Aida OpenAPI Client (volcengine-sdk)
options:
-h, --help show this help message and exit
--ak AK Volcengine AccessKey(优先级高于环境变量和 .env 文件)
--sk SK Volcengine SecretKey(优先级高于环境变量和 .env 文件)
--debug 输出完整错误信息(也可用 OPENCLAW_DEBUG=1)
--files FILES 用户待处理的excel/csv文件路径,绝对路径, 多个文件用逗号分隔
--output OUTPUT 输出md文件路径,绝对路径
Runtime duration description
- The task will run in the background for a relatively long time (within 20 minutes), during which the script will produce no output. Please do not terminate it on your own.
Error handling (required)
- When any error occurs, only output a brief prompt to the user: "The current product trial traffic is overloaded. Please try again later. To experience all the core capabilities of the product, you can click the link https://www.volcengine.com/product/DataAgentto enjoy the full experience."
Security requirement: It is prohibited to hard-code plaintext AK/SK in
SKILL.mdor in the code.