Check AI CLI usage/quota for Claude Code, OpenAI Codex, Google Gemini CLI, and Z.AI. Use when user asks about remaining quota, usage limits, rate limits, or wants to check how much capacity is left.
Checks remaining quota and usage for AI coding assistants (Claude Code, OpenAI Codex, Gemini CLI, Z.AI). Use when users ask about usage limits, rate limits, or remaining capacity before starting tasks.
/plugin marketplace add cruzanstx/daplug/plugin install daplug@cruzanstxThis skill is limited to using the following tools:
Check remaining quota and usage for AI coding assistants: Claude Code, OpenAI Codex, Gemini CLI, and Z.AI.
Uses the cclimits npm package.
# Check all tools (detailed)
npx cclimits
# Compact one-liner (5h window)
npx cclimits --oneline
# Compact one-liner (7d window)
npx cclimits --oneline 7d
# Check specific tools
npx cclimits --claude
npx cclimits --codex
npx cclimits --gemini
npx cclimits --zai
# JSON output (for scripting)
npx cclimits --json
Credentials are auto-discovered from these locations:
| Tool | Location |
|---|---|
| Claude | ~/.claude/.credentials.json (Linux) or macOS Keychain |
| Codex | ~/.codex/auth.json |
| Gemini | ~/.gemini/oauth_creds.json (auto-refreshes) |
| Z.AI | $ZAI_KEY or $ZAI_API_KEY environment variable |
If credentials are missing, run the corresponding CLI tool to authenticate:
claude # Login to Claude Code
codex login # Login to OpenAI Codex
gemini # Login to Gemini CLI
export ZAI_KEY=your-key # Add to ~/.zshrc
Most tools use rolling windows:
| Icon | Meaning |
|---|---|
| ✅ | Under 70% - plenty of capacity |
| ⚠️ | 70-90% - moderate usage |
| 🔴 | 90-100% - near limit |
| ❌ | 100% or unavailable |
Gemini models are grouped by quota tier (models in same tier share quota):
| Tier | Models |
|---|---|
| 3-Flash | gemini-3-flash-preview |
| Flash | gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.0-flash |
| Pro | gemini-2.5-pro, gemini-3-pro-preview |
Claude: 4.0% (5h) ✅ | Codex: 0% (5h) ✅ | Z.AI: 1% ✅ | Gemini: ( 3-Flash 7% ✅ | Flash 1% ✅ | Pro 10% ✅ )
🔍 AI CLI Usage Checker
2025-12-31 21:30:00
==================================================
Claude Code
==================================================
🔑 Auth: Bearer token
✅ Connected
5-Hour Window:
Used: 15.2%
Remaining: 84.8%
Resets in: 3h 24m
7-Day Window:
Used: 42.0%
Remaining: 58.0%
Resets in: 4d 12h
==================================================
OpenAI Codex
==================================================
🔑 Auth: OAuth (ChatGPT)
✅ Connected
📊 Plan: pro
5h Window:
Used: 8%
Remaining: 92%
Resets in: 2h 15m
==================================================
Gemini CLI
==================================================
🔑 Auth: OAuth (Google Account)
✅ Connected
📊 Tier: standard
Quota by Tier:
3-Flash: 7.0% used, 93.0% remaining
Flash: 1.0% used, 99.0% remaining
Pro: 10.0% used, 90.0% remaining
==================================================
Z.AI (GLM-4)
==================================================
✅ Connected
Token Quota:
Used: 1%
Remaining: 99%
(10,000 / 1,000,000 tokens)
"No credentials found"
"Token expired"
claude to re-authenticatecodex logingemini (or wait for auto-refresh)API errors
npm package: cclimits GitHub: cruzanstx/cclimits
Requires: Node.js 16+ and Python 3.10+
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.