Community编程与开发github.com

BuilderIO/stay-within-limits

Use when long-running or parallel agent work must respect 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 是什么?

stay-within-limits is a Claude Code agent skill that use when long-running or parallel agent work must respect 5-hour and weekly usage limits by checking usage between waves, pausing near the cap, and resuming only when the window is clear.

兼容平台Claude Code~Codex CLI~Cursor
npx skills add https://github.com/BuilderIO/skills/tree/main/skills/stay-within-limits

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

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:

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:

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.

Individual skills in this repo

This repo contains 10 individual skills — each has its own dedicated page.

BuilderIO/adding-a-skill

Use in the BuilderIO/skills repo whenever adding, updating, publishing, documenting, validating, or wiring a public skill. Covers the repo-local skill files, root catalog docs, plugin metadata, @agent-native/skills dynamic install path, optional managed AGENTS/CLAUDE instruction blocks in ../agent-native/framework, and generated/synced Plan skill gotchas.

BuilderIO/agent-watchdog

Use when asked to watch, babysit, audit, review, compare, or fix another agent's work from a Codex session ID, Claude Code session/transcript, chat/thread link, PR, branch, log, or pasted run summary. Monitor until the other agent is done or blocked, reconstruct what the user asked, inspect what the agent actually changed and verified, report gaps, and optionally make scoped fixes when the user authorizes repair.

BuilderIO/efficient-fable

Use when running Claude Fable on codebase-heavy or token-heavy work and the user wants Fable to orchestrate research, coding, and testing while cheaper subagents do bounded heavy lifting.

BuilderIO/efficient-frontier

Apply the same orchestration as `/efficient-fable` to any high-cost frontier model: delegate research, coding, and testing to cheaper subagents while keeping planning, synthesis, and final review with the expensive model.

BuilderIO/plan-arbiter

Use when asked to compare, cross-review, merge, judge, choose, or arbitrate competing plans from multiple agents such as Codex and Claude Code; when given two or more proposed plans, session IDs, transcripts, plan documents, PR descriptions, or pasted strategies; or when the user wants one recommended execution plan after agents review each other's proposals.

BuilderIO/plow-ahead

Use when the user explicitly wants autonomous progress without routine clarification stops: "plow ahead", "do not stop", "use your best judgment", "keep going until done", "finish while I am away", "do not ask questions unless truly blocked", or similar. Convert ordinary ambiguity into stated assumptions, proceed through implementation and validation, stop only for true blockers, and end with a clear recap of decisions, changes, verification, and residual risk.

BuilderIO/quick-recap

Use when adding or following the red/yellow/green final status block convention for agent responses, especially by installing managed AGENTS.md or CLAUDE.md instructions.

BuilderIO/read-the-damn-docs

Use when implementing, integrating, upgrading, debugging, or answering anything involving third-party APIs, libraries, frameworks, CLIs, cloud services, model/provider SDKs, fast-moving product behavior, user requests for latest/current/official behavior, unfamiliar repo docs/specs, errors that may indicate API drift, or high-stakes auth, security, billing, data, migration, deployment, compliance, or privacy behavior. Forces Codex to web-search for current official docs and read primary docs before assuming from memory.

BuilderIO/visual-plan

Turn ordinary text plans into rich interactive visual plans with diagrams, file maps, annotated code, open questions, and UI/prototype review when useful.

BuilderIO/visual-recap

Turn a PR, branch, commit, or git diff into an interactive visual recap with diagrams, file maps, API/schema summaries, annotated diffs, and focused review notes.

相关技能