agentleFS
midFangmidFang/ai-agent-skills-workflow/bug2csv/SKILL.md

bug2csv

Skill2 starsChanged 5 months agoMITView on GitHub

将腾讯文档表格中指定的单个 sheet/tab 导出为本地 CSV 文件,复用用户已登录的 Chrome 会话,避免下载整个工作簿。适用于用户给出 docs.qq.com 表格链接和目标 tab 名,要求只下载当前工作表,或需要类似“DemoApp-DemoApp(Android).csv”的文件。

The file

Files
SKILL.md

Bug2CSV

目的

把腾讯文档中的一个指定工作表 tab 导出为 .csv 文件,并使用用户 Chrome 里已有的登录状态。

这个 skill 只处理 CSV。腾讯文档的 .xlsx 导出通常会下载整个工作簿;图片 (.png) 导出可能触发会员图片生成弹窗,不作为本流程依赖。

输入

收集或推断:

  • 腾讯文档表格链接,通常是 https://docs.qq.com/sheet/...
  • 目标 tab 名,例如 DemoApp(Android)
  • 可选输出位置;默认使用浏览器的 Downloads 目录

如果用户只给链接,先检查当前选中的 tab;只有目标 tab 不明确时才询问。

工作流程

  1. 使用 Chrome 控制能力,因为导出依赖用户已有的腾讯文档登录状态。
  2. 优先接管已经打开的腾讯文档 tab;如果没打开,再在 Chrome 中打开用户给的链接,并等待用户登录。
  3. 确认当前选中的工作表 tab。若不是用户要求的 tab,点击底部名称完全匹配的 tab,注意中文全角括号如 (安卓)。
  4. 打开腾讯文档的文件/菜单按钮。当前 UI 可能是右上角包含 下载 / 打印 / 在客户端打开 的菜单,也可能是 aria-label="file" 的节点。
  5. 打开 导出为。
  6. 选择 本地CSV文件 (.csv, 当前工作表)。这是关键选项,只会导出当前活动 tab。
  7. 除非用户明确要求整个工作簿,否则不要选择 本地Excel表格 (.xlsx)。
  8. 点击 CSV 后,Chrome 不一定触发标准下载事件。必须检查 ~/Downloads 中最近的 CSV:
find "$HOME/Downloads" -maxdepth 1 -type f -iname '*.csv' -mmin -10 -print0 | xargs -0 ls -lt
  1. 选择最新且文件名/内容与文档标题和 tab 名匹配的 CSV。腾讯文档常见命名是 <文档标题>-<tab名>.csv。
  2. 报告前必须校验文件:
python3 - <<'PY'
from pathlib import Path
import csv

p = max(Path.home().joinpath("Downloads").glob("*.csv"), key=lambda x: x.stat().st_mtime)
raw = p.read_bytes()
for enc in ("utf-8-sig", "utf-8", "gb18030"):
    try:
        text = raw.decode(enc)
        break
    except UnicodeDecodeError:
        pass
rows = list(csv.reader(text.splitlines()))
print(p)
print("encoding", enc)
print("rows", len(rows), "max_cols", max((len(r) for r in rows), default=0))
for row in rows[:5]:
    print("\t".join(row[:10]))
PY

注意事项

  • 页面可能只提示 请前往浏览器下载记录查看,仍然要用文件系统确认下载结果。
  • 重复导出会产生 (1) 这类后缀,优先选择最新且内容匹配的成功导出文件。
  • CSV 不包含单元格内嵌图片/截图。如果后续需要图片证据,应单独通过浏览器截图或页面资源提取,不要指望 CSV 自带图片。
  • 只使用页面可见操作和浏览器已有登录状态,不额外接触账号资料。
  • 除非用户要求关闭,否则保留腾讯文档 tab。

完成回复

回复时说明:

  • 导出的 CSV 本地路径,使用可点击文件链接
  • 简短校验结果,例如行数、最大列数、编码
  • 重要限制,尤其是“CSV 不包含内嵌图片”

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.