Skill: chunhualiao/openclaw-claude-usage (version 1.0.1)

--- name: claude-usage description: Check Claude Max plan usage limits by launching Claude Code and running /usage. Use when the user asks about Claude plan usage, remaining quota, rate limits, or sends /claude_usage. --- # Claude Usage Check Claude Max subscription usage by launching Claude Code interactively. ## Requirements - `expect` must be installed (available at `/usr/bin/expect` on macOS) - Claude Code CLI must be installed and authenticated ## Procedure Use `expect` to automate the interactive TUI (the `/usage` command is a terminal UI, not a simple CLI): 1. Run the expect script to launch Claude Code and execute `/usage`: ```bash expect -c ' spawn claude expect "Welcome" send "/usage\r" expect "Show plan usage" sleep 1 send "\r" expect "Resets" ' ``` 2. Parse the output for these metrics: - **Current session**: Look for "Current session" line with percentage and reset time - **Current week (all models)**: Look for "Current week (all models)" with percentage and reset date - **Current week (Sonnet only)**: Look for "Current week (Sonnet only)" with percentage - **Extra usage**: Look for "Extra usage" line 3. Strip ANSI escape codes from output before parsing 4. Format and relay the metrics to the user ## Example Output The expect script returns something like: ``` Current session ██████████░░░░░░░░░░░░░░░░░ 21% used Resets 5:59pm (America/Los_Angeles) Current week (all models) ████████████████████████░░░░░░░░░░░░░ 28% used Resets Feb 21 at 6am (America/Los_Angeles) Current week (Sonnet only) █████████████████████████░░░░░░░░░░░░ 29% used Resets Feb 21 at 7am (America/Los_Angeles) Extra usage Extra usage not enabled • /extra-usage to enable $50 free extra usage · /extra-usage to enable ``` ## Fallback If `expect` is not available, fall back to: 1. `claude auth status` - shows subscription type (Max/Pro) 2. `~/.claude/stats-cache.json` - shows local session token counts (limited data)

path: CHANGELOG.md
content: # Changelog

All notable changes to this skill will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2026-02-16

### Added
- Initial release
- Interactive Claude Code usage checking
- Parse and relay Claude Max subscription metrics
- Support for session and weekly usage tracking


path: STATUS.json
content: skill: claude-usage
stage: competitive
competitivePosition: behind
competitiveAction: deprecate
auditDate: 2026-02-17
auditBatch: comp-rose-releaser
notes: Superseded by native /usage command in Claude Code, ccusage CLI (full analytics), CC Usage MCP, and token-budget-monitor. PTY choreography approach is brittle and adds minimal value. Recommend archiving in favor of ccusage integration or expanding token-usage skill.

path: skill.yml
content: name: claude-usage
description: Check Claude Max plan usage limits by launching Claude Code and running /usage. Use when the user asks about Claude plan usage, remaining quota, rate limits, or sends /claude_usage.
version: 1.0.0
author: openclaw-community
category: tools
tags:
  - claude
  - usage
  - monitoring
  - cli
requirements:
  - Claude Code CLI installed and authenticated
  - pty support for interactive sessions


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: suspicious | SkillSpector: clean (LOW)