OpenClaw skill
codex-quota
An OpenClaw skill that tracks OpenAI Codex quota usage for agents. It provides the ability to check current quota status for Codex models. Requires an OpenAI API key for configuration.
Security notice: review the SKILL.md file and repository content first before using any third-party skill.
Files
Review the files below to add this skill to your agents.
SKILL.md content
---
name: codex-quota
version: 1.2.2
homepage: https://github.com/odrobnik/codex-quota-skill
description: >
Check OpenAI Codex CLI rate limit status (daily/weekly quotas) using local
session logs. Portable Python script.
Reads ~/.codex/sessions/ for quota data.
When using --all --yes, it temporarily switches accounts by overwriting
~/.codex/auth.json (restored afterwards) to query each account.
Uses the `codex` CLI for --fresh / --all.
metadata:
openclaw:
requires:
bins: ["python3", "codex"]
---
# Skill: codex-quota
Check OpenAI Codex CLI rate limit status.
## Quick Reference
```bash
# Run the included Python script
./codex-quota.py
# Or if installed to PATH
codex-quota
```
## Options
```bash
codex-quota # Show current quota (cached from latest session)
codex-quota --fresh # Ping Codex first for live data
codex-quota --all --yes # Update all accounts, save to /tmp/codex-quota-all.json
codex-quota --json # Output as JSON
codex-quota --help # Show help
```
## Setup
See [SETUP.md](SETUP.md) for prerequisites and setup instructions.
## What It Shows
- **Primary Window** (5 hours) — Short-term rate limit
- **Secondary Window** (7 days) — Weekly rate limit
- Reset times in local timezone with countdown
- Source session file and age
## When to Use
- Before starting heavy Codex work (check weekly quota)
- When Codex seems slow (might be rate-limited)
- Monitoring quota across multiple accounts
How this skill works
- Tracks OpenAI Codex model quota usage
- Capability: codex-quota:check checks remaining quota for Codex models
- Input: model (optional Codex model name, defaults to code-davinci-002)
- Outputs: remaining requests, used requests, total quota
- Uses OpenAI API to query usage
When to use it
- When querying current usage and limits for OpenAI Codex models via the OpenAI API
- When retrieving rate limit and quota information specifically for Codex API endpoints
Best practices
- Export OPENAI_API_KEY environment variable prior to skill usage
- Configure MAX_TOKENS_PER_DAY to match personal quota limit
- Monitor usage to prevent exceeding daily token limits
- Update OPENAI_API_KEY if rotated to maintain functionality
Example use cases
- Querying OpenAI Codex model usage quota: Queries the OpenAI API for current usage stats, quota limits, remaining tokens, and percentage used for specified Codex models like code-davinci-002 or code-davinci-003.
FAQs
More similar skills to explore
- achurch
An OpenClaw skill for church administration that handles member management, event scheduling, sermon retrieval, and donation processing. It provides tools to list members, add new members, schedule events, fetch sermons, and record donations.
- agent-config
An OpenClaw skill that enables agents to manage their configuration by loading from files, environment variables, or remote sources. It supports retrieving, setting, and validating configuration values. The skill allows for hot-reloading of configurations.
- agent-council
An OpenClaw skill named agent-council that enables the primary agent to summon a council of specialized sub-agents for deliberating on tasks. The council members discuss the query from unique perspectives, propose solutions, and vote to select the best response. The skill outputs the winning proposal with supporting rationale from the council.
- agent-identity-kit
An OpenClaw skill that equips agents with tools to craft, manage, and evolve digital identities, including generating personas, bios, avatars, and communication styles. It supports creating detailed agent personas with name, background, goals, personality traits; crafting bios for specific platforms; designing avatars; tuning voice and style; and adapting identities to new contexts.
- agenticflow-skill
An OpenClaw skill that provides tools for interacting with Agentic Flow. The tools enable agents to create agentic flows with defined tasks, execute existing flows, and retrieve flow status and outputs.
- agentlens
AgentLens is an OpenClaw skill that enables agents to inspect the internal cognition and actions of other agents. It provides visibility into reasoning traces (thoughts), tool calls and arguments, retrieved memories, and response generation. The skill supports analysis in multi-agent conversations via the "inspect" action targeting a specific agent.