Agent skill

Studio DB

by genlayerlabs in genlayerlabs/genlayer-studio

Query Studio deployment PostgreSQL databases for transaction debugging and analytics

MITAuto-check passedDevelopment

Install Studio DB

skills CLI
$ npx skills add genlayerlabs/genlayer-studio --skill studio-db -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install genlayerlabs/genlayer-studio studio-db --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/genlayerlabs/genlayer-studio.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/studio-db .claude/skills/studio-db && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
studio-db
GitHub stars
180
Token cost
~1.3k tokens
SKILL.md length
256 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Query Studio deployment PostgreSQL databases for transaction debugging and analytics

  • Works in 3 steps: First SELECT to verify affected rows → Ask user for explicit confirmation → Prefer dev/stg for testing
  • Tasks that involve Debugging
  • SKILL.md covers Connection, Transaction Table Schema, Transaction Statuses and Other Tables, plus 3 more sections
  • Calls kubectl and psql

What it does

Studio DB is an agent skill from genlayerlabs/genlayer-studio. Query Studio deployment PostgreSQL databases for transaction debugging and analytics

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Debugging. It works with PostgreSQL. The repository describes itself as: An interactive sandbox to explore the GenLayer Protocol. The licence is MIT.

When your agent uses it

  • Tasks that involve Debugging

Example prompts

  • “/studio-db”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. First SELECT to verify affected rows
  2. Ask user for explicit confirmation
  3. Prefer dev/stg for testing

What it can do on your machine

Read from SKILL.md and the folder at commit c940729. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • kubectl
    • psql

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use kubectl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Studio DB loads about 1.3k tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 256 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~24
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from genlayerlabs/genlayer-studio at commit c940729, republished under its MIT licence (© genlayerlabs). 256 words, ~1,256 tokens.

