postgres SKILL.md skillA

postgres from zhaojiannet/canon is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add zhaojiannet/canon/postgres@git:20260914.a9571da

Pins git:20260914.a9571da in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
zhaojiannet/canon
Path
plugins/lockstep-postgres/skills/postgres/SKILL.md
Versions recorded
4
Latest version
git:20260914.a9571da, committed Sep 14, 2026
First version recorded
Jun 6, 2026
Size
9,931 bytes
Repository stars
4
License
MIT

Enforce PostgreSQL schema design and safe migrations. Use when editing **/migrations/*.sql, **/schema/*.sql, **/migrate/*.sql, or when the user mentions CREATE TABLE, ALTER TABLE, foreign key, index, jsonb, BIGSERIAL, timestamptz, migration, NOT NULL, DROP TABLE, or CREATE INDEX. Keeps every table on one shape (snake_case, timestamptz, FK plus index, JSONB), wraps migrations in a transaction, builds indexes CONCURRENTLY, adds NOT NULL columns in steps, and stops for approval before any…

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

> Targets PostgreSQL 18 · verified 2026-09 (latest 18.6). The DDL rules below also hold on 14–17, which upstream still supports.

This skill covers two sides of PostgreSQL DDL: **schema design** (naming and shape) and **migration safety** (change-safety). The rules: tables follow a consistent shape, and every migration runs on a live production database without downtime. If a change cannot, **STOP** and ask first. For one-off data fixes not bound for production schema, say so explicitly so this skill relaxes.

# Schema design

## Naming

- **Table names**: `snake_case`, plural noun. `users`, `order_items`. Not `User`, `OrderItem`, `tbl_user`.
- **Column names**: `snake_case`. `created_at`, `email_address`, `is_active`. No camelCase.
- **Primary key**: always `id`. `BIGSERIAL` for auto-increment, `UUID` (with `gen_random_uuid()` default) for distributed/external-facing. (The SQL-standard identity column and PG 18's time-ordered `uuidv7()` also exist; this skill keeps the choices above.)
- **Foreign keys**: `<referenced_table_singular>_id`. `users.org_id` references `organizations.id`.
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add zhaojiannet/canon/postgres@sha256:f4d41816511fe648

The line at the top of this page pins the label git:20260914.a9571da, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_7ue7ihd6pzal6jpv.svg)](https://markdownregistry.com/a/art_7ue7ihd6pzal6jpv)

3 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 4 versions of this file, between Jun 6, 2026 and Sep 14, 2026, about one every 33 days.

versioncommittedcommitsizeaudit
git:20260914.a9571da latest2026-09-14 a9571da 9,931 BA view · diff
git:20260914.4fe3f9f2026-09-14 4fe3f9f 9,964 BA view · diff
git:20260727.c4e47f12026-07-27 c4e47f1 8,528 BA view · diff
git:20260606.8fe8fe12026-06-06 8fe8fe1 10,474 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (9931 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

zhaojiannet/canon · 4 stars · license MIT · pushed 2026-10-05 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_7ue7ihd6pzal6jpv
GET https://markdownregistry.com/api/v1/resolve?ref=zhaojiannet/canon/postgres
GET https://markdownregistry.com/api/v1/blob/f4d41816511fe64888a71980f8b8bc00829201f5df7f36469bdb918d57f387dd

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from zhaojiannet/canon

cm SKILL.md skill
zhaojiannet/canon · plugins/flow/skills/cm/SKILL.md · 按规范提交当前改动:先确认代码审过,每个 commit 前查密钥、调 vet 核对 message
git:20261004.e8cf316 · audit A · 4 stars
e2e SKILL.md skill
zhaojiannet/canon · plugins/flow/skills/e2e/SKILL.md · 用现有账号和环境给当前项目做全量端到端测试。摸清项目 → 出计划 → 人审 → 生成 spec → 横切面检查 → 跑并修 → 出报告,被测项目只加 e2e/ 目录和一行 .gitignore
git:20260926.2fd6ef0 · audit A · 4 stars
go SKILL.md skill
zhaojiannet/canon · plugins/flow/skills/go/SKILL.md · 工作纪律:先查证再动手,找到真正的原因再修,收尾前审查代码,如实汇报
git:20260926.2fd6ef0 · audit A · 4 stars
msg SKILL.md skill
zhaojiannet/canon · plugins/flow/skills/msg/SKILL.md · 写或审 commit message 时的格式与禁忌。写 commit、起草 message、改 message、检查 message 时都先读这里。
git:20261004.e8cf316 · audit A · 4 stars
oss SKILL.md skill
zhaojiannet/canon · plugins/flow/skills/oss/SKILL.md · 调研、选型、对比开源项目时的筛选标准和安全核对。用户要调研、选型、对比、推荐库、框架、工具、GitHub 项目,或提到 star 数、替代方案时,先读这里再找候选。
git:20261004.e8cf316 · audit B · 4 stars
pin SKILL.md skill
zhaojiannet/canon · plugins/flow/skills/pin/SKILL.md · 用 Playwright 脚本把肉眼难确认的界面 bug(时序、偶发、多步交互)钉住:先复现、按复现率反复验证,再修应用代码,spec 留作回归
git:20260926.2fd6ef0 · audit A · 4 stars
vet SKILL.md skill
zhaojiannet/canon · plugins/flow/skills/vet/SKILL.md · 提交前把关。在看不到对话的子代理里,拿 diff 逐句核对 commit message 草稿和新增注释,标出指不到 diff 的句子、仓库里找不到的编号、讲开发经过的句子、只复述代码的注释、非中文。cm 在 commit…
git:20260926.2fd6ef0 · audit A · 4 stars
astro SKILL.md skill
zhaojiannet/canon · plugins/lockstep-astro/skills/astro/SKILL.md · Enforce Astro 7 static-first conventions. Use when editing .astro files or when the user mentions Astro, islands…
git:20260914.a9571da · audit A · 4 stars
echo SKILL.md skill
zhaojiannet/canon · plugins/lockstep-echo/skills/echo/SKILL.md · Enforce Echo v5 handler conventions for Go, focused on error handling. Use when editing .go handler/route/middleware…
git:20260914.a9571da · audit A · 4 stars
fastify SKILL.md skill
zhaojiannet/canon · plugins/lockstep-fastify/skills/fastify/SKILL.md · Enforce Fastify v5 plugin/route conventions for Node/TypeScript. Use when editing .ts/.js/.mjs that import fastify or…
git:20260914.a9571da · audit A · 4 stars
nuxt-ui SKILL.md skill
zhaojiannet/canon · plugins/lockstep-nuxt-ui/skills/nuxt-ui/SKILL.md · Enforce Nuxt UI v4 component-first conventions. Use when editing .vue files or when the user mentions Nuxt UI, a…
git:20260914.a9571da · audit A · 4 stars
sqlc SKILL.md skill
zhaojiannet/canon · plugins/lockstep-sqlc/skills/sqlc/SKILL.md · Enforce sqlc codegen conventions for Go + PostgreSQL. Use when editing sqlc.yaml, **/queries/*.sql, or generated…
git:20260914.a9571da · audit A · 4 stars

Every file in zhaojiannet/canon

Other files named postgres

postgres SKILL.md skill
timescale/pg-aiguide · skills/postgres/SKILL.md · Use this skill for any PostgreSQL database work — table design, indexing, data types, constraints, extensions…
git:20260925.2209242 · audit A · 1,877 stars
postgres SKILL.md skill
sanjay3290/ai-skills · skills/postgres/SKILL.md · Execute read-only SQL queries against multiple PostgreSQL databases. Use when: (1) querying PostgreSQL databases, (2)…
v1.0 · audit A · 450 stars
postgres SKILL.md skill
magnus919/agent-skills · postgres/SKILL.md · Operate PostgreSQL instances safely: configuration review, index and query-plan analysis, vacuum and bloat management…
git:20260809.4a5f18e · audit A · 162 stars
postgres SKILL.md skill
nahid-sparktales/agent-dispatcher · skills/database/postgres/SKILL.md · Postgres behaviour worth checking before relying on it — type choices, index kinds and their costs, reading EXPLAIN…
git:20260919.a0d4f55 · audit A · 58 stars
postgres SKILL.md skill
dayfinggg/openai-codex-agent-skills · codex/skills/postgres/SKILL.md · Inspect PostgreSQL schemas or work on table design, SQL, indexes, extensions, search, or migrations. Select…
git:20261029.276ae81 · audit A · 8 stars

Browse by kind, by grade A, or by owner.