대량 작업 또는 API 요청을 수행하는 Python, PowerShell, Node.js 스크립트의 관찰 가능한 런타임 출력을 설계하고 검증합니다.
- GitHub 스타
- 41,038
- 파일
- 6
- 마지막 커밋
- 2026년 11월 11일
- 라이선스
- MIT
- 허용된 도구
- —
batch-script-progress skill은 무엇을 하나요?
batch-script-progress은(는) agent skill입니다. 대량 작업 또는 API 요청을 수행하는 Python, PowerShell, Node.js 스크립트의 관찰 가능한 런타임 출력을 설계하고 검증합니다.
skill의 SKILL.md에서 생성된 요약입니다.
batch-script-progress skill 정보
대량 작업을 위한 Python, PowerShell 또는 Node.js 스크립트를 작성하는 개발자는 이 SKILL을 사용하여 관찰 가능한 런타임 출력을 설계하고 검증할 수 있습니다. 이 SKILL은 스크립트의 기본 처리 로직이나 종료 상태를 변경하지 않고 진행 상황 보고, 항목 실패 및 최종 요약을 위한 구조화된 계약을 만드는 데 중점을 둡니다. 이는 실행 과정이 조용하여 모니터링이 어려운 장시간 루프, API 요청 배치 또는 파일 처리 작업에 특히 유용합니다.
에이전트가 시작 알림, 주기적인 진행 상황 업데이트 및 터미널 요약을 포함하도록 스크립트를 수정해야 할 때 이 SKILL을 로드해야 합니다. 이 SKILL은 진행 데이터가 기본 stdout 결과 스트림을 오염시키지 않도록 stderr와 같은 별도의 채널로 전송되도록 보장합니다. 다양한 런타임에 대한 특정 구현 패턴을 활용하며, 프로세스가 실행 중인 동안 출력이 보이는지 증명하는 교차 언어 검증기를 포함합니다. 사용자는 이 기능이 UI 진행 표시줄이나 모니터링 인프라를 위한 것이 아니라, 신뢰할 수 있고 기계 또는 사람이 읽을 수 있는 진단 스트림을 구축하기 위한 것임을 유의해야 합니다.
agent가 수행할 수 있는 작업
- 1대량 API 스크립트에 진행 상황 추가많은 API 요청을 수행하는 Node.js 스크립트를 수정하여 처리됨, 성공함, 실패함 카운트를 stderr를 통해 보고합니다.
- 2종료 상태 일관성 보장Python 배치 스크립트의 기존 종료 코드 계약을 유지하면서 결과 요약을 포함하도록 업데이트합니다.
- 3안전한 오류 보고 구현원시 예외나 민감한 데이터를 덤프하지 않고 개별 항목에 대해 정제된 실패 사유를 방출하도록 스크립트를 구성합니다.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
batch-script-progress skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.Claude Code에 batch-script-progress skill 설치
~/.claude/skills/batch-script-progress/SKILL.md
$ npx degit github/awesome-copilot/skills/batch-script-progress ~/.claude/skills/batch-script-progressClaude Code (project)에 batch-script-progress skill 설치
.claude/skills/batch-script-progress/SKILL.md
$ npx degit github/awesome-copilot/skills/batch-script-progress .claude/skills/batch-script-progressCodex에 batch-script-progress skill 설치
~/.agents/skills/batch-script-progress/SKILL.md
$ npx degit github/awesome-copilot/skills/batch-script-progress ~/.agents/skills/batch-script-progressGemini CLI에 batch-script-progress skill 설치
~/.gemini/skills/batch-script-progress/SKILL.md
$ npx degit github/awesome-copilot/skills/batch-script-progress ~/.gemini/skills/batch-script-progressClaude.ai에 batch-script-progress skill 설치
npx degit github/awesome-copilot/skills/batch-script-progress batch-script-progress && zip -r batch-script-progress.zip batch-script-progress # claude.ai → Customize → Skills → + → Create skill → Upload a skill → batch-script-progress.zip
자동 검사
2026년 11월 13일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 보안 감사는 아닙니다. 에이전트가 실행하기 전에 스크립트를 읽어 보세요. 검사 방식
- 소스 저장소 연결 및 접근 가능github/awesome-copilot/skills/batch-script-progress is public and reachablegithub.com/github/awesome-copilot/tree/HEAD/skills/batch-scr ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit 2026-11-11github.com/github/awesome-copilot/commits ↗통과
- 스크립트에 다운로드 후 실행이나 자격 증명 탈취가 없음3 scripts read; no download-and-run, remote eval, base64 execution or credential upload통과
- SKILL.md에 숨겨진 지침 없음No override phrases, safeguard switches, credential requests or hidden charactersgithub.com/github/awesome-copilot/blob/HEAD/skills/batch-scr ↗통과
- 사전 허용 도구가 제한됨No pre-approved tools; the agent asks before using onegithub.com/github/awesome-copilot/blob/HEAD/skills/batch-scr ↗통과
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.
A time check at the end of a loop cannot emit while one item is blocking. For a long item, use existing progress callbacks, stage notifications, or a safely integrated heartbeat where the runtime permits it. A Node.js timer cannot run through synchronous event-loop blocking; a PowerShell progress display is not a durable log. If mid-item progress cannot be added without changing execution semantics, emit the current stage before it starts and disclose the notification gap. Do not promise a periodic heartbeat that the implementation cannot deliver.
4. Implement the smallest compatible change
Read language notes and safe examples for the selected runtime. The examples are executable output-contract probes, not production processors; adapt their emitter and accounting to the existing code rather than copying their failure policy.
Keep reporting separate from processing decisions. In concurrent code, serialize reporting through the coordinator and count completed outcomes, not submissions. On handled failure or cancellation, attempt one final summary and preserve the original outcome; a summary-write error must not replace the original processing exception. Do not swallow cancellation as an ordinary item failure. For host-managed cancellation, including PowerShell host stops, preserve the existing host behavior; do not convert stop exceptions into item failures or promise a final summary after host termination. Use finally for applicable cleanup, but verify the actual cancellation path in the supported host when graceful cancellation is part of the contract.
Do not force successful termination to deliver buffered output. In Node.js prefer setting process.exitCode and draining writes over an immediate process.exit(). Respect existing host/library semantics in PowerShell: a reusable function should not exit its caller. Forced termination, process crashes, and broken output pipes can prevent final reporting; do not claim otherwise.
5. Verify before reporting completion
Read verification cases, then run focused tests for the changed script with harmless fixtures. Capture stdout and stderr separately and check the real exit status. Verify start/progress ordering, monotonic counters, sanitized failures, exactly one summary on supported paths, and unchanged result contents and processing policy.
Prove liveness by reading the child process output while it is still running, not by examining output collected after exit. Check both terminal and redirected behavior when both are supported. A controlled pause after a progress event is a useful deterministic probe: receive the event, confirm the child has not exited, then release it. Keep such gates in harmless test fixtures or the test harness; do not add stdin waits, sleeps, or cancellation hooks to normal production processing solely to make a test pass. Prefer an existing callback or injectable processing boundary. If no safe deterministic seam exists, test the real path only with harmless inputs or report liveness as unverified. A watchdog may fail the test; it must not manufacture a successful result.
The bundled cross-language verifier runs the Python, PowerShell, and Node.js probes with normal, partial-failure, preserved partial-failure exit-zero, empty, unknown-total, fail-fast, simulated-cancellation, and live-output cases. It checks the probes only; it does not prove that an arbitrary generated script or automatic skill selection works.
Run it from this skill folder with Node.js 20 or later:
node tests/verify-examples.mjs
It also requires Python 3.9 or later and PowerShell 5.1 or later. See the language notes for executable overrides. Missing runtimes are failures, not silently skipped coverage.
Deliverables
Return the changed script, its output/exit contract, and focused verification results. Distinguish executed tests from inspection and unexecuted cases. Do not call the script verified merely because it prints a progress bar or the skill metadata passes validation.
Gotchas
- Counting before logging can make discovery silently consume an entire stream.
- Writing status with PowerShell
Write-Outputadds strings to the success pipeline. - Measuring only buffered output after exit cannot prove progress visibility.
- A final message saying
completedhides partial failure unless the outcome and counters explain it. finallyis not a guarantee of reporting after forced termination.
이 스킬의 파일
6batch-script-progress skill 질문
Claude Code에 batch-script-progress skill을 어떻게 설치하나요?
npx degit github/awesome-copilot/skills/batch-script-progress ~/.claude/skills/batch-script-progress를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
batch-script-progress skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
전체 항목 수를 알 수 없는 경우 진행 상황을 어떻게 보고해야 하나요?
허위 퍼센트, ETA 또는 남은 항목 수를 사용하지 말고 카운트만 보고합니다. 카운트를 위해 스트림을 별도로 생성하지 마십시오.
CLI 스크립트에서 진행 상황과 진단 정보는 어디로 보내야 하나요?
진행 상황과 진단 정보는 별도의 채널로 보내야 합니다. 단독 실행 스크립트의 경우 stderr를 기본값으로 사용하며, stdout은 기계가 읽을 수 있는 결과용으로 예약합니다.
실행 중에 진행 상황이 실제로 보이는지 어떻게 확인하나요?
프로세스가 종료된 후 수집된 출력을 검사하는 대신, 프로세스가 실행 중인 동안 자식 프로세스의 출력을 읽어 생동성(liveness)을 증명해야 합니다.