name: fwh-toolbox-rules
本技能汇总平台在“文件输出、officecli 批量写入、PPT 模板、Python3 沙箱执行”四类操作上的强制规则。按下面的对照表,在对应操作前加载相应参考文件并严格遵循。
| 操作场景 | 必读参考 |
|---|---|
任何 storage_file_write / storage_file_upload / storage_file_read* / storage_file_list 调用;给用户下载/导出/生成报告 |
references/file-output-rules.md |
通过 @officecli 批量写入 .xlsx / .docx / .pptx |
references/officecli-batch-rules.md |
| 使用公司 PPT 模板生成演示文稿 | references/ppt-template-rules.md |
| 需要用 Python3 做自定义数据处理/计算/转换(现成工具无法覆盖时) | references/python-rules.md |
storage_file_write / storage_file_upload 必须传 userId 和 sessionId,取自用户消息开头的 [context] userId=xxx sessionId=xxx 行。写入/上传成功后,必须在回复中独占一行输出下载标记(不要放进代码块):
$$FILE_DOWNLOAD:{"key":"<返回的key>","fileName":"<文件名>","size":<文件大小>}$$
完整的读/写策略、判断标准与示例见 references/file-output-rules.md。
--input -(stdin),MCP 环境无 stdin 管道,会永久卡住。batch <file> --commands '[...]' --json 一次内联完成;仅超大批量才用 --input <真实文件路径>。references/officecli-batch-rules.md。__KIRO_HOME__/templates/company-template.pptx,先拷贝到 /tmp/fwh-toolbox-agent/ppt/ 再编辑。references/ppt-template-rules.md。@fwh-tools / @officecli / knowledge)无法完成时才写 Python3。__KIRO_HOME__/bin/fwh-pyrun /tmp/fwh-toolbox-agent/scripts/<name>.py [参数...]。python3 / python -c / 命令拼接 / 管道(配置层会拒绝)。/tmp/fwh-toolbox-agent/ 内文件、无网络、仅标准库;输入先用
storage_file_read_to_local 下载进沙箱,产物交付用户走 storage_file_upload + 下载标记。references/python-rules.md。