agentleFS
matejformanekmatejformanek/postgres-claude/.claude/skills/psql/SKILL.md

psql

Skill1 starsChanged 6 months agoPostgreSQLView on GitHub

Drive `psql` against the LOCAL dev cluster built from source in this workspace (Unix socket `/tmp`, trust auth, db `postgres`, ports 5432 debug / 5433 asan). Covers the connection idiom, high-yield meta-commands (`\d+`, `\df+`, `\sf`, `\timing`, `\watch`, `\gexec`, `\errverbose`), session-only debug GUCs (`client_min_messages`, `log_min_messages`, `EXPLAIN (ANALYZE, BUFFERS, WAL)`, `enable_seqscan`/`enable_hashjoin`/etc.), runtime introspection of *this* postmaster (`pg_stat_activity`, `pg_backend_memory_contexts`, `pg_locks`, `pg_log_backend_memory_contexts`), the held-PID handoff to lldb (`PGAPPNAME=hold` + `pg_sleep`), and what's safe vs not on a disposable dev cluster. **Use this skill proactively whenever the user wants to run SQL interactively or by script against the locally-built Postgres, reproduce a backend bug on the dev cluster, watch a backend's memory contexts grow, capture a backend PID for the debugger, force a specific plan shape via `SET enable_*`, run `EXPLAIN ANALYZE` against the dev DB, time a query with `\timing`, get the connection string for the dev cluster, or do any psql-driven exploration of an internals-flavored question — even when the user doesn't say the word "psql".** Skip for: questions about production / managed PostgreSQL instances at someone else's company; SQL written for app frameworks (Django/Rails/SQLAlchemy/Prisma/JDBC ORM/`models.py`/migration files); pure "how does pg_class / OID work" catalog-structure questions (use `catalog-conventions`); subsystem-internals questions answered from source code (cost_hashjoin, XLogInsert, deadlock detector, LWLock — use `executor-and-planner` / `wal-and-xlog` / `locking`); first-time build-from-source or start/stop lifecycle (use `build-and-run`); lldb/gdb stepping itself, single-user mode, sanitizer setup (use `debugging`); and one-shot read-only agent queries that should go through the `postgres-dev` MCP at `.mcp.json` instead of psql.

  • Deletes or force-pushes

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

Licensed with conditions — read it at the source. We count its rules but don't quote them. Read them on GitHub.

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.