मुख्य सामग्री पर जाएँ
Skillpedia
ऑटोमेशन40k · #7091

batch-script-progress

यह क्या करती है

यह tool उन scripts में progress जानकारी जोड़ने में मदद करता है जो बहुत सारी items (जैसे files या data) को process करती हैं। यह दिखाता है कि क्या चल रहा है, क्या पूरा हुआ, और कुछ fail हुआ या नहीं, और script के मुख्य output को नहीं बदलता।

कब इस्तेमाल करें

  • ✓ऐसी scripts बनाते समय जो बहुत सारी files को batches में process करती हैं।
  • ✓जब लंबे समय तक चलने वाले कामों की progress जानना ज़रूरी हो।
  • ✓किसी बड़े काम में कौन सी items fail हुईं, यह समझने के लिए।

Skill का लिंक

https://github.com/github/awesome-copilot/blob/main/skills/batch-script-progress/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/github/awesome-copilot/blob/main/skills/batch-script-progress/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस Python script में progress reporting जोड़ो जो एक folder की सभी files process करती है।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह tool आपकी script का विश्लेषण करता है ताकि समझ सके कि वह कैसे काम करती है, और कहाँ शुरुआत, progress, अलग-अलग failures और अंत में summary के बारे में संदेश जोड़ने हैं। ये संदेश एक अलग channel (आमतौर पर stderr) पर भेजे जाते हैं, ताकि वे script के मुख्य output में दखल न दें।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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.

…

अक्सर पूछे जाने वाले सवाल

'processing contract' क्या है?

यह इस बात का समझौता है कि script को कैसे व्यवहार करना चाहिए: वह input में क्या लेगी, output में क्या देगी, और सफलता या असफलता की सूचना कैसे देगी।

सामान्य progress bars क्यों नहीं इस्तेमाल करें?

Visual progress bars user interfaces के लिए होते हैं। यह tool background या batch में चलने वाली scripts के लिए साफ और संरचित जानकारी देने पर केंद्रित है, बिना यह बदले कि script असल में क्या करती है।

अगर कोई item fail हो जाए तो क्या होता है?

Tool बता सकता है कि कौन सी item fail हुई, क्यों हुई, और क्या script आगे चलती रहेगी। इससे पूरा काम रोके बिना खास समस्याओं का पता चल जाता है।

जानकारी

लेखक का मूल विवरण

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

लोकप्रियता

GitHub स्टार
40k
रैंकिंग में स्थान
#7091
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

acquire-codebase-knowledge

40k

आपके एजेंट को किसी मौजूदा code प्रोजेक्ट को समझने और उसका documentation बनाने में मदद करता है। यह नए लोगों को प्रोजेक्ट से जोड़ने या architecture का सार जानने में उपयोगी है।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

acreadiness-assess

40k

आपके एजेंट को किसी प्रोजेक्ट की AI के लिए तैयारी जाँचने और रिपोर्ट बनाने देता है। यह समझने में उपयोगी है कि प्रोजेक्ट AI tools इस्तेमाल करने के लिए कितना तैयार है।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

acreadiness-generate-instructions

40k

आपके एजेंट को assessment के आधार पर AI tools के लिए निर्देश बनाने में मदद करता है। यह बताता है कि AI कोड के साथ बेहतर कैसे काम करे और पहचानी गई कमियाँ कैसे दूर हों।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

acreadiness-policy

40k

आपके एजेंट को AI प्रोजेक्ट assessment के लिए नीतियाँ तय करने या लागू करने में मदद करता है। यह प्रोजेक्ट्स के मूल्यांकन को मानक बनाने और compliance सुनिश्चित करने में उपयोगी है।

AI और एजेंटएजेंट

मिलती-जुलती skills