canvas-design
Create posters and visual art as PNG or PDF, guided by a design philosophy.
ANanthropics/skills203k3,265 new stars in the last 7 days
快递邮寄跟踪与证据留痕。当用户说"查快递""查物流""EMS 到哪了""顺丰单号""邮寄凭证" "把运单截图录进去""批量刷新在途快递"时使用。登记寄件(add-mailing)、浏览器自动化 查 EMS/顺丰官网轨迹、生成带时间戳+URL 水印的 PDF 凭证归档 08 目录、回写签收状态。 不走第三方聚合 API(证据效力与费用考虑),不自动扫码登录(风控风险,弹码人工扫)。
寄件交割的证据链工具:登记 → 查询 → 留痕 → 回写。数据真值在 case.yaml 邮寄跟踪 节
(case-progress skill 的 add-mailing / set-mailing 维护,schema 见其 references/schema.md §2.17),
轨迹 PDF 凭证落案件 08 - 🏛️ 法院送达/ 目录。
设计参考 既有内部浏览器自动化参考实现的 express 查询模块(浏览器自动化官网查询 + 水印 PDF),本 skill 是其在 ZCode + ego-browser 环境的轻量复刻。
目标:扫码登录一次管一年、过验证一次管七天,Chrome 关掉重启都不丢。
| 机制 | 说明 |
|---|---|
| 持久 profile | ~/.cache/express-tracking/chrome-profile(launch_persistent_context(user_data_dir) 持久化模式同构)——cookies/localStorage/sessionStorage 全落盘,tab 不需常开 |
| 登录 cookie | gehCYwtM3CvqO(httpOnly)实测有效期一年;风控验证标记 gehCYwtM3CvqP 有效期七天 |
| 登录态判定 | 以 cookie 为准(Network.getCookies 有无 gehCYwtM3CvqO),页面右上角显示"登录/注册"可能只是旧 DOM 未刷新——reload 即恢复 |
| 幂等启动 | 一律先跑 scripts/ensure_chrome.sh:CDP 9222 活着就复用(绝不重启已跑实例,登录态在内存+磁盘),没跑才启动 |
| trusted 输入 | 填单/点击必须走 Input.insertText/Input.dispatchMouseEvent(isTrusted=true);合成事件会被风控识别 → 弹验证+重置登录 UI(见 references §0.5) |
会话过期特征:查询页弹出扫码登录窗(而非安全验证)→ 让用户在查询页 tab 原地扫码(持久 profile 实践做法),约一年一次。
单号来源(按优先级):截图/短信里的单号(模型直接看图提取)> 用户口述 > 运单条码照片 (iPhone 拍照经 iCloud 进照片库,Vision 可识别 Code128 条码)。
/usr/bin/python3 .claude/skills/case-progress/scripts/case_store.py add-mailing <短码> <单号> \
--carrier ems|sf|other --content "内装材料" --sent YYYY-MM-DD \
--sender 寄件人 --to 收件方 --file "08 - 🏛️ 法院送达/YYMMDD 邮寄凭证 <单号>.jpg"
注意:/usr/bin/python3(默认 brew python3 + 旧 pyyaml 必崩,见环境备注)。凭证图片先复制入 08 目录再登记相对路径。
不要用 ego-lite 内嵌浏览器:其窗口 handOff 后会隐藏、不可见不可控(2026-10-09 实测踩坑)。主路线与既有实践同构:CDP 直连真实 Chrome 窗口(9222 + 持久 profile),窗口永远可见,登录/验证态可累积。
# 0. 幂等确保工位(已跑则复用会话,不重启)
scripts/ensure_chrome.sh
# 1. 脚本化操作(scripts/cdp_ems.js,node≥22 免依赖,内置 trusted 输入)
node scripts/cdp_ems.js status # 探测页面状态(验证码/登录/输入框)
node scripts/cdp_ems.js query 1234567890123 # 填单查询(自动消登录弹窗、trusted 输入;示例单号,虚构)
node scripts/cdp_ems.js text # dump 页面文本(轨迹解析)
node scripts/cdp_ems.js pdf 1234567890123 <路径.pdf> # 水印注入 + printToPDF
要点:
要点:
轨迹页完全加载后,page.evaluate 注入页眉水印(fixed 顶栏):
左=当前时间 YYYY-MM-DD HH:MM:SS,右=页面 URL;再经 page.cdp("Page.printToPDF", …)
导出 A4 PDF(关键参数见 references/query-flows.md §3)。
命名:YYMMDD <承运商>轨迹 <单号>.pdf,落 08 目录。
/usr/bin/python3 .claude/skills/case-progress/scripts/case_store.py set-mailing <短码> <单号> \
--status in_transit|signed|abnormal --latest "最近一条轨迹摘要" \
[--signed YYYY-MM-DD] --file "08 - 🏛️ 法院送达/YYMMDD EMS轨迹 <单号>.pdf"
签收时同时补一条时间线事件(事件类型=举证,状态 done)。收尾 log-work auto --type 整理。
list 遍历案件 → 各 show 取 邮寄跟踪 中 状态 ∈ {pending, in_transit} 的单号/usr/bin/python3(brew python3.14 + pyyaml4.2 会 collections.Hashable 崩溃)scripts/cdp_ems.js 需 node ≥22(原生 WebSocket,零依赖);Chrome CDP 的 /json/list 在 Chrome 155 返回空属正常,脚本已走 /json/new 兜底scripts/ensure_chrome.sh 幂等管理专属 Chrome 工位(CDP 9222 + 持久 profile ~/.cache/express-tracking/chrome-profile)Create posters and visual art as PNG or PDF, guided by a design philosophy.
ANanthropics/skills203k3,265 new stars in the last 7 days
Read and edit spreadsheets: add columns, compute formulas, format, and clean messy data.
ANanthropics/skills203k3,265 new stars in the last 7 days
Create and edit Word docs with TOC, page numbers, headers and more.
ANanthropics/skills203k3,265 new stars in the last 7 days
Read and edit PDFs: extract text and tables, merge, split, rotate, and fill forms.
ANanthropics/skills203k3,265 new stars in the last 7 days
Co-write specs, proposals and decision docs through a structured, iterative workflow.
ANanthropics/skills203k3,265 new stars in the last 7 days
Create and edit slide decks, generate slides from templates, and extract text.
ANanthropics/skills203k3,265 new stars in the last 7 days