Install
openclaw skills install travel-subsidyWhen the user uploads 发票.zip and 火车票.zip, use the included data tables to calculate eligible business-trip subsidy records, split related vs remaining files, create output workbooks, package two result zips, and report progress at every key step.
openclaw skills install travel-subsidyUse this skill only when the user provides two zip archives named exactly:
发票.zip火车票.zipThe archives contain:
.pdf, .jpg, .jpeg, .png, .webp)This skill calculates which records can be used to support 出差补助 and produces two result zip packages.
Process the two archives as follows:
备注
备注You must give the user a visible progress update at every key node.
At minimum, send these updates:
已收到发票.zip和火车票.zip,开始检查压缩包压缩包检查完成,开始解压文件解压完成,开始识别数据表和票据文件已识别发票数据表与火车票数据表,开始读取结构化信息结构化信息读取完成,开始建立文件与表格行的对应关系对应关系建立完成,开始提取城市与行程信息城市与行程信息提取完成,开始组装出差行程出差行程组装完成,开始计算可报销出差补助计算完成,开始拆分补助相关文件和剩余文件拆分完成,开始生成出差补助计算表和剩余信息表表格生成完成,开始打包输出文件打包完成,准备回传结果任务完成If processing many rows/files, also emit periodic progress, for example:
发票信息处理进度:X / N火车票信息处理进度:Y / M行程组装进度:K / TIf any fatal or partial failure occurs, immediately report:
Only use this skill if both required archives are present.
Expected exact filenames:
发票.zip火车票.zipIf one archive is missing, stop and tell the user clearly.
Do not guess if filenames are ambiguous unless the user explicitly says which file is which.
Create a dedicated run directory under {baseDir}/runs/.
Example:
mkdir -p "{baseDir}/runs"
ts="$(date +%Y%m%d-%H%M%S)"
run_dir="{baseDir}/runs/travel-subsidy-${ts}"
mkdir -p "$run_dir/input" "$run_dir/invoice_zip" "$run_dir/train_zip" "$run_dir/work" "$run_dir/output"
Never modify the original uploaded archives in place.
$run_dir/input/.发票.zip into $run_dir/invoice_zip/火车票.zip into $run_dir/train_zip/Each archive is expected to include at least one structured table such as:
.xlsx.xls.csvPrefer structured tables over OCR or raw visual parsing.
For each archive:
For every row, try to match the corresponding source file using one or more of:
Do not silently drop unmatched rows. Keep an exception list for:
For both output workbooks, preserve as much as possible the following key fields from the source tables:
If the source tables use different column names, normalize them into the above output columns.
The train ticket table is expected to provide or imply:
Use the city fields directly when available.
For train tickets, normalize the preserved fields as follows:
文件名: the matched source file name发票号: if a ticket number / order number / unique ticket identifier exists, use it; otherwise leave blank销售方名称: always fill as 火车票发票价税合计: preserve the fare / ticket amount if present项目名称: fill as 火车票备注: preserve original remarks and append any matching / eligibility notes if neededThe invoice table is expected to provide or imply:
For invoices, city information must be inferred as follows:
If it is a lodging / hotel invoice:
上海...酒店, use that cityIf it is an air-ticket-related invoice:
备注南京-上海, 上海至北京, MU5101 南京/北京For other invoice types:
备注 if it clearly contains travel city cluesNormalize city names to stable city labels.
Examples:
南京南, 南京站, 禄口机场 -> 南京上海虹桥, 上海浦东, 上海南 -> 上海北京南, 首都机场, 大兴机场 -> 北京District handling for subsidy standard:
南京六合南京溧水南京高淳These three use the lower subsidy standard.
If a record only clearly indicates 南京 without the district, do not automatically treat it as 六合/溧水/高淳.
Apply these subsidy rules:
200元/天/人100元/天/人Same-day round trip
Not same-day round trip
Driving / ETC
No impossible overlap
Assume:
南京南京You must support multi-city loop itineraries such as:
南京 -> 上海 -> 北京 -> 南京Combine all usable train-ticket and invoice-derived travel records into a single chronological timeline.
For each candidate record, capture at least:
发票 or 火车票)Build trips by chaining records chronologically with strict physical and geographical continuity.
Rules:
南京.剩余票据结果.zip).南京.行程编号.001_YYYY-MM-DD_Seller_ID.pdf) for professional presentation.Count subsidy days conservatively.
Recommended default:
1 dayIf evidence is incomplete, do not over-claim. Record the reason in remarks.
For each subsidy day:
200南京六合, 南京溧水, or 南京高淳: 100If city standard is ambiguous:
Produce two zip packages under $run_dir/output/.
Filename:
出差补助结果.zipContents:
出差补助计算表.xlsx出差补助相关票据/
说明.txt
Filename:
剩余票据结果.zipContents:
剩余票据信息.xlsx剩余票据/
说明.txt
This workbook must preserve the core business fields for each related ticket/invoice row.
The main sheet should be a line-by-line evidence sheet, not only a trip summary sheet.
For each eligible trip:
文件名: leave blank发票号: leave blank销售方名称: leave blank发票价税合计: fill with the calculated subsidy amount for that trip项目名称: fill 出差补助开票日期 / 日期: may leave blank or fill the return date of the trip行程路径: fill the trip path证据类型: fill 差补是否计入差补: fill 是备注: write the reason why this trip qualifies for subsidy, such as:
当日往返,已提供往返车票非当日往返,已提供往返票据及住宿费发票多城市行程,已形成南京出发并返回南京的完整闭环,且住宿证据齐全For the ordinary rows corresponding to files:
文件名发票号销售方名称发票价税合计项目名称是否计入差补 should indicate whether the file is part of subsidy evidence, usually 是备注 should explain the role of the file when useful, such as:
去程车票返程车票住宿费发票中转航段相关发票Recommended additional sheets:
行程汇总异常与未纳入原因In 行程汇总, you may include:
This workbook must also preserve the core business fields.
The main sheet should contain at least:
Rules:
销售方名称 must be 火车票.Common reasons may include:
出差补助相关票据/剩余票据/No file should appear in both zips.
You may rename copied output files for easier sorting, but do not alter the originals.
Recommended copied output format:
001_火车票_2025-01-12_南京-上海.pdf002_住宿发票_2025-01-12_上海_某某酒店.pdfSanitize filename characters. Preserve the original extension.
Prefer Python for the main workflow because it is easier to safely handle:
Suggested structure in this skill folder:
process_travel_subsidy.pyTry in this order:
Try to parse patterns like:
A-BA至BA/BNormalize to city_from, city_to.
When there is uncertainty:
If one row/file fails:
If a source archive is corrupt:
If a required table is missing:
If final outputs are partially produced:
{baseDir}/runs/.At the end, return:
出差补助结果.zip剩余票据结果.zipAlso provide a short summary including: