Token Usage Optimizer
Analysis
The usage-monitoring purpose is coherent, but the skill handles and modifies Claude OAuth credentials and can run recurring/implicit Claude checks, so it needs careful review before use.
Findings (4)
Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.
Checks for instructions or behavior that redirect the agent, misuse tools, execute unexpected code, cascade across systems, exploit user trust, or continue outside the intended task.
echo "ping" | claude --quiet >/dev/null 2>&1 || true
A normal usage check silently invokes the Claude CLI with a prompt-like input when the CLI is present, before extracting a fresh token from the local credentials file.
openclaw cron add --name "claude-token-refresh" --every 30m --announce --message "Запусти {baseDir}/scripts/auto-refresh-cron.sh"The documentation recommends a recurring OpenClaw cron task that runs the token health-check script every 30 minutes.
source "$TOKEN_FILE"
The token file is executed as shell code rather than parsed purely as data. The setup script creates this file, but unexpected shell syntax in it would execute when checks run.
Checks whether tool use, credentials, dependencies, identity, account access, or inter-agent boundaries are broader than the stated purpose.
creds_file = os.path.expanduser('~/.claude/.credentials.json') ... creds['claudeAiOauth']['accessToken'] = "$ACCESS_TOKEN" ... creds['claudeAiOauth']['refreshToken'] = "$REFRESH_TOKEN" ... json.dump(creds, f, indent=2)The script writes stored OAuth access and refresh tokens into the user's Claude CLI credential file, which is account-level authentication material and can affect later Claude CLI sessions.
