Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add saifoelloh/golang-best-practices-skill --skill postgresql-syntaxgit clone --depth 1 https://github.com/saifoelloh/golang-best-practices-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/saifoelloh/golang-best-practices-skill/postgresql-syntax)<a href="https://agentmods.dev/skills/saifoelloh/golang-best-practices-skill/postgresql-syntax"><img src="https://agentmods.dev/badge/skills/saifoelloh/golang-best-practices-skill/postgresql-syntax/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/saifoelloh/golang-best-practices-skill/postgresql-syntax"><img src="https://agentmods.dev/badge/skills/saifoelloh/golang-best-practices-skill/postgresql-syntax.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00068 | $0.00879 |
| Opus 5 | $0.00034 | $0.00439 |
| Sonnet 5 | $0.00014 | $0.00176 |
| Haiku 4.5 | $0.00007 | $0.00088 |
Grade A, and why
gorm-sql-postgresql-syntax scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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 errororoperator does not existPostgreSQL errors - Reviewing SQL expressions involving JSONB, UUID, timestamps, or reserved keywords
- Using
RETURNING, CTEs, window functions, orILIKE
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,$Nonly with pgx/pq directly
High-Impact Patterns (4)
high-identifier-quoting— Quote reserved keywords (order,user,group) in raw SQLhigh-returning-clause— UseRETURNINGfor generated values after INSERT/UPDATEhigh-ilike-search— UseILIKEfor case-insensitive search, notLOWER(col) LIKEhigh-explicit-cast— Cast types explicitly (::uuid,::bigint) to avoidoperator does not exist
Medium Improvements (4)
medium-cte-readability— Use CTEs instead of nested subqueries for complex queriesmedium-jsonb-operators— Use correct@>,->>,->operators for JSONB queriesmedium-interval-arithmetic— UseINTERVALfor date math, not manual second calculationsmedium-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:
What ships with it
9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- rules/critical-placeholder-style.md 3.0 KB
- rules/high-explicit-cast.md 1.7 KB
- rules/high-identifier-quoting.md 3.9 KB
- rules/high-ilike-search.md 1.7 KB
- rules/high-returning-clause.md 3.2 KB
- rules/medium-cte-readability.md 1.7 KB
- rules/medium-interval-arithmetic.md 1.6 KB
- rules/medium-jsonb-operators.md 1.9 KB
- rules/medium-select-redundancy.md 2.9 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 77 lines · 68 tokens per session scan A 686be735e48c
gorm-sql-postgresql-syntax is a skill published in the GitHub repository saifoelloh/golang-best-practices-skill (15 stars, last pushed 6mo ago), licensed MIT. It adds 68 tokens to every session and 879 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
go-add-migration
Create properly named PostgreSQL migration files for GOB microservices.
encore-go-database
Work with PostgreSQL in Encore Go using sqldb.NewDatabase from encore.dev/storage/sqldb — schema migrations and SQL queries.
mfd
A Go code generator that reads XML descriptions of a PostgreSQL schema and creates models, repositories, services, and test helpers. It is used through project Makefile commands.
golang-database
Comprehensive guide for Go database access. Covers parameterized queries, struct scanning, NULLable column handling, error patterns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context propagation, and migration tooling. Use this skill whenever writing, reviewing, or debugging…
golang-samber-hot
In-memory caching in Golang using samber/hot — eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO), TTL, cache loaders, sharding, stale-while-revalidate, missing key caching, and Prometheus metrics. Apply when using or adopting samber/hot, when the codebase imports…
azure-resource-manager-postgresql-dotnet
Azure PostgreSQL Flexible Server SDK for .NET. Database management for PostgreSQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "PostgreSQL", "PostgreSqlFlexibleServer", "PostgreSQL Flexible Server", "Azure Database for…