PostgreSQL CLI Skill

SkillDatabases & data

Query PostgreSQL databases running in the app-postgres Docker container

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the PostgreSQL CLI Skill skill

What this skill tells your AI

The instructions your AI receives, as published by thalesgroup/fred in .claude/skills/psql/SKILL.md and read by ahel’s review.

You help the user query and inspect the PostgreSQL databases running in the local dev stack.

Connection

PostgreSQL runs in the app-postgres Docker container (image: pgvector/pgvector:pg15, port 5432).

Always connect via docker exec to avoid host psql version mismatches:

docker exec -it app-postgres psql -U admin -d <database>

Default dev credentials (used internally by the container — no password prompt needed with docker exec):

  • User: admin
  • Password: Azerty123_

Available databases

DatabaseOwnerNotes
fredfredMain application database
datatabularTabular data
keycloakkeycloak_db_userAuth / identity
langfuselangfuseLLM observability
openfgaopenfgaAuthorization tuples
temporaltemporalWorkflow engine
temporal_visibilitytemporalTemporal visibility store
postgresadminDefault admin database

Quick reference

# List all databases
docker exec app-postgres psql -U admin -l

# List tables in a database
docker exec app-postgres psql -U admin -d fred -c "\dt"

# Describe a table
docker exec app-postgres psql -U admin -d fred -c "\d <table_name>"

# Run a query
docker exec app-postgres psql -U admin -d fred -c "SELECT * FROM <table> LIMIT 10;"

Handling $ARGUMENTS

Parse the user's intent from $ARGUMENTS. When no database is specified, default to fred. Examples:

  • /psql list tablesdocker exec app-postgres psql -U admin -d fred -c "\dt"
  • /psql show users → query the users/accounts table in the fred database
  • /psql SELECT * FROM agents LIMIT 5 → run that query against fred
  • /psql list tables in langfusedocker exec app-postgres psql -U admin -d langfuse -c "\dt"

Always use docker exec app-postgres psql -U admin (no -it flag in non-interactive mode).

For multi-line or complex queries, pass them via --command or pipe through echo:

docker exec app-postgres psql -U admin -d fred --command "
  SELECT id, name, created_at
  FROM agents
  ORDER BY created_at DESC
  LIMIT 20;
"

Notes

  • The container image includes pgvector — vector columns (embedding vector(...)) are normal.
  • For schema context, check migration files under apps/<backend-name>/alembic/versions/

Signals

GitHub stars
61
Forks
32
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
psql
Source
github.com/thalesgroup/fred