<< All versions
Skill v1.0.0
currentLLM-judged scan90/100arthur-ai/arthur-engine/arthur-onboard-platform-token
──Details
PublishedOctober 21, 2026 at 11:41 PM
Content Hashsha256:714fe6241c436f6a...
Git SHA8a00f36f091b
──Files
Files (1 file, 2.2 KB)
SKILL.md2.2 KBactive
SKILL.md · 57 lines · 2.2 KB
name: arthur-onboard-platform-token description: Arthur onboarding helper — Refresh Arthur Platform OAuth2 token using arthur_client. Reads CLIENT_ID/SECRET from .arthur-engine.env, writes ARTHUR_PLATFORM_TOKEN back to state. allowed-tools: Bash version: 1.0.0
Arthur Onboard — Platform Token Refresh
Goal: Write a fresh ARTHUR_PLATFORM_TOKEN to .arthur-engine.env using stored service account credentials.
bash
python3 -c "import arthur_client" 2>/dev/null || pip install arthur-client -q
bash
ARTHUR_PLATFORM_URL=$(grep '^ARTHUR_PLATFORM_URL=' .arthur-engine.env 2>/dev/null | cut -d= -f2-)CLIENT_ID=$(grep '^ARTHUR_PLATFORM_CLIENT_ID=' .arthur-engine.env 2>/dev/null | cut -d= -f2-)CLIENT_SECRET=$(grep '^ARTHUR_PLATFORM_CLIENT_SECRET=' .arthur-engine.env 2>/dev/null | cut -d= -f2-)if [ -z "$CLIENT_SECRET" ]; thenecho "TOKEN_REFRESH=MISSING_CREDENTIALS"elseexport _AE_URL="$ARTHUR_PLATFORM_URL"export _AE_CLIENT_ID="$CLIENT_ID"export _AE_CLIENT_SECRET="$CLIENT_SECRET"ARTHUR_PLATFORM_TOKEN=$(python3 - <<'PYEOF'import sys, ostry:from arthur_client.auth import ArthurClientCredentialsAPISession, ArthurOIDCMetadatametadata = ArthurOIDCMetadata(os.environ["_AE_URL"])session = ArthurClientCredentialsAPISession(client_id=os.environ["_AE_CLIENT_ID"],client_secret=os.environ["_AE_CLIENT_SECRET"],metadata=metadata,)print(session.token()["access_token"])except Exception as e:print(f"ERROR: {e}", file=sys.stderr)sys.exit(1)PYEOF)if [ -n "$ARTHUR_PLATFORM_TOKEN" ]; thengrep -v '^ARTHUR_PLATFORM_TOKEN=' .arthur-engine.env > /tmp/ae_env_tmp && mv /tmp/ae_env_tmp .arthur-engine.envecho "ARTHUR_PLATFORM_TOKEN=$ARTHUR_PLATFORM_TOKEN" >> .arthur-engine.envecho "TOKEN_REFRESH=OK"elseecho "TOKEN_REFRESH=FAILED"fifi
TOKEN_REFRESH=OK→ token acquired and saved to.arthur-engine.env; exit this skillTOKEN_REFRESH=MISSING_CREDENTIALS→CLIENT_IDorCLIENT_SECRETnot in state; caller must invokearthur-onboard-platform-accessfirstTOKEN_REFRESH=FAILED→arthur_clientraised an error (invalid credentials, network error, etc.); caller should re-invokearthur-onboard-platform-accessto re-authenticate