옵션
집 Skill 생산성 및 작업흐름 stay-within-limits

stay-within-limits

BuilderIO/skills BuilderIO/skills

여러 번의 실행 사이마다 사용량을 확인하고, 한도 근처에서 일시 중단하며, 사용 창이 비었을 때만 재개함으로써 장기 실행 에이전트 작업이 5시간 및 주간 사용 한도 내에 유지되도록 합니다.

...모든 것을 확장하십시오
0
업데이트 된 시간 2026년 9월 6일

한도 내 유지

장시간 실행되는 에이전트 작업을 현재 5시간 및 주간 사용량 창 내에 유지하십시오. 대용량 작업을 시작하기 전과 병렬 하위 에이전트 파도 간에 사용량을 확인하십시오. 활성 5시간 또는 주간 한도가 95% 이상인 경우, 창이 안전히 계속 진행할 수 있을 만큼 비워질 때까지 새 작업을 일시 중단하십시오.

핵심 루프

  1. 제한된 범위의 작업 파도를 실행하십시오. 사용자나 호스트가 다른 조절치를 지정하지 않는 한, 기본적으로 병렬 하위 에이전트는 최대 3개까지 허용합니다.
  2. 파도가 완료될 때까지 기다리십시오. 예산을 아끼기 위해 진행 중인 하위 에이전트를 중단하지 마십시오; 이는 일반적으로 작업 손실로 이어집니다.
  3. 호스트의 사용량/예산 도구를 사용하여 현재 5시간 및 주간 사용량을 확인하십시오.
  4. 두 창 중 하나가 95% 이상인 경우, 작업 시작을 중지하고 관련 창이 해소될 때를 대비해 자체 완결형 재개 일정을 잡으십시오.
  5. 재개 시, 계속하기 전에 실제 창 또는 차단 상태를 다시 확인하십시오. 경과된 실제 시간만 신뢰하지 마십시오.

사용량 신호

사용 가능한 경우 제1자 호스트 사용량 도구를 우선으로 사용하십시오. Claude Code에서는 다음을 사용하십시오:

npx -y ccusage@latest blocks --active --json

JSON을 사용하여 활성 차단 시작 시간, 현재 비용 또는 비율, 그리고 남은 시간을 식별하십시오. 깨어날 때, 활성 차단 시작 타임스탬프를 이전 것과 비교하십시오; 새 타임스탬프는 "충분한 시간이 지남"보다 더 강력한 증거입니다.

도구가 직접적인 비율 대신 비용을 보고하는 경우, 알려진 현재 계정 한도를 통해 변환하십시오. Claude Max 스타일의 5시간 블록의 경우, 일부 사용자는 약 $500-550의 조기 경고 임계값을 선호합니다; 이를 보편적 규칙이 아닌 사용자 구성 안전장치로 취급하십시오. 기본 중지 규칙은 여전히 활성 5시간 또는 주간 한도의 95%입니다.

일시 중단 및 재개

wake/resume 도구를 사용할 수 있는 경우, 다음에 대한 깨우기 일정을 잡으십시오:

min(3600, secondsUntilWindowClears)

런타임이 60-3600초로 깨우기 지연을 제한하는 경우, 더 긴 대기 시간을 위해 깨우기를 연결하십시오. 각 깨우기는 사용량을 다시 확인하고, 여전히 예산을 초과하면 재일정하며, 창이 임계값 아래로 안전하게 떨어질 때만 계속하십시오.

깨우기 프롬프트를 자체 완결형으로 만드십시오. 다음을 포함하십시오:

  • 남은 계획.
  • 확인 후 재일정 규칙.
  • 95% 임계값 및 파도 조절치.
  • 실행할 정확한 사용량 명령어 또는 호스트 사용량 도구.
  • 사용 가능한 경우 이전 블록/창 식별자.
  • 다음 검증 단계.
  • 위임이 재개될 경우, 범위, 검증 명령어 및 중지 조건을 포함하는 다음 파도의 인계 패킷.

대기 메커니즘 선택

  • 에이전트가 미래 재개 시 첨부할 지침이 필요한 경우, wake/resume 도구를 사용하십시오.
  • 고정 타이머와 프로세스가 직접 관찰할 수 있는 사항에는 백그라운드 수면 또는 감시자를 사용하십시오.
  • 반복적인 새 세션 작업에만 크론 또는 반복 일정을 사용하십시오.

