agentleFS
deepklaritydeepklarity/harness-kit/harness_usage_status/CLAUDE.md

harness-kit / harness_usage_status

CLAUDE.md100 starsChanged 9 months agoMITView on GitHub

A CLI tool that provides a centralized view of remaining usage quotas across multiple AI model/plan providers (subscription-based). Supports decision-making for model/task routing. Odin imports from this package optionally for quota-aware agent routing: - orchestrator.py calls _fetch_quota() which imports harness_usage_status.config and harness_usage_status.providers.registry - Quota data (usage %) is passed to the planning agent to guide agent assignment - Agents above quota_threshold (default 80%) are deprioritized for non-high-complexity tasks - If this package is not installed, Odin degrades gracefully with empty…

  • Installs packages

The file

We split this CLAUDE.md into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All endpoints, URLs, CLI paths configurable — easy to update when things change

    line 24
  2. Distinctive:

    If this package is not installed, Odin degrades gracefully with empty quota data

    line 51
  3. Distinctive:

    Keep provider integrations modular — each provider is its own module

    line 55
  4. Distinctive:

    Prefer programmatic access over browser automation

    line 56
  5. Distinctive:

    All URLs/endpoints should be configurable in YAML

    line 57
  6. Distinctive:

    Use python-fire for clean CLI interface

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

Project Purpose

A CLI tool that provides a centralized view of remaining usage quotas across multiple AI model/plan providers (subscription-based). Supports decision-making for model/task routing.

Supported Providers

CLI-based (subscription via installed CLI tools)

  • Claude Code — claude CLI for status; web API for usage (claude.ai/api/organizations/{orgId}/usage)
  • Codex (OpenAI) — codex CLI for status; web API for usage (chatgpt.com/backend-api/wham/usage)
  • Gemini — gemini CLI for status; OAuth-backed quota API

API-based (subscription via API keys)

  • MiniMax — Coding Plan /remains endpoint
  • GLM (Zhipu AI) — Monitor endpoints (/api/monitor/usage/quota/limit, etc.)

Architecture

  • python-fire CLI with quota, status, and config commands
  • Provider pattern: BaseProvider ABC with get_usage() and get_status() methods
  • Auto-registration via @register_provider decorator
  • Config-driven: ~/.config/harness_usage_status/config.yaml
  • All endpoints, URLs, CLI paths configurable — easy to update when things change

Key Files

  • src/harness_usage_status/cli.py — CLI entry point (python-fire)
  • src/harness_usage_status/providers/base.py — Provider ABC
  • src/harness_usage_status/providers/registry.py — Auto-registration
  • src/harness_usage_status/config.py — Config loading
  • src/harness_usage_status/cli_runner.py — CLI subprocess runner
  • src/harness_usage_status/models.py — UsageInfo, StatusInfo models

Commands

pip install -e ".[dev]"
pytest                                      # Run all tests
pytest tests/test_providers.py -k "claude"  # Run a single test
harness-usage-status quota
harness-usage-status quota --provider claude_code --output json

Odin Integration

Odin imports from this package optionally for quota-aware agent routing:

  • orchestrator.py calls _fetch_quota() which imports harness_usage_status.config and harness_usage_status.providers.registry
  • Quota data (usage %) is passed to the planning agent to guide agent assignment
  • Agents above quota_threshold (default 80%) are deprioritized for non-high-complexity tasks
  • If this package is not installed, Odin degrades gracefully with empty quota data

Development Guidelines

  • Keep provider integrations modular — each provider is its own module
  • Prefer programmatic access over browser automation
  • All URLs/endpoints should be configurable in YAML
  • Use python-fire for clean CLI interface
  • Output: rich tables (default) or JSON (--output json)

Gotchas

  • Each CLI-based provider requires the respective CLI tool to be installed and authenticated separately (e.g., claude CLI must be logged in for Claude Code quota)
  • Web API endpoints change without notice — all URLs are configurable in YAML for quick updates

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.