batch-script-progress
Fungsinya
Tool ini membantu menambahkan informasi progres pada skrip yang memproses banyak item (seperti file atau data). Tool menunjukkan apa yang sedang berjalan, apa yang sudah selesai, dan jika ada yang gagal, tanpa mengubah output utama skrip.
Kapan dipakai
- ✓Saat membuat skrip yang memproses banyak file secara batch.
- ✓Saat Anda perlu mengetahui progres operasi yang berjalan lama.
- ✓Untuk mengetahui item mana yang gagal dalam operasi berskala besar.
Link skill
https://github.com/github/awesome-copilot/blob/main/skills/batch-script-progress/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Tambahkan pelaporan progres ke skrip Python ini yang memproses semua file dalam sebuah folder.”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Tool menganalisis skrip Anda untuk memahami cara kerjanya, lalu menentukan tempat menambahkan pesan tentang awal proses, progres, kegagalan per item, dan ringkasan akhir. Pesan-pesan ini dikirim ke saluran terpisah (biasanya stderr) agar tidak mengganggu output utama skrip.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Batch Script Progress
Make generated batch scripts observable while they run, without changing their processing contract. Design start, periodic progress, per-item failure, and final-summary output together with result streams and exit status. A progress-bar library alone does not establish this contract.
1. Fix the existing contract
Read the script, callers, and nearby tests before editing. Identify:
- Input unit, known or unknown total, and whether enumeration is lazy.
- Existing stdout format and consumers, runtime version, and interactive versus redirected execution.
- Continue-on-error or fail-fast policy, retry rules, skip rules, transaction boundaries, and cancellation behavior.
- Existing exit codes and what callers treat as success.
Preserve these decisions. Do not add retries, parallelism, dependencies, or a new failure policy just to add progress output. If partial failures currently return zero, report the partial outcome honestly while keeping that exit contract. If the contract is missing or contradictory, ask for the decision that changes behavior; do not silently make it.
2. Define the output contract before implementation
Choose a small, stable vocabulary and fields, reusing the repository logger where suitable:
- Start: operation name, total or explicit unknown, and initial counters. Emit before expensive enumeration; discovery itself may need progress.
- Progress: processed, succeeded, failed, skipped, total or unknown, and elapsed time. Add a sanitized current-item identifier only when useful.
- Item failure: safe identifier, failure category or sanitized reason, and whether processing will continue. Emit when observed, independently of the normal progress interval.
- Summary: completed, partial, failed, or cancelled; final counters; elapsed time; known unprocessed count if available; and the exit status required by the existing contract.
Define processed = succeeded + failed + skipped for items that reached a terminal outcome. Keep in-flight and not-started items separate. Count each item once; retry attempts are not additional processed items. Do not label an item successful before its required commit, write, or acknowledgement. If a transaction rolls back, report rolled-back work rather than claiming durable success.
For an unknown total, report counts without a fabricated percentage, ETA, or remaining count. Do not materialize a stream just to count it. For zero items, emit start and summary with zero counts; never divide by zero.
3. Choose output streams and cadence
Reserve stdout for the established machine-readable result, pipeline objects, or protocol. Put progress and diagnostics on a separate channel; stderr is the portable default for standalone CLI scripts. Stderr output alone does not imply failure: callers must use the agreed exit code and result contract. Verify callers that treat any stderr as failure before changing their output. If stdout is reserved and stderr is incompatible, use an existing compatible logger or sink only when the caller already supports it. Do not move progress to stdout or another stream with changed semantics. If no compatible channel exists, stop and ask whether the output contract may change, or report that progress cannot be added safely.
Use a bounded cadence, such as every configured number of items or elapsed interval, rather than unconditionally logging every item. Emit start, failures, and summary regardless of that cadence. Preserve required per-item audit records separately. Avoid unbounded in-memory failure lists and repeated stack traces. Redact credentials, query parameters, personal data, and sensitive paths before formatting; do not dump raw exceptions or whole input records by default.
Use monotonic time for intervals and duration. Ensure output is flushed or drained so notifications arrive before exit. Use plain newline-delimited records under redirection; enable terminal rewriting or colors only for an appropriate TTY. Keep log-field meanings consistent across languages, not necessarily their exact formatting or libraries.
…
Pertanyaan umum
Apa itu 'processing contract'?
Ini adalah kesepakatan tentang perilaku skrip, termasuk apa yang menjadi input, output yang dihasilkan, dan cara skrip melaporkan keberhasilan atau kegagalan.
Mengapa tidak menggunakan progress bar biasa?
Progress bar visual ditujukan untuk antarmuka pengguna. Tool ini berfokus pada informasi yang jelas dan terstruktur untuk skrip yang berjalan di latar belakang atau secara batch, tanpa mengubah apa yang sebenarnya dilakukan skrip.
Apa yang terjadi jika sebuah item gagal?
Tool dapat melaporkan item mana yang gagal, penyebabnya, dan apakah skrip akan tetap dilanjutkan. Dengan begitu, masalah spesifik bisa ditemukan tanpa menghentikan seluruh operasi.
Detail
Deskripsi asli dari pembuat
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
repo: github/awesome-copilot
Popularitas
- Bintang GitHub
- 40k
- Peringkat
- #7091
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- …
Skill lain dari repositori ini
acquire-codebase-knowledge
40kMembantu agent Anda memahami dan mendokumentasikan proyek kode yang sudah ada. Berguna untuk proses onboarding anggota baru atau mendapatkan gambaran arsitektur.
acreadiness-assess
40kMemungkinkan agent Anda menilai kesiapan proyek untuk AI dan membuat laporannya. Berguna untuk mengetahui seberapa siap proyek menggunakan alat AI.
acreadiness-generate-instructions
40kMembantu agent Anda membuat instruksi untuk alat AI berdasarkan hasil penilaian. Berguna untuk meningkatkan cara AI berinteraksi dengan kode dan menutup celah yang ditemukan.
acreadiness-policy
40kMemungkinkan agent Anda membantu menyusun atau menerapkan kebijakan untuk penilaian proyek AI. Berguna untuk menstandarisasi evaluasi proyek dan memastikan kepatuhan.
Skill serupa
knowledge-automation
394kMembantu agent Anda mengatur tugas terjadwal yang memasukkan konten baru ke Knowledge vault Anda secara rutin, lalu memastikan tugas itu berjalan.
knowledge-source-ingest
394kMembantu agent Anda menjaga Knowledge vault tetap mutakhir dengan item baru dari chat, feed, atau kotak surat, tanpa menambahkan ulang yang sudah ada.
benchmark
280kMembantu agent Anda mengukur kecepatan dan performa kode. Berguna untuk memastikan semuanya cepat dan menemukan penyebab kelambatan.