feishu-bitable-task-manager
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFeishu Bitable Task Manager
Feishu Bitable 任务管理器
Use this skill to read/write tasks in a Feishu Bitable “task status table” while staying compatible with its schema conventions.
使用该Skill在飞书多维表格的「任务状态表」中读写任务,同时兼容其结构规范。
Path Convention
路径规范
Canonical install and execution directory: . Run commands from this directory:
~/.agents/skills/feishu-bitable-task-manager/bash
cd ~/.agents/skills/feishu-bitable-task-managerOne-off (safe in scripts/loops from any working directory):
bash
(cd ~/.agents/skills/feishu-bitable-task-manager && npx tsx scripts/bitable_task.ts --help)标准安装与执行目录:。请从该目录运行命令:
~/.agents/skills/feishu-bitable-task-manager/bash
cd ~/.agents/skills/feishu-bitable-task-manager一次性执行(可在任意工作目录的脚本/循环中安全运行):
bash
(cd ~/.agents/skills/feishu-bitable-task-manager && npx tsx scripts/bitable_task.ts --help)Quick start
快速开始
Run:
bash
npx tsx scripts/bitable_task.ts <subcommand> [flags]运行:
bash
npx tsx scripts/bitable_task.ts <subcommand> [flags]Required env
必需环境变量
- ,
FEISHU_APP_IDFEISHU_APP_SECRET TASK_BITABLE_URL- Optional:
FEISHU_BASE_URL - Optional: (override task table column names)
TASK_FIELD_*
- 、
FEISHU_APP_IDFEISHU_APP_SECRET TASK_BITABLE_URL- 可选:
FEISHU_BASE_URL - 可选:(覆盖任务表列名)
TASK_FIELD_*
Key defaults (compat rules)
核心默认规则(兼容性规则)
- Treat date presets as literal strings: ,
Today,Yesterday(Anymeans no date constraint).Any - Prefer fetching by /
--task-idwhen possible (it overrides--biz-task-id).--app/--scene/--status/--date - Ignore view filtering by default; use view filtering only when explicitly enabled (see ).
references/task-fetch.md - Keep only decoded rows with and at least one of
TaskID != 0.Params/ItemID/BookID/URL/UserID/UserName - Allow comma-separated priority lists for /
--status.--scene - supports
fetch; earlier scene/status values are filled first when--limitis set.--limit - is single-task only; do not use
claim.--limitonly controls candidate attempts (see--candidate-limit).references/task-claim.md - and
fetchboth split comma-separatedclaimvalues and query each scene in order (do not treat the full CSV as one literal scene).--scene - When ingesting JSON/JSONL, pass through keys that match column names; map /
CDNURLintocdn_urlwhen present.Extra
- 将日期预设视为字面字符串:、
Today、Yesterday(Any表示无日期限制)。Any - 尽可能优先通过/
--task-id获取任务(它会覆盖--biz-task-id参数)。--app/--scene/--status/--date - 默认忽略视图过滤;仅在显式启用时使用视图过滤(详见)。
references/task-fetch.md - 仅保留且至少包含
TaskID != 0中一项的解码行。Params/ItemID/BookID/URL/UserID/UserName - 允许/
--status使用逗号分隔的优先级列表。--scene - 命令支持
fetch参数;设置--limit时,会优先填充较早的场景/状态值对应的任务。--limit - 命令仅支持单个任务;请勿使用
claim参数。--limit仅控制候选任务的尝试次数(详见--candidate-limit)。references/task-claim.md - 和
fetch命令都会拆分逗号分隔的claim值,并按顺序查询每个场景(不会将完整的CSV视为单个字面场景)。--scene - 导入JSON/JSONL时,会直接传递与列名匹配的键;若存在/
CDNURL,则将其映射到cdn_url字段。Extra
Commands
命令
Fetch
获取任务(Fetch)
bash
npx tsx scripts/bitable_task.ts fetch --app com.smile.gifmaker --scene 综合页搜索 --status pending --date Today --limit 10
npx tsx scripts/bitable_task.ts fetch --task-id "1326,1327" --raw
npx tsx scripts/bitable_task.ts fetch --biz-task-id ext-20240101-001 --rawbash
npx tsx scripts/bitable_task.ts fetch --app com.smile.gifmaker --scene 综合页搜索 --status pending --date Today --limit 10
npx tsx scripts/bitable_task.ts fetch --task-id "1326,1327" --raw
npx tsx scripts/bitable_task.ts fetch --biz-task-id ext-20240101-001 --rawClaim (multi-worker safe)
认领任务(Claim,支持多 Worker 安全操作)
bash
npx tsx scripts/bitable_task.ts claim \
--app com.tencent.mm \
--scene 个人页搜索,综合页搜索 \
--device-serial <serial> \
--status pending,failed \
--date Today \
--candidate-limit 5Claim behavior details are in .
references/task-claim.mdbash
npx tsx scripts/bitable_task.ts claim \
--app com.tencent.mm \
--scene 个人页搜索,综合页搜索 \
--device-serial <serial> \
--status pending,failed \
--date Today \
--candidate-limit 5认领行为的详细说明请见。
references/task-claim.mdUpdate
更新任务(Update)
bash
npx tsx scripts/bitable_task.ts update --task-id 180413 --status running --device-serial <serial> --dispatched-at now
npx tsx scripts/bitable_task.ts update --input updates.jsonlbash
npx tsx scripts/bitable_task.ts update --task-id 180413 --status running --device-serial <serial> --dispatched-at now
npx tsx scripts/bitable_task.ts update --input updates.jsonlCreate
创建任务(Create)
bash
npx tsx scripts/bitable_task.ts create \
--input tasks.jsonl \
--app com.smile.gifmaker \
--scene 单个链接采集 \
--status pending \
--date YYYY-MM-DD \
--skip-existing BizTaskIDbash
npx tsx scripts/bitable_task.ts create \
--input tasks.jsonl \
--app com.smile.gifmaker \
--scene 单个链接采集 \
--status pending \
--date YYYY-MM-DD \
--skip-existing BizTaskIDDrama Fetch (read-only)
剧集数据获取(Drama Fetch,只读)
Fetch rows from source drama Bitable by optional BookID filter. Use when callers need normalized drama metadata fields:
--format metabash
npx tsx scripts/drama_fetch.ts --bitable-url "<DRAMA_BITABLE_URL>" --book-id "id1,id2" --format meta通过可选的BookID过滤器从源剧集多维表格获取数据行。当调用方需要标准化的剧集元数据字段时,使用参数:
--format metabash
npx tsx scripts/drama_fetch.ts --bitable-url "<DRAMA_BITABLE_URL>" --book-id "id1,id2" --format metaDerive tasks from a source Bitable (原始多维表格)
从源多维表格生成任务
sync--input--bitable-url--book-idbash
npx tsx scripts/drama_sync_task.ts \
--bitable-url "https://.../base/SOURCE_APP?table=SOURCE_TABLE" \
--task-url "https://.../base/TASK_APP?table=TASK_TABLE" \
--app com.smile.gifmaker \
--extra "test" \
--params-list \
--limit 10 \
--skip-existing \
--date 2026-02-10--date YYYY-MM-DD--skip-existingParams mode flags (mutually exclusive):
- — one task per source row;
--params-listis a JSON array of all search terms, e.g.Params.["好一个乖乖女","段休冥 鹿鸣于"] - — one task per search term; uses the same dedup logic as
--params-splitbut creates separate tasks, each with a plain string--params-list.Params - — one task per source row;
--params-actoruses onlyParams.主角名
sync--input--bitable-url--book-idbash
npx tsx scripts/drama_sync_task.ts \
--bitable-url "https://.../base/SOURCE_APP?table=SOURCE_TABLE" \
--task-url "https://.../base/TASK_APP?table=TASK_TABLE" \
--app com.smile.gifmaker \
--extra "test" \
--params-list \
--limit 10 \
--skip-existing \
--date 2026-02-10--date YYYY-MM-DD--skip-existing参数模式标志(互斥):
- — 每个源数据行对应一个任务;
--params-list字段为包含所有搜索词的JSON数组,例如Params。["好一个乖乖女","段休冥 鹿鸣于"] - — 每个搜索词对应一个任务;使用与
--params-split相同的去重逻辑,但会创建独立的任务,每个任务的--params-list为纯字符串。Params - — 每个源数据行对应一个任务;
--params-actor字段仅使用「主角名」。Params
Resources
参考资源
- Read for filters, pagination, validation, and field mapping.
references/task-fetch.md - Read for cross-machine safe task claiming.
references/task-claim.md - Read for status updates, timing fields, and batch update rules.
references/task-update.md - Read for create payload rules and batch create behavior.
references/task-create.md - Read for Feishu API endpoints and request/response payloads.
references/feishu-integration.md - Use /
scripts/bitable_task.ts/scripts/drama_fetch.tsas the source of truth for flags and behavior.scripts/drama_sync_task.ts
- 阅读了解过滤器、分页、验证和字段映射规则。
references/task-fetch.md - 阅读了解跨机器安全认领任务的规则。
references/task-claim.md - 阅读了解状态更新、时间字段和批量更新规则。
references/task-update.md - 阅读了解创建负载规则和批量创建行为。
references/task-create.md - 阅读了解飞书API端点和请求/响应负载。
references/feishu-integration.md - 请将/
scripts/bitable_task.ts/scripts/drama_fetch.ts作为参数和行为的权威参考。scripts/drama_sync_task.ts