Executes SQL queries for reading from or writing to the jishono PostgreSQL database.

Install

mkdir -p .claude/skills/db-query-jishono && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12026" && unzip -o skill.zip -d .claude/skills/db-query-jishono && rm skill.zip

Installs to .claude/skills/db-query-jishono

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use this skill to run SQL queries against the jishono database. Trigger for requests like "query the database", "run a SQL query", "check the data", "look up rows", "count entries", or any task that requires reading from or writing to the PostgreSQL database. Supports both the local dev database (via Docker) and the prod database (on localhost:5433).
352 charsno explicit “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Run SQL queries against the local dev database
  • Run SQL queries against the production database
  • Confirm write operations on the production database
  • Query specific tables like oppslag and definisjon
  • Use psql with specific flags for output formatting

How it works

This skill executes SQL queries against either a local development or production PostgreSQL database, with safety checks for write operations on production.

Inputs & outputs

You give it
SQL query string
You get back
Query results from the jishono database

When to use db-query

  • Query dictionary data
  • Count entries in the database
  • Perform administrative database tasks

About this skill

Database Query — jishono-backend

Run SQL queries against the jishono PostgreSQL database.

Connection details

Local dev database (default)

Accessed via the Docker postgres service. The local dev DB is exposed on localhost:5432.

docker compose exec -T postgres psql -U postgres -d jishono -c "<SQL>"

For multi-line or complex queries, use a heredoc:

docker compose exec -T postgres psql -U postgres -d jishono <<'SQL'
SELECT ...
FROM ...
WHERE ...;
SQL

Production database

The prod database is tunneled/available on localhost:5433. Use psql directly (not via Docker): Source the .env.prod file first:

source /Users/pg/kode/jisho/jishono-backend/.env.prod && PGPASSWORD="$DB_PASS_ADMIN_NODE" psql -h localhost -p 5433 -U "$DB_USER_ADMIN_NODE" -d jishono -c "<SQL>"

Which database to use

  • Default to local dev unless the user explicitly says "prod", "production", or "live".
  • Always confirm before running write operations (INSERT, UPDATE, DELETE) on prod.
  • SELECT queries on prod are safe to run without confirmation.

Useful tips

  • Use \x or --expanded for wide result sets.
  • Use LIMIT on exploratory queries to avoid dumping huge tables.
  • For CSV output: psql ... -A -F',' -c "SELECT ..."
  • The -T flag on docker compose exec is important to avoid TTY issues.

Key tables

  • oppslag — dictionary entries (lemma_id, oppslag, boy_tabell, etc.)
  • definisjon — definitions linked to oppslag via lemma_id
  • boyning tables — subst_boy, verb_boy, adj_boy, adv_boy, det_boy, pron_boy
  • brukere — users
  • forslag — definition suggestions
  • oppslag_forslag — new entry suggestions
  • veggen_innlegg — community wall posts
  • page_traffic — page visit tracking

When not to use it

  • When not querying the jishono database
  • When not using PostgreSQL
  • When not needing to distinguish between dev and prod environments

Limitations

  • Only operates on the jishono PostgreSQL database
  • Requires confirmation for write operations on production
  • Does not support other database types

How it compares

This workflow provides a controlled interface for database interaction, distinguishing between development and production environments and requiring confirmation for production write operations.

Compared to similar skills

db-query side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
db-query (this skill)04moReviewIntermediate
sql-queries185moNo flagsIntermediate
snowflake-semanticview56moReviewAdvanced
fuzzy-matching86moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

sql-queries

anthropics

Write correct, performant SQL across all major data warehouse dialects (Snowflake, BigQuery, Databricks, PostgreSQL, etc.). Use when writing queries, optimizing slow SQL, translating between dialects, or building complex analytical queries with CTEs, window functions, or aggregations.

1888

snowflake-semanticview

github

Create, alter, and validate Snowflake semantic views using Snowflake CLI (snow). Use when asked to build or troubleshoot semantic views/semantic layer definitions with CREATE/ALTER SEMANTIC VIEW, to validate semantic-view DDL against Snowflake via CLI, or to guide Snowflake CLI installation and connection setup.

542

fuzzy-matching

dadbodgeoff

Multi-stage fuzzy matching pipeline for entity reconciliation. PostgreSQL trigram pre-filter, salient overlap check, and multi-factor similarity scoring.

825

sql-pro

sickn33

Master modern SQL with cloud-native databases, OLTP/OLAP optimization, and advanced query techniques. Expert in performance tuning, data modeling, and hybrid analytical systems. Use PROACTIVELY for database optimization or complex analysis.

323

postgres-hybrid-text-search

timescale

Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). **Trigger when user asks to:** - Combine keyword and semantic search - Implement hybrid search or multi-modal retrieval - Use BM25/pg_textsearch with pgvector together - Implement RRF (Reciprocal Rank Fusion) for search - Build search that handles both exact terms and meaning **Keywords:** hybrid search, BM25, pg_textsearch, RRF, reciprocal rank fusion, keyword search, full-text search, reranking, cross-encoder Covers: pg_textsearch BM25 index setup, parallel query patterns, client-side RRF fusion (Python/TypeScript), weighting strategies, and optional ML reranking.

112

whodb

clidey

Database operations including querying, schema exploration, and data analysis. Activates for tasks involving PostgreSQL, MySQL, MariaDB, SQLite, MongoDB, Redis, Elasticsearch, or ClickHouse databases.

18

Search skills

Search the agent skills registry