production-db-readonly
/production-db-readonly
Odpytuje produkcyjną bazę MySQL lub PostgreSQL tylko do odczytu, przez konektor projektu, w dialekcie tej bazy, do walidacji danych.
- Autor
- afonsoalrocha ↗
- Repozytorium
- skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 12.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 5
- Skrypty
- 1
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 12.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/readonly_guard.py
Co robi i kiedy
Odpytuje produkcyjną bazę MySQL lub PostgreSQL tylko do odczytu, przez konektor projektu, w dialekcie tej bazy, do walidacji danych.
Wyzwalacze z opisu
Oryginalny opis (EN)
Use when querying a production transactional database (MySQL or PostgreSQL) for deep validation, source-of-truth checks or data not yet in the lake. Read-only, through the project's connector, in the database's own dialect.
Jak działa
- Invariants
- Connector contract (what the project module should expose)
- Routes
Podgląd SKILL.md
--- name: production-db-readonly description: "Use when querying a production transactional database (MySQL or PostgreSQL) for deep validation, source-of-truth checks or data not yet in the lake. Read-only, through the project's connector, in the database's own dialect." --- # Production databases, read-only The transactional database is the last level of the validation hierarchy (report -> mart -> staging -> source system). Go there when upper layers disagree or the data has not landed in the lake yet. It serves live traffic: every query is a guest. ## Invariants - Read-only. No `INSERT/UPDATE/DELETE/DDL`; the connector refuses non-read statements (`scripts/readonly_guard.py`), and the DB user should be read-only too: a first-verb check never replaces database grants. - Prefer a read replica over the primary; know which one feeds the BI tool you are reconciling against. - Connect only through the project's connector module; never ad-hoc drivers, never an MCP or GUI session for scripted work. - Credentials from environment variables or a secret store; never in code, logs or notebooks; never print them. - Write the query in the database's own dialect (route below), never Spark/Trino syntax. - Apply skill `sql-performance` before every query: project, filter by indexed ranges, aggregate in the engine. - `EXPLAIN` before any heavy read; `EXPLAIN ANALYZE` runs the query, so weigh production impact first. - Set a statement timeout and bounded result size on every session. - Replication lag is real: when replica and primary differ, record the instant compared. - Save the query script with the request for reproducibility. ## Connector contract (what the project module should expose) | Function | Purpose | |----------|---------| | `execute_sql(query, params, target)` | parameterized SELECT, returns a DataFrame | | `list_databases(target)` / `list_schemas(...)` / `list_tables(...)` | discovery without scanning | | `get_table_info(table, ...)` | columns, types, keys, comments | `target` is an alias (e.g. `primary`, `replica`) resolved from configuration, never a host literal in analysis code. ## Routes Read only the reference for the task. | If the task is... | Read | |-------------------|------| | MySQL: dialect notes, EXPLAIN, session timeouts, metadata queries | `references/mysql.md` | | PostgreSQL: dialect notes, EXPLAIN, `statement_timeout`, read-only transactions | `references/postgres.md` | | Unstable connection (DNS, VPN, first attempt timeouts) | `references/connectivity.md` | | Guarding a connector against write statements | `scripts/readonly_guard.py` |
Pliki w paczce (5)
- SKILL.md 3 KB
- references/connectivity.md 1 KB
- references/mysql.md 1 KB
- references/postgres.md 1 KB
- scripts/readonly_guard.py 2 KB
Wersje
W bazie nie ma innych skilli o nazwie production-db-readonly.
Migawka bazy z 13.11.2026 · wersja paczki 9774140ea4db (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 2 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100create-readonly-db-role
Konfiguruje dla agentów dostęp tylko do odczytu do PostgreSQL, uruchamiany wyłącznie komendą /create-readonly-db-role. - 100fiftyone-generate-data-lens-connector
Generuje konektor Data Lens ze schematu zewnętrznej bazy danych, np. PostgreSQL, BigQuery, Databricks czy MySQL, by przeglądać dane w aplikacji FiftyOne. - 100sql-expert
Wspiera projektowanie, zapytania, optymalizację i administrację baz SQL w PostgreSQL, MySQL i SQL Server: indeksy, wydajność, transakcje i współbieżność. - 86database-query
Pisze zapytania SQL do zewnętrznych baz SQLite, MySQL i PostgreSQL, eksportuje wyniki i analizuje strukturę tabel. - 100readonly-db-query
Wykonuje bezpieczne, tylko do odczytu zapytania do bazy Postgres, żeby sprawdzić liczbę lub stan danych bez ryzyka zmian. - 92write-script-mysql
Prowadzi przez pisanie zapytań MySQL zgodnie z konwencjami tej platformy.