skill-creator: description optimization requires ANTHROPIC_API_KEY with no fallback to claude -p

Resolved 💬 5 comments Opened Mar 15, 2026 by loukandr Closed Apr 17, 2026

Context

The skill-creator's description optimization workflow (scripts/run_loop.py) has an inconsistency in how it authenticates API calls. The evaluation step (run_eval.py) correctly uses claude -p which leverages Claude Code subscription auth. However, the description improvement step (improve_description.py) calls the Anthropic API directly via anthropic.Anthropic(), which requires ANTHROPIC_API_KEY to be set.

Problem

Users without an Anthropic API key cannot use the description optimization feature, even though they have a valid Claude Code subscription. The script fails with:

TypeError: "Could not resolve authentication method. Expected either api_key or auth_token to be set."

This blocks the entire optimization loop at the improvement step. The eval queries run fine (they use claude -p), but the moment the script tries to generate an improved description, it crashes.

This is a recurring blocker. Every time a user wants to optimize a skill description, they hit this wall unless they happen to have an API key configured.

Expected behavior

The improve_description.py script should use claude -p (like run_eval.py does) to leverage Claude Code subscription auth, or at minimum fall back to it when no ANTHROPIC_API_KEY is available.

Related

  • #34609 covers the opposite problem: when an API key IS present, the script silently uses it and charges the API account. Both issues stem from the same root cause — the improvement step bypasses claude -p and calls the API directly.

Environment

  • Claude Code v2.1.76
  • macOS
  • No ANTHROPIC_API_KEY set (subscription-only user)

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