Download SKILL.mdSave it as .claude/skills/studio-db/SKILL.md (or your agent's skills folder).
name
studio-db
description
Query Studio deployment PostgreSQL databases for transaction debugging and analytics

Studio Database Debugging

Query and debug the genlayer_state database for transaction issues.

Connection

For cluster access setup and connection workflow, see: devexp-apps-workload/.claude/skills/studio-db/SKILL.md

Quick connect (after setup):

bash
export PATH="/opt/homebrew/share/google-cloud-sdk/bin:/opt/homebrew/bin:$PATH"
DBHOST=$(kubectl get secret database-config -n <namespace> -o jsonpath='{.data.DBHOST}' | base64 -d)
DBPASSWORD=$(kubectl get secret database-password -n <namespace> -o jsonpath='{.data.DBPASSWORD}' | base64 -d)

echo "<SQL>" | kubectl run pg-query --rm -i --image=postgres:16 --restart=Never \
  --namespace=<namespace> --env="PGPASSWORD=$DBPASSWORD" -- \
  psql -h "$DBHOST" -p 5432 -U postgres -d genlayer_state -t

Transaction Table Schema

Primary table for debugging (transactions):

ColumnTypeDescription
hashVARCHAR(66)Primary key, tx identifier
statusENUMTransaction lifecycle status
from_addressVARCHARSender address
to_addressVARCHARRecipient/contract address
nonceINTEGERTx sequence number
valueINTEGERTransaction value
typeINTEGERTx type (0-3)
created_atTIMESTAMPWhen tx was created
input_dataJSONBContract call input
dataJSONBTransaction data payload
consensus_dataJSONBFinal consensus results
consensus_historyJSONBFull voting history
contract_snapshotJSONBContract state at execution
appealedBOOLEANWas tx appealed
appeal_failedINTEGERAppeal failure count
appeal_undeterminedBOOLEANAppeal resulted in undetermined
appeal_leader_timeoutBOOLEANLeader timeout during appeal
appeal_validators_timeoutBOOLEANValidators timeout during appeal
leader_timeout_validatorsJSONBValidators that timed out
worker_idVARCHARWhich worker processed tx
triggered_by_hashVARCHAR(66)Parent tx hash (for tx chains)
blocked_atTIMESTAMPWhen/if tx got blocked

Transaction Statuses

PENDING → ACTIVATED → PROPOSING → COMMITTING → REVEALING → ACCEPTED → FINALIZED
                                                        ↘ UNDETERMINED
                                                        ↘ LEADER_TIMEOUT
                                                        ↘ VALIDATORS_TIMEOUT
                                                        ↘ CANCELED

Other Tables

  • current_state: Global chain state (id, data JSONB, balance)
  • validators: Validator configs (id, address, stake, provider, model, plugin)
  • llm_providers: LLM provider configurations
  • snapshot: Compressed state snapshots (snapshot_id, state_data, transaction_data)

Common Debugging Queries

Find transaction by hash
sql
SELECT hash, status, from_address, to_address, created_at,
       consensus_data, worker_id
FROM transactions WHERE hash = '0x...';
List stuck/problematic transactions
sql
SELECT hash, status, created_at, worker_id
FROM transactions
WHERE status IN ('UNDETERMINED', 'LEADER_TIMEOUT', 'VALIDATORS_TIMEOUT')
ORDER BY created_at DESC LIMIT 20;
Transaction status distribution
sql
SELECT status, COUNT(*) as count
FROM transactions
GROUP BY status ORDER BY count DESC;
Recent transactions
sql
SELECT hash, status, from_address, created_at
FROM transactions ORDER BY created_at DESC LIMIT 10;
Transactions with appeals
sql
SELECT hash, status, appealed, appeal_undetermined, appeal_failed,
       appeal_leader_timeout, appeal_validators_timeout
FROM transactions WHERE appealed = true
ORDER BY created_at DESC LIMIT 20;
Find triggered transactions (tx chains)
sql
SELECT t1.hash as parent, t2.hash as child, t2.status
FROM transactions t1
JOIN transactions t2 ON t2.triggered_by_hash = t1.hash
WHERE t1.hash = '0x...';
Transactions by worker
sql
SELECT worker_id, status, COUNT(*)
FROM transactions
WHERE created_at > NOW() - INTERVAL '24 hours'
GROUP BY worker_id, status
ORDER BY worker_id, count DESC;
Check consensus history for a tx
sql
SELECT hash, status,
       jsonb_pretty(consensus_history) as history
FROM transactions WHERE hash = '0x...';

Write Operations

CAUTION: Before any UPDATE/DELETE:

  1. First SELECT to verify affected rows
  2. Ask user for explicit confirmation
  3. Prefer dev/stg for testing
Reset stuck transaction
sql
-- Verify first
SELECT hash, status FROM transactions
WHERE hash = '0x...' AND status = 'UNDETERMINED';

-- Then update (after confirmation)
UPDATE transactions SET status = 'PENDING' WHERE hash = '0x...';

Full Schema

Models: backend/database_handler/models.py Migrations: backend/database_handler/migration/versions/ Tx processor: backend/database_handler/transactions_processor.py

© genlayerlabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/studio-db of genlayerlabs/genlayer-studio.

Open the folder on GitHubat commit c940729

Compare with similar skills

Studio DB next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Studio DB compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Studio DB this skillgenlayerlabs/genlayer-studio180—~1.3kAutomated safety check: PassMIT
Supabase Advanced Troubleshootingjeremylongshore/tons-of-skills-marketplace2.8k—~2.8kAutomated safety check: PassMIT
Version Managementrelytcloud/pg_ducklake143—~455Automated safety check: PassMIT
Supabase Development and Debuggingsupabase/agent-skills2.7k3 repos~3.6kAutomated safety check: PassMIT
Safe SQL Executionsupabase/supabase111k—~4.2kAutomated safety check: PassApache-2.0
Golang Databaseunxed/f42412 repos~2.9kAutomated safety check: PassMIT

Similar skills

  • Supabase Advanced Troubleshooting

    jeremylongshore/tons-of-skills-marketplace

    Deep Supabase diagnostics: pgstatstatements for slow queries, lock debugging with pglocks, connection leak detection, RLS policy conflicts, Edge Function cold starts, and Realtime connection drop…

    2.8k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Version Management

    relytcloud/pg_ducklake

    Versioning, branch, and release policy (semantic versioning, branch-per-minor, tag-per-patch).

    143 GitHub stars~455 tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Official

    General Supabase skill for database, auth, Edge Functions, Realtime and storage work, plus client libraries, migrations, security audits, debugging and reading logs.

    2.7k GitHub starsUsed in 3 repos~3.6k tokens
    Backend & APIsAuto-check passed
  • Safe SQL Execution

    supabase/supabase

    Official

    A skill your agent uses whenever code will build, return, fetch, or execute SQL that runs against a user's real Postgres database — even when the request reads like an ordinary feature or bug fix…

    111k GitHub stars~4.2k tokensUpdated today
    DatabasesAuto-check passed
  • Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…

    241 GitHub starsUsed in 2 repos~2.9k tokens
    DatabasesAuto-check passed
  • Code Nest Project Spec

    xiaou61/Code-Nest

    Code-Nest 多模块全栈项目协作规范与落点导航。Use when modifying this repository for feature development, bug fixing, refactor, API change, SQL migration, or frontend-backend联调 so changes land in the correct module…

    770 GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed

More from genlayerlabs/genlayer-studio

All 10 skills in this repo
  • Cloudflare CLI

    genlayerlabs/genlayer-studio

    Debug and manage Cloudflare DNS, cache, and proxy settings using flarectl

    180 GitHub stars~692 tokensUpdated today
    Auto-check passed
  • Create PR

    genlayerlabs/genlayer-studio

    Create GitHub pull requests by analyzing branch diff and following the project template

    180 GitHub stars~635 tokensUpdated today
    Auto-check passed
  • Discord Community Feedback

    genlayerlabs/genlayer-studio

    Monitor Discord community channel for user-reported bugs and issues

    180 GitHub stars~786 tokensUpdated today
    Auto-check passed
  • Hosted Studio Debug

    genlayerlabs/genlayer-studio

    Debug GenLayer Studio deployments via ArgoCD CLI. An agent skill from genlayerlabs/genlayer-studio.

    180 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Integration Tests

    genlayerlabs/genlayer-studio

    Setup Python virtual environment and run integration tests with gltest

    180 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Linear Issue Fixer

    genlayerlabs/genlayer-studio

    Fetch the most urgent Linear issue with tag "studio" and size XS, then fix it

    180 GitHub stars~2.2k tokensUpdated today
    Auto-check passed

Works with

Questions about Studio DB

What does Studio DB do?

Query Studio deployment PostgreSQL databases for transaction debugging and analytics. Studio DB is an agent skill from genlayerlabs/genlayer-studio.

When should I use Studio DB?

Studio DB fits situations like: tasks that involve Debugging.

How do I install Studio DB in Claude Code?

Run `npx skills add genlayerlabs/genlayer-studio --skill studio-db -a claude-code`. Or copy the skill folder (.claude/skills/studio-db in genlayerlabs/genlayer-studio) into .claude/skills/studio-db in your project. Claude Code loads it when a task matches its description.

How do I install Studio DB in Codex?

Run `npx skills add genlayerlabs/genlayer-studio --skill studio-db -a codex`. Or copy the skill folder (.claude/skills/studio-db in genlayerlabs/genlayer-studio) into .agents/skills/studio-db in your project. Codex loads it when a task matches its description.

Can I use Studio DB in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add genlayerlabs/genlayer-studio --skill studio-db -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/studio-db, .gemini/skills/studio-db, .github/skills/studio-db and .opencode/skills/studio-db in your project.

What does Studio DB need to run?

Going by SKILL.md and its folder, Studio DB needs the command-line tools its instructions call (kubectl and psql).

Does Studio DB access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Studio DB safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Studio DB use?

Studio DB is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Studio DB use?

About 1.3k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Studio DB?

Skills that share tags, products or a category with Studio DB: Supabase Advanced Troubleshooting (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Version Management (relytcloud/pg_ducklake, 143 stars), Supabase Development and Debugging (supabase/agent-skills, 2.7k stars) and Safe SQL Execution (supabase/supabase, 111k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Studio DB?

genlayerlabs (a GitHub organization) maintains it in genlayerlabs/genlayer-studio, which has 180 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 7, 2026.

Source: genlayerlabs/genlayer-studio on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.