19 lines
1.4 KiB
Python
19 lines
1.4 KiB
Python
from pathlib import Path
|
|
p = Path('/root/.openclaw/skills/web-task-router/SKILL.md')
|
|
text = p.read_text(encoding='utf-8')
|
|
text = text.replace(
|
|
'for example: "销售数据", "业绩", "店铺业绩", "售后", "退款", "费比", "客服体验", "用户反馈", "话术分析", "产品信息", "SKU编码", "材质", "预览图"',
|
|
'for example: "销售数据", "业绩", "店铺业绩", "售后", "退款", "费比", "客服体验", "用户反馈", "话术分析", "产品信息", "SKU编码", "材质", "预览图", "库存", "缺货", "补货"'
|
|
)
|
|
text = text.replace(
|
|
' 2) Product info query (`SKU/成本/材质/预览图`): `exec`: `product-info "<sku或关键词>" --days 30 --limit 20`',
|
|
' 2) Product info / stock-risk query (`SKU/成本/材质/预览图/库存/发货件数/缺货天数`): `exec`: `product-info "<sku或关键词>" --days 30 --limit 20`'
|
|
)
|
|
extra = '- For stock-risk tasks, always include: current stock, daily shipped pieces, estimated stockout days, and whether it is within the 10-day replenishment lead line.\n'
|
|
if 'For stock-risk tasks' not in text:
|
|
anchor = ' 5) Customer-service experience/writing analysis: `exec`: `customer-service-analysis --start <YYYY-MM-DD> --end <YYYY-MM-DD> [--shop "店铺关键词"] --limit 20`\n'
|
|
if anchor in text:
|
|
text = text.replace(anchor, anchor + extra)
|
|
p.write_text(text, encoding='utf-8')
|
|
print('updated', p)
|