AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Gorm Sql Postgresql Syntax

skill-saifoelloh-golang-best-practices-skill-postgresql-syntax · by saifoelloh

PostgreSQL SQL syntax review for Go/GORM projects. Use when writing or reviewing raw SQL used via db.Raw(), db.Exec(), or migrations. Covers placeholder style, reserved keyword quoting, RETURNING, ILIKE, JSONB operators, and type casting. Don't use for MySQL or SQLite.

No reviews yet
0 installs
39 views
0.0% view→install

Install

$ agentstack add skill-saifoelloh-golang-best-practices-skill-postgresql-syntax

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-saifoelloh-golang-best-practices-skill-postgresql-syntax)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
6mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Gorm Sql Postgresql Syntax? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

PostgreSQL Syntax

Expert-level review of raw PostgreSQL SQL syntax in GORM/Go projects. Ensures correct Postgres-specific usage, idiomatic SQL, and avoids common runtime errors.

When to Apply

Use this skill when:

  • Writing raw SQL in db.Raw(), db.Exec(), or migration files
  • Debugging syntax error or operator does not exist PostgreSQL errors
  • Reviewing SQL expressions involving JSONB, UUID, timestamps, or reserved keywords
  • Using RETURNING, CTEs, window functions, or ILIKE

Rule Categories

| Priority | Count | Focus | |---|---|---| | Critical | 1 | Placeholder style mismatch | | High | 4 | Identifier quoting, RETURNING, ILIKE, type casting | | Medium | 4 | CTE readability, JSONB operators, INTERVAL, select redundancy |

Rules Covered (9 total)

Critical Issues (1)

  • critical-placeholder-style — Use ? with GORM, $N only with pgx/pq directly

High-Impact Patterns (4)

  • high-identifier-quoting — Quote reserved keywords (order, user, group) in raw SQL
  • high-returning-clause — Use RETURNING for generated values after INSERT/UPDATE
  • high-ilike-search — Use ILIKE for case-insensitive search, not LOWER(col) LIKE
  • high-explicit-cast — Cast types explicitly (::uuid, ::bigint) to avoid operator does not exist

Medium Improvements (4)

  • medium-cte-readability — Use CTEs instead of nested subqueries for complex queries
  • medium-jsonb-operators — Use correct @>, ->>, -> operators for JSONB queries
  • medium-interval-arithmetic — Use INTERVAL for date math, not manual second calculations
  • medium-select-redundancy — Don't manually quote plain column names in .Select() (GORM handles it)

Trigger Phrases

  • "Check this raw SQL"
  • "db.Raw / db.Exec"
  • "SQL syntax error"
  • "operator does not exist"
  • "reserved keyword"
  • "JSONB query"
  • "PostgreSQL compatibility"

Cross-Reference with golang-best-practices-skill

Two rules in this skill directly extend rules from the companion database-repository skill in golang-best-practices-skill:

| This skill | golang-best-practices-skill | Relationship | |---|---|---| | high-identifier-quoting | high-gorm-identifier-quoting | Expanded — more Postgres examples, full reserved word list | | medium-select-redundancy | medium-gorm-select-redundancy | Mirror — same rule, cross-referenced |

Related Skills

  • [gorm-query-patterns](../gorm-query-patterns/SKILL.md) — For ORM-level query patterns
  • [query-performance](../query-performance/SKILL.md) — For index-related syntax (CONCURRENTLY, partial indexes)
  • [migration-safety](../migration-safety/SKILL.md) — For DDL SQL in migration files

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.