db-query

Query Supabase read-only for users, hand histories, and API cache entries.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a safe, read-only interface for inspecting the AI Poker Wizard Supabase database so developers and operators can answer operational questions without risking data modification or exposing full credentials.

Core Features & Use Cases

  • Read-only access: Guidance and examples for executing SELECT queries against users, hand histories, and the GTO API cache while explicitly blocking any write statements.
  • Safety and privacy: Built-in rules to refuse destructive SQL, mask sensitive tokens, and avoid leaking secrets when displaying results.
  • Use cases: Debug user bindings and token status, count hand history uploads per chat, and gather cache statistics for monitoring or regression troubleshooting.

Quick Start

Ask the assistant to list all users with user_id, username, is_active, has_token, and created_at using a read-only query.

Frequently Asked Questions about db-query

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

FAQPage Schema
How do I run read-only SQL queries against a Supabase database?

To run read-only SQL queries against a Supabase database, you can use asyncpg with a connection string. This approach executes SELECT statements to retrieve data while explicitly blocking any write statements to ensure database safety.

What is the best way to inspect GGPoker hand histories in a backend database?

Inspecting GGPoker hand histories in a backend database is best done through read-only SQL queries. This allows you to count hand history uploads per chat and retrieve specific records without risking accidental data modification.

Can I safely debug user tokens and API cache entries without exposing credentials?

You can safely debug user tokens and API cache entries by enforcing read-only access and masking full tokens in query outputs. This prevents destructive SQL execution and avoids leaking sensitive credentials during database inspection.

How do I generate usage reports for user bindings and API cache statistics?

Generating usage reports for user bindings and API cache statistics involves querying the database for user activity and cache entries. You retrieve fields like user_id, is_active, and has_token to monitor status and troubleshoot regressions.

Does asyncpg block write statements when querying Supabase for operational insights?

Yes, when querying Supabase for operational insights, the asyncpg connection enforces a block on write statements. This ensures that only SELECT queries are executed, preventing any destructive modifications to the database.

What are the limitations of using read-only queries for database debugging?

The primary limitation of read-only queries for database debugging is the inability to modify or update records. While you can inspect users, hand histories, and API cache entries, any troubleshooting requiring data correction must be done through separate write operations.