chess-teacher-db

Inspect Postgres tables read-only with row counts, uniqueness checks, and schema diffs.

1|Updated Apr 30, 2026
One-click install
npx skills add https://github.com/daniel-brus/chess_teacher --skill chess-teacher-db-daniel-brus
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: chess-teacher-db
Source: https://github.com/daniel-brus/chess_teacher/tree/main/.agents/skills/chess-teacher-db
Command: npx skills add https://github.com/daniel-brus/chess_teacher --skill chess-teacher-db-daniel-brus

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? It answers questions about the chess_teacher Postgres database—row counts, data quality, column uniqueness, and schema drift—without writing SQL by hand or risking accidental writes. ## Core Features & Use Cases - Read-only validation queries: Run row counts, filtered reads, existence checks, all-rows-match conditions, and column uniqueness checks via scripts/tools/agent_db_query.py with --json output. - Metadata-driven discovery: Domains and tables are discovered at runtime from metadata.yml files in the installed chess_teacher package, so new modules need no skill changes. - Environment-aware access: Uses Doppler configs (dev_local for local Compose Postgres) and delegates production queries to the chess-teacher-vps db-* commands when prod Postgres is firewalled. - Use Case: When a user asks "are account_id and platform_game_id unique in raw_games?", the agent runs the unique command against pipelines/ingestion and summarizes the result in plain language. ## Quick Start Ask the agent to check how many rows are in a chess_teacher database table or whether a set of columns is unique, and it will run the read-only inspection script for you.

Frequently Asked Questions about chess-teacher-db

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

FAQPage Schema
How do I check row counts in a Postgres table?▼

Run the agent_db_query.py script with the count command, passing the domain and table key from metadata.yml. Wrap it in doppler run --config dev_local so credentials load, and always pass --json for structured output.

How do I check if columns are unique in a Postgres table?▼

Use the unique command with --columns listing the columns to test, for example account_id,platform_game_id. The result reports is_unique and duplicate_group_count, with sample duplicate groups when duplicates exist.

Can I query the production Postgres database from my laptop?▼

Usually no, because production Postgres on the VPS is firewalled. Use the chess-teacher-vps skill's db-* commands instead, which kubectl-exec the same query script inside the streamlit container.

Why does the script fail with ModuleNotFoundError: chess_teacher?▼

The chess_teacher package is not installed in the active environment. Activate the project .venv and run pip install -r requirements-dev.txt from the repository root before running the script.

Can this skill insert or update rows in the database?▼

No, the skill is strictly read-only. It forbids insert, merge, overwrite, update_where, delete_where, truncate, drop, and raw psql, and the script rejects semicolons and write keywords in filter expressions.