sync-local-token

Refresh GTO Wizard tokens from Supabase and write them to .tokens.json.

7|2|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/a00012025/ai-poker-wizard --skill sync-local-token
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sync-local-token
Source: https://github.com/a00012025/ai-poker-wizard/tree/main/.claude/skills/sync-local-token
Command: npx skills add https://github.com/a00012025/ai-poker-wizard --skill sync-local-token

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Syncs local .tokens.json with admin's GTO Wizard token from Supabase DB to keep test environments valid and aligned with admin changes or expirations.

Core Features & Use Cases

  • Token synchronization: pulls admin refresh/access tokens from the database and updates local .tokens.json.
  • Regression-test readiness: ensures tests run with valid credentials after token expiration or admin updates.
  • Safe operation: isolates credential handling to a controlled script and writes tokens atomically to disk.

Quick Start

Run the included script to refresh tokens from the DB and update .tokens.json.

Frequently Asked Questions about sync-local-token

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync local GTO Wizard tokens from a Supabase database for Python tests?

Sync local GTO Wizard tokens from Supabase by running a Python script that reads ADMIN_CHAT_ID, fetches the admin refresh token, refreshes it to an access token, and writes both to .tokens.json.

Why do my regression tests fail after the admin updates their token via /settoken?

Regression tests fail because the local .tokens.json file becomes outdated. Sync local tokens from the Supabase admin database to update your environment with valid credentials.

How do I fix GTO Wizard token expiration errors in my local test environment?

Fix GTO Wizard token expiration errors by syncing local tokens. The script pulls the admin refresh token from Supabase, generates a fresh access token, and updates .tokens.json.

Do I need Python and environment variables to sync tokens from Supabase?

Yes, you need Python with database access and the ADMIN_CHAT_ID environment variable configured to fetch the correct admin credentials and sync local tokens.

What is the best way to keep .tokens.json valid for automated regression testing?

Keep .tokens.json valid by syncing it with the admin's Supabase database. This isolates credential handling and atomically writes refreshed tokens to disk for test readiness.

Can I manually update local tokens without fetching them from the Supabase database?

Manual updates bypass the controlled sync process. Fetching tokens directly from the Supabase database ensures your local environment matches the admin's current valid credentials.