CE

ClawExplorer

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.

Files

Review the files below to add this skill to your agents.

Security notice: review the SKILL.md file and repository content first before using any third-party skill.

SKILL.md content

---
name: codex-quota
description: Check OpenAI Codex CLI rate limit status (daily/weekly quotas) using local session logs. Portable Python script.
---

# 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        # Update all accounts, save to /tmp/codex-quota-all.json
codex-quota --json       # Output as JSON
codex-quota --help       # Show help
```

## 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

## Installation

Copy `codex-quota.py` to your path:
```bash
cp skills/codex-quota/codex-quota.py ~/bin/codex-quota
chmod +x ~/bin/codex-quota
```

## How It Works

Codex CLI logs rate limit info in every session file (`~/.codex/sessions/YYYY/MM/DD/*.jsonl`) as part of `token_count` events. This tool:

1. Finds the most recent session file
2. Extracts the last `rate_limits` object
3. Formats and displays it

## 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

What is the codex-quota skill?

codex-quota is an OpenClaw skill that provides a tool to check the remaining quota for OpenAI Codex models.

What tool does the codex-quota skill provide?

The skill provides the 'codex_quota' tool.

What does the codex_quota tool do?

The codex_quota tool returns the number of remaining requests you can make for the ada, babbage, and cushman codex models.

What parameters does the codex_quota tool accept?

The codex_quota tool accepts no parameters.

Which Codex models does the codex_quota tool track?

The codex_quota tool tracks the ada, babbage, and cushman models.

What are the triggers for the codex-quota skill?

The triggers are: 'codex quota', 'codex-quota', 'remaining quota codex'.

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.