본문으로 건너뛰기
Skillpedia
자동화40k · #7091

batch-script-progress

하는 일

이 도구는 많은 항목(파일이나 데이터 등)을 처리하는 스크립트에 진행 정보를 추가하는 데 도움을 줍니다. 무엇이 진행 중인지, 무엇이 완료되었는지, 실패한 항목이 있는지를 스크립트의 주요 출력을 바꾸지 않고 보여 줍니다.

사용하는 경우

  • ✓파일을 배치 단위로 처리하는 스크립트를 만들 때.
  • ✓오래 걸리는 작업의 진행 상황을 알아야 할 때.
  • ✓대규모 작업에서 어떤 항목이 실패했는지 알고 싶을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/batch-script-progress/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 Python 스크립트에 폴더의 모든 파일을 처리하는 진행 상황 보고를 추가해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 스크립트를 분석해 작동 방식을 이해하고, 시작, 진행, 개별 실패, 최종 요약에 관한 메시지를 추가할 위치를 찾습니다. 이 메시지는 스크립트의 주요 출력을 방해하지 않도록 별도의 채널(보통 stderr)로 보내집니다.

기술 내용 (원본 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.

…

자주 묻는 질문

‘처리 계약’이란 무엇인가요?

스크립트가 어떻게 작동해야 하는지에 대한 약속입니다. 입력으로 무엇을 받고, 출력으로 무엇을 만들며, 성공과 실패를 어떻게 보고하는지를 포함합니다.

일반적인 진행 막대를 쓰면 안 되나요?

시각적인 진행 막대는 사용자 인터페이스를 위한 것입니다. 이 도구는 백그라운드나 일괄 처리로 실행되는 스크립트를 위해, 스크립트가 실제로 하는 일을 바꾸지 않고 명확하고 구조화된 정보를 제공하는 데 집중합니다.

항목이 실패하면 어떻게 되나요?

도구는 어떤 항목이 왜 실패했는지, 그리고 스크립트가 계속 진행할지를 보고할 수 있습니다. 전체 작업을 멈추지 않고 특정 문제를 정확히 짚어 줍니다.

상세 정보

작성자의 원본 설명

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
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