usage-guard

Monitors Claude Code usage and stops before the window threshold is reached.

89|7|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/nikhilsitaram/claude-caliper --skill usage-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: usage-guard
Source: https://github.com/nikhilsitaram/claude-caliper/tree/main/skills/usage-guard
Command: npx skills add https://github.com/nikhilsitaram/claude-caliper --skill usage-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes scripts (resource) components.

What problem does it solve?

This Skill prevents Claude Code sessions from getting rate-limited mid-task by watching usage-window consumption and stopping cleanly before the threshold.

Core Features & Use Cases

  • Continuous work loop: Breaks a task into checkpoints, updates progress, and rechecks usage after each chunk.
  • 5-hour and 7-day protection: Guards the default rolling block or the weekly cap with the same control flow.
  • Queue and resume: Can stop at the threshold, package the remaining work, and schedule continuation into the next window.
  • Safety backstop: Records an interrupted run so a rate-limit failure can be resumed instead of lost.

Quick Start

Use the usage-guard skill to keep working on my current task, stop at 99 percent of the current usage window, and queue the remaining work if needed.

Frequently Asked Questions about usage-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent Claude Code from hitting rate limits during autonomous work?

To prevent Claude Code rate limits during autonomous work, use a monitoring skill that tracks consumption and stops cleanly before the threshold. It breaks long-running tasks into checkpoints and rechecks usage after each chunk.

Can I queue and resume Claude Code tasks across multiple usage windows?

Yes, you can queue and resume Claude Code tasks across multiple usage windows. The skill stops at the threshold, packages remaining work into a refreshed queue state file, and records interruption breadcrumbs for safe continuation into the next window.

Do I need jq installed to monitor Claude Code usage limits?

Yes, you need jq installed to monitor Claude Code usage limits with this skill. jq is a required dependency used by the scripts to parse and update the queue state file and checkpoint data.

What is the best way to guard both 5-hour and 7-day Claude Code usage caps?

The best way to guard both 5-hour and 7-day Claude Code usage caps is to apply threshold branching control flow. The same monitoring loop protects the default rolling block and the weekly cap by stopping before the threshold.

How does checkpoint-based usage monitoring work for long-running Claude Code sessions?

Checkpoint-based usage monitoring works by breaking a continuous work loop into chunks, updating progress, and rechecking usage-window consumption after each chunk. It applies threshold branching to stop cleanly before hitting the rate limit.