From 7ff9a6579288ef216d4e31d4f5b4db5b73adbda7 Mon Sep 17 00:00:00 2001 From: Gavriel Cohen Date: Tue, 3 Feb 2026 21:03:35 +0200 Subject: [PATCH] Update setup skill to use claude setup-token for auth Replace manual credential extraction with the proper CLI command. Co-Authored-By: Claude Opus 4.5 --- .claude/skills/setup/SKILL.md | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.claude/skills/setup/SKILL.md b/.claude/skills/setup/SKILL.md index 95e6da1..a92520e 100644 --- a/.claude/skills/setup/SKILL.md +++ b/.claude/skills/setup/SKILL.md @@ -80,23 +80,21 @@ Ask the user: ### Option 1: Claude Subscription (Recommended) -Ask the user: -> Want me to grab the OAuth token from your current Claude session? +Tell the user: +> Open another terminal window and run: +> ``` +> claude setup-token +> ``` +> A browser window will open for you to log in. Once authenticated, the token will be displayed in your terminal. Either: +> 1. Paste it here and I'll add it to `.env` for you, or +> 2. Add it to `.env` yourself as `CLAUDE_CODE_OAUTH_TOKEN=` + +If they give you the token, add it to `.env`: -If yes: ```bash -TOKEN=$(cat ~/.claude/.credentials.json 2>/dev/null | jq -r '.claudeAiOauth.accessToken // empty') -if [ -n "$TOKEN" ]; then - echo "CLAUDE_CODE_OAUTH_TOKEN=$TOKEN" > .env - echo "Token configured: ${TOKEN:0:20}...${TOKEN: -4}" -else - echo "No token found - are you logged in to Claude Code?" -fi +echo "CLAUDE_CODE_OAUTH_TOKEN=" > .env ``` -If the token wasn't found, tell the user: -> Run `claude` in another terminal and log in first, then come back here. - ### Option 2: API Key Ask if they have an existing key to copy or need to create one.