skills/skills.netease.im/youdata-record-cid

youdata-record-cid

SKILL.md

Youdata Record Cid

Overview

Use this skill when the workflow is:

  1. 配置有数访问凭证
  2. 从固定看板导出客户明细
  3. 把导出的 Excel 交给 record-cid 批量录入

This skill depends on:

  • ~/.codex/skills/youdata-env-config
  • ~/.codex/skills/youdata-report-data-analysis
  • ~/.codex/skills/record-cid

When To Use

Use this skill when the user asks for a flow like:

  • 先从有数导出技术支持客户明细,再录cid
  • 先查某个技术支持今年建群的数据,再批量录cid
  • 根据有数报表导出客户明细并更新七鱼cid

Workflow

1. Configure Youdata access first

Always start with youdata-env-config.

Do not ask the user to paste the access token or tokenKey into chat.

Instead, tell the user to configure the local file:

If the user does not know where to get the access token key, point them to:

For this workflow, the real report lives under the smartwe domain. The configured domainUrl must be:

https://smartwe.youdata.netease.com

After the user says the configuration is done, run:

node ~/.codex/skills/youdata-env-config/scripts/index.js

This returns a JSON string with runtime env info including a short-lived token. Reuse that env JSON in the same conversation instead of regenerating it repeatedly.

2. Ask whose data to export

After env setup succeeds, ask the user only one question:

  • 你要查看谁的数据?

Use the exact name the user gives as the 技术支持 filter value.

Also support a dynamic time range:

  • If the user specifies dates, use those exact dates.
  • Otherwise default to 当年1月1日 through 今天.

3. Query the fixed report

Use youdata-report-data-analysis with this fixed target:

  • 看板链接: https://smartwe.youdata.netease.com/dash/folder/450201343?rid=117210&did=245375
  • reportId: 117210
  • componentId: c-qKKt3Yb71yKZpfzu1MzEMd

Use this exact natural-language query template, replacing {姓名} and the date range dynamically:

使用youdata-report-data-analysis查询报告id=117210,图表为c-qKKt3Yb71yKZpfzu1MzEMd的数据,过滤条件:技术支持为“{姓名}”,建群时间为“{开始日期}”到“{结束日期}”,客户状态排除“客户重复”,接入方式排除“项目制”的所有客户明细

The bundled script orchestrates the whole flow:

python3 ~/.codex/skills/youdata-record-cid/scripts/run_youdata_record_cid.py \
  --support-name 严超 \
  --start-date 2026-01-01 \
  --end-date 2026-03-19 \
  --workspace "$PWD" \
  --output-dir "$PWD" \
  --dry-run

This script:

  • calls youdata-env-config to get env JSON
  • calls youdata-report-data-analysis
  • flattens normalSheetData into a local Excel file
  • applies the final filters locally
  • hands the exported Excel to record-cid

4. Report results clearly

After the batch finishes, report three categories separately:

  • 成功更新的数量
  • 缺少 最大值cid 的客户名单
  • 没搜到客户群的客户名单

Normal runs should not do per-row write verification unless the user explicitly asks for debug mode.

Safety Rules

  • Never ask for plaintext access token, tokenKey, Qiyu account, or Qiyu password in chat.
  • Let the user configure secrets locally in the designated config file or terminal prompt.
  • Reuse generated env JSON within the same session instead of regenerating it unnecessarily.
  • If the exported table does not contain the required columns, stop and explain what is missing.
  • Use record-cid for the actual Qiyu update step rather than re-implementing its logic.
Installs
1
First Seen
Apr 23, 2026