批处理脚本进度与结果计数
原名:batch-script-progress
为多文件或多记录脚本设计进度、失败提示和结束汇总,保留原有处理约定。
中文 Skills 技能说明
批量处理文件时长时间没有输出,用户很难判断脚本还在运行还是已经卡住。提供获准修改的脚本、调用方式和既有退出码规则,技能整理开始提示、进行中计数、单项失败及最终汇总,并用包内 Python、PowerShell 和 Node.js 样例核对输出。它关注命令行处理过程,区别于页面进度条。进度不挤占原有 JSON 或管道结果,重试不重复计数,事务回退不报成已保存;未知总量不编百分比。新增输出不能擅改重试、并发、失败策略或安装依赖,日志先脱敏,真正的实时性仍需在目标环境验证。
上游能力依据
上游原始适用说明:Design and verify runtime output when creating or modifying Python, PowerShell, or Node.js scripts that process multiple files, records, or API requests. Use for batch scripts, bulk operations, silent long-running loops, progress reporting, per-item failures, final counts, stdout separation, or exit-status consistency. Not for UI progress bars, monitoring infrastructure, or progress updates in the AI conversation.
上游 SKILL.md 主要章节(保留原文标题):
- 1. Fix the existing contract
- 2. Define the output contract before implementation
- 3. Choose output streams and cadence
- 4. Implement the smallest compatible change
- 5. Verify before reporting completion
- Deliverables
- Gotchas
使用边界
先提供真实业务背景、目标受众和可核验资料。输出是工作草稿或决策辅助,不补造客户反馈、经营数据、案例或引用。
作者、翻译与许可证
- 原作者
- GitHub, Inc. 与 awesome-copilot contributors
- 中文翻译
- CEOFans翻译
- 许可证
- MIT
- 上游来源
- https://github.com/github/awesome-copilot/tree/96543145e9cb97711020b57b9d88f968062c4fc7/skills/batch-script-progress
适用范围
平台:linux、macos、windows;标签:批处理进度、退出码、结果计数
安全提示
基础静态扫描不等于绝对安全。技能可能调用命令、浏览器、云服务或本地文件,请在最小权限环境中使用,高风险操作必须人工确认。
如发现侵权、许可证或安全问题,可在本页前台提交投诉,管理员复核后可立即下架。