Telegram Contract Ops
Use this skill for the combined Plan B + Plan C workflow.
What this skill covers
- - Parse standardized Telegram text blocks into contract data
- Generate
.docx contracts from a company template - Run Telegram bot flows for
/mauhopdong, /cccd, INLINECODE3 - OCR Vietnamese electronic ID screenshots and convert them into Plan B input blocks
- Route contract behavior by Telegram group
Current design boundary
Plan B
- - Input: structured Telegram-style
KEY: VALUE block - Output:
.docx contract file
Plan C
- - Input: 1 screenshot of Vietnamese electronic ID from app
- OCR output fields:
-
TEN
-
NGAY_SINH
-
CCCD
-
NGAY_CAP
-
THUONG_TRU
-
CHO_O_HIEN_TAI when available
-
NOI_CAP = CTCCS QLHC VTTXH
- - User confirms/edits block before final contract generation
Keep these outside the packaged skill
- - Telegram bot token
- group chat IDs
- INLINECODE13
- INLINECODE14
- OCR debug session artifacts
- state files and logs
Included references
- -
references/architecture.md - flow overview and routing - INLINECODE16 - migration/install checklist
- INLINECODE17 - canonical Telegram input block
- INLINECODE18 - publish/install/update commands via ClawHub
- INLINECODE19 - common runtime and routing issues
- INLINECODE20 - Windows-specific guidance
- INLINECODE21 - macOS-specific guidance
Included assets/scripts
Read these only when needed:
- -
scripts/ for generator/parser/bot helpers - INLINECODE23 for original
.docx template - INLINECODE25 for Windows example env files and quick-start PowerShell wrapper
Telegram 合约操作
使用此技能执行 Plan B + Plan C 组合工作流。
本技能涵盖范围
- - 将标准化的 Telegram 文本块解析为合约数据
- 基于公司模板生成 .docx 格式合约
- 运行 Telegram 机器人流程:/mauhopdong、/cccd、/cccd_debug
- OCR 识别越南电子身份证截图并转换为 Plan B 输入块
- 根据 Telegram 群组路由合约行为
当前设计边界
Plan B
- - 输入:结构化的 Telegram 风格 KEY: VALUE 块
- 输出:.docx 合约文件
Plan C
- - 输入:1 张来自应用的越南电子身份证截图
- OCR 输出字段:
- TEN(姓名)
- NGAY_SINH(出生日期)
- CCCD(公民身份证号)
- NGAY_CAP(签发日期)
- THUONG_TRU(常住地址)
- CHO
OHIEN_TAI(当前住址,如有)
- NOI_CAP = CTCCS QLHC VTTXH(签发机关)
请勿包含在打包技能中
- - Telegram 机器人令牌
- 群聊 ID
- .env.telegram
- .env.telegram.groups
- OCR 调试会话产物
- 状态文件和日志
包含的参考资料
- - references/architecture.md - 流程概览与路由
- references/deployment.md - 迁移/安装检查清单
- references/input-template.md - 标准 Telegram 输入块格式
- references/clawhub.md - 通过 ClawHub 发布/安装/更新命令
- references/troubleshooting.md - 常见运行时与路由问题
- references/windows.md - Windows 专属指南
- references/macos.md - macOS 专属指南
包含的资源/脚本
仅在需要时读取:
- - scripts/ - 生成器/解析器/机器人辅助脚本
- assets/ - 原始 .docx 模板
- assets/windows/ - Windows 示例环境文件和快速启动 PowerShell 封装脚本