백그라운드 작업이나 하위 에이전트 완료와 같이 호스트가 알림을 제공할 사항에 대해 짧은 간격 폴링을 피하십시오. 예산 일시 중단의 경우, 긴 수면 후 프롬프트 캐시 미스가 허용됩니다; 한도 유지가 더 중요합니다.

보고

일시 중단 시, 어떤 창이 임계값을 초과했는지, 관측된 사용량, 다음 확인을 일정한 시간 또는 예상 시간, 그리고 남은 작업을 사용자에게 알려주십시오. 대화의 흐름에 의존하지 않고 다음 턴에서 재개할 수 있도록 깨우기 프롬프트에 충분한 상태를 유지하십시오.

GitHub에서 보기
---
name: stay-within-limits
description: Keep long-running agent work within 5-hour and weekly usage limits by checking usage between waves, pausing near the cap, and resuming only when the window is clear.
---

# Stay Within Limits

Keep long-running agent work inside the current 5-hour and weekly usage windows.
Check usage before launching substantial work and between waves of parallel
subagents. If an active 5-hour or weekly limit is at or above 95%, pause new
work until the window is clear enough to continue safely.

## Core Loop

1. Run a bounded wave of work. Default to at most 3 parallel subagents unless
   the user or host gives a different throttle.
2. Wait for the wave to finish. Do not interrupt in-flight subagents just to
   save budget; that usually loses work.
3. Check current 5-hour and weekly usage with the host's usage/budget tool.
4. If either window is at or above 95%, stop launching work and schedule a
   self-contained resume when the relevant window should clear.
5. On resume, re-check the real window or block before continuing. Do not trust
   elapsed wall-clock time alone.

## Usage Signals

Prefer a first-party host usage tool when available. In Claude Code, use:

```sh
npx -y ccusage@latest blocks --active --json
```

Use the JSON to identify the active block start, current cost or percentage, and
time remaining. On wake, compare the active block start timestamp with the
previous one; a new timestamp is stronger evidence than "enough time passed."

If the tool reports cost instead of a direct percentage, convert through the
current account limit when known. For Claude Max-style 5-hour blocks, some users
prefer an earlier caution threshold around $500-550; treat that as a
user-configured guardrail, not a universal rule. The default stop rule is still
95% of the active 5-hour or weekly limit.

## Pausing And Resuming

When a wake/resume tool is available, schedule a wakeup for:

```txt
min(3600, secondsUntilWindowClears)
```

If the runtime clamps wake delays to 60-3600 seconds, chain wakeups for longer
waits. Each wakeup should re-check usage, reschedule if still over budget, and
continue only when the window is safely below the threshold.

Make wake prompts self-contained. Include:

- The remaining plan.
- The check-then-reschedule rule.
- The 95% threshold and wave throttle.
- The exact usage command or host usage tool to run.
- The previous block/window identifier when available.
- The next verification steps.
- The next wave's handoff packets, including scope, verification commands, and
  stop conditions, if delegation will resume.

## Choosing The Wait Mechanism

- Use a wake/resume tool when the agent needs instructions attached to the
  future resume.
- Use a background sleep or watcher for fixed timers and things a process can
  observe directly.
- Use cron or recurring schedules only for recurring fresh-session work.

Avoid short-interval polling for things the host will notify you about, such as
background task or subagent completion. For budget pauses, a prompt-cache miss
after a long sleep is acceptable; preserving the limit matters more.

## Reporting

If you pause, tell the user which window is over threshold, the observed usage,
when you scheduled or expect the next check, and what work remains. Keep enough
state in the wake prompt that the next turn can resume without relying on
conversation momentum.

모든 파일

0개 파일

stay-within-limits 설치

스킬 파일을 다운로드하여 .claude/skills/ 디렉토리에 추출하세요.

ZIP 다운로드

저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.

git clone https://github.com/BuilderIO/skills/tree/main/skills/stay-within-limits # Copy SKILL.md to your .claude/skills/ directory

복사 복사
빠른 설정: 스킬 폴더를 .claude/skills/에 복사하세요. Claude가 자동으로 감지하고 사용합니다.
저장소 BuilderIO/skills

관련 스킬

notion-automation
업데이트 된 시간 2026년 6월 29일
airtable-automation
업데이트 된 시간 2026년 6월 29일
seo-programmatic
업데이트 된 시간 2026년 6월 29일
fairdb-backup-manager
업데이트 된 시간 2026년 6월 29일
OR