Token Usage Optimizer

SuspiciousAudited by ClawScan on May 10, 2026.

Overview

The skill largely matches its stated purpose, but it asks for Claude OAuth tokens and can read or overwrite local Claude credentials, so it needs careful review before use.

Install only if you are comfortable giving this skill Claude OAuth access and refresh tokens. Review the scripts first, especially the parts that read and write ~/.claude/.credentials.json and run the Claude CLI automatically. Prefer using a narrowly scoped, documented credential flow if available.

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.

What this means

Using the health check could change the credentials used by the local Claude CLI, potentially affecting future Claude Code sessions outside this skill.

Why it was flagged

The health-check script can overwrite the user's Claude CLI OAuth credential file with tokens from the skill's own .tokens file. That is high-impact account credential mutation for a usage-reporting skill, especially since the registry metadata declares no primary credential or required config path.

Skill content
creds['claudeAiOauth']['accessToken'] = "$ACCESS_TOKEN"
creds['claudeAiOauth']['refreshToken'] = "$REFRESH_TOKEN"
...
with open(creds_file, 'w') as f:
    json.dump(creds, f, indent=2)
Recommendation

Only use this after reviewing the scripts. The publisher should declare the credential and config-file access explicitly and avoid writing to ~/.claude/.credentials.json unless the user gives a clear, separate approval.

What this means

A normal usage check may silently run the Claude CLI, make account-authenticated activity, and potentially consume a small amount of quota.

Why it was flagged

During a usage check, the script may automatically invoke the Claude CLI and send a prompt to refresh credentials. This is account activity beyond a direct usage API request and is not clearly disclosed in the main workflow.

Skill content
echo "ping" | claude --quiet >/dev/null 2>&1 || true
Recommendation

Remove the automatic Claude prompt or require an explicit user-approved refresh command before invoking the Claude CLI.

What this means

If the local token file is tampered with, running the checker could execute unintended shell commands.

Why it was flagged

The token file is loaded as shell code rather than parsed as data. The setup script creates the file with restrictive permissions, so this is not evidence of malicious behavior, but a poisoned or malformed .tokens file could execute shell commands when the checker runs.

Skill content
source "$TOKEN_FILE"
Recommendation

Store tokens in a data format and parse them safely instead of sourcing the file as shell code.

NoteHigh Confidence
ASI10: Rogue Agents
What this means

If enabled, the skill will keep checking token health on a schedule until the cron job is removed.

Why it was flagged

The skill recommends a recurring scheduled health check. It is disclosed and purpose-aligned, but it creates ongoing background account checks using OAuth credentials.

Skill content
openclaw cron add \
  --name "claude-token-refresh" \
  --every 30m \
  --announce \
  --message "Запусти {baseDir}/scripts/auto-refresh-cron.sh"
Recommendation

Enable the cron job only if you want recurring checks, and know how to remove it if you no longer use the skill.