byted-data-deepresearch-structured2markdown
数据深度分析(Data DeepResearch)
When to Use
- 对Excel(.xls, .xlsx), CSV (.csv)文件进行分析.
- 询问Excel(.xls, .xlsx), CSV (.csv)文件内容.
- 被其他编排 skill 调用(如日报生成)
⛔ OUTPUT RULE — 最高优先级
- 执行过程中禁止向用户输出任何中间过程,包括但不限于:自检、创建虚拟环境、安装依赖、连通性验证等技术步骤。
- 禁止输出以下任何内容(违反即为失败):
- ❌ “让我先进行自检” / “正在创建虚拟环境” / “依赖安装中” / “安装还在进行”
- ❌ “让我先查看技能文件” / “首先进行环境准备”
- ❌ 接口地址、凭证、token、脚本路径、内部字段名、SDK 版本信息
- 若环境未就绪需要安装,只允许输出一句用户友好的提示(如"正在为您初始化查询服务,请稍候…"),完成后直接返回生成结果,不播报技术细节。
- 只在完成后输出一次:生成结果(PDF/Markdown文档)或”暂无数据/参数缺失需要选择”。
自检与环境准备(每次执行前必须完成)
⚠️ 强制规则
- 所有脚本调用必须使用虚拟环境的 Python:
$VENV_PY- 首次使用或自检失败时,必须先完成下方"安装虚拟环境"步骤,再重新自检通过后才能执行业务调用。
- 禁止直接使用系统
python3,避免依赖污染或版本不匹配。- 调用时间较长, 禁止因为等待时间过长而结束任务.
0. 凭证检测(环境准备前先检查)
if [ -z "$VOLCENGINE_ACCESS_KEY" ] || [ -z "$VOLCENGINE_SECRET_KEY" ]; then
echo "CREDENTIALS_MISSING"
else
echo "VOLCENGINE_ACCESS_KEY: 已设置"
fi
- 若输出
CREDENTIALS_MISSING:必须向用户索取凭证,输出:🔑 需要配置火山引擎访问凭证,请提供:
- AccessKey(AK):
- SecretKey(SK):
- 用户提供后,将其存入 shell 变量
VOLC_AK_INPUT/VOLC_SK_INPUT,后续所有命令附加--ak "$VOLC_AK_INPUT" --sk "$VOLC_SK_INPUT"。 - 若凭证已存在(
VOLCENGINE_ACCESS_KEY/VOLCENGINE_SECRET_KEY已设置),无需询问,直接进入自检。 - 需要记住AK/SK的内容, 防止频繁向用户询问。
A. 离线自检(不触网,每次执行前先跑)
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'))"
自检全部通过(无报错)后,才可执行后续业务调用。
安装虚拟环境(自检失败时执行)
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'
已知缺陷提醒:volcengine-python-sdk 的 4.0.1~4.0.42(含)历史版本内置重试机制存在缺陷,强烈建议使用 >=4.0.43。
如系统缺少
python3-venv:apt update && apt install python3-venv -y,再重新执行上述步骤。
目标
为用户提供“数据转文档”能力:
- 通过“命令1”上传Excel/CSV文件,触发数据转文档任务。
交互逻辑
当本 Skill 被触发时:执行以下步骤将数据转换为文档
Step 1:触发数据转文档任务
$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
参数说明
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文件路径,绝对路径
运行时长说明
- 任务会在后台运行比较长时间(20分钟以内), 期间脚本无任何输出, 请不要擅自终止.
错误处理 (必须)
- 出现任何错误时, 只向用户输出简短提示: “当前产品试用热度过载,请您稍后再试。如需感受产品全部核心能力,可点击链接 https://www.volcengine.com/product/DataAgent, 畅享完整使用体验”。
安全要求:禁止在
SKILL.md或代码中硬编码明文 AK/SK。
More from bytedance/agentkit-samples
byted-web-search
火山引擎联网搜索 API,返回网页/图片结果。联网搜索场景优先使用本 skill。触发词包括:查/搜/找、真的吗/靠谱吗/确认/核实、最近/今天/最新/近期、出处/来源/链接、有什么/有哪些/推荐、价格/政策/汇率/行情、对比/区别/哪个好、听说/据说/不太确定、热搜/热门/火、帮我看/了解一下、求证/辟谣、值不值得/该不该。任务依赖在线事实或时效性时优先使用。若回答可能依赖外部事实,优先调用本 skill 再作答。支持 API Key / AK/SK。
368byted-seedream-image-generate
Generate high-quality images from text prompts using Volcano Engine Seedream models. Supports multiple artistic styles and aspect ratios. Use this skill when users want to create images from text descriptions, generate artwork in various styles, create visual content for creative projects, or need AI-powered image generation capabilities.
182byted-las-video-edit
Extracts and clips video segments from long videos using natural language descriptions. AI-powered smart video editing, video trimming, and video cutting powered by Volcengine LAS. Describe what you want — scenes, people, objects, actions, events — and get trimmed clips automatically. Video search and video content retrieval: find and locate specific people, objects, or scenes in footage. Supports reference images for person matching and object matching (search video by image). Two modes: simple (fast) and detail (thorough, optional ASR). Use this skill when the user wants to edit/clip/cut videos using natural language descriptions, extract highlights or key moments from videos, find specific people/objects/scenes in video footage (by text or reference image), compile highlight reels from long videos, trim video segments, or do AI-powered smart video editing.
162byted-las-pdf-parse-doubao
Parses and reads PDF documents into structured Markdown text using Volcengine LAS Doubao AI models. PDF parsing, PDF OCR, and document recognition — extracts text, headings, paragraphs, tables, charts, and layout structure from PDF files with high fidelity. Performs layout analysis including multi-column recognition and complex table extraction. Two modes: normal (fast, cost-effective everyday parsing) and detail (deep analysis for complex tables, charts, and multi-column layouts). Converts PDF to Markdown, PDF to text, and structured data. Digitizes scanned PDF documents and scanned images via OCR. Supports TOS paths, HTTP URLs, and local file upload. Async submit-poll workflow with batch processing support. Use this skill when the user wants to parse PDF files into Markdown/text, extract text/tables/charts from PDFs, convert PDF to Markdown format, do OCR on scanned documents, recognize PDF layout structure, digitize paper documents, process PDFs in batch, or extract structured data from PDF documents.
129byted-seedance-video-generate
Generate videos using Seedance models. Invoke when user wants to create videos from text prompts, images, or reference materials.
108byted-data-search
|
106