postgresql-best-practices-cloudbase

postgresql-best-practices-cloudbase is a skill for Claude Code, Codex from TencentCloudBase/cloudbase-skills. It costs 74 tokens per session (1,103 once invoked), scanned A, a copy of postgresql-best-practices-cloudbase, MIT.

Guidance for designing and reviewing PostgreSQL data access in CloudBase applications. PostgreSQL is a relational database, and CloudBase is the application platform named by the add-on.

In plain words
What is it for?
Use it when adding or changing query paths, reviewing filters and joins, investigating slow SQL or endpoints, or checking database readiness for a busy launch.
Why use it?
It helps find repeated database calls, missing indexes, slow queries, and access patterns that may not handle high traffic. It is not guidance for initial setup, migrations, permissions, or basic row-security configuration.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding or changing query paths, reviewing filters and joins, investigating slow SQL or endpoints, or checking database readiness for a busy launch.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tencentcloudbase/cloudbase-skills/postgresql-best-practices-cloudbase
Install

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.

Any agent
npx skills add TencentCloudBase/cloudbase-skills --skill postgresql-best-practices-cloudbase
Clone the repo
git clone --depth 1 https://github.com/TencentCloudBase/cloudbase-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for postgresql-best-practices-cloudbase

README.md
[![agentmods](https://agentmods.dev/badge/skills/tencentcloudbase/cloudbase-skills/postgresql-best-practices-cloudbase/github.svg)](https://agentmods.dev/skills/tencentcloudbase/cloudbase-skills/postgresql-best-practices-cloudbase)
Your own site
<a href="https://agentmods.dev/skills/tencentcloudbase/cloudbase-skills/postgresql-best-practices-cloudbase"><img src="https://agentmods.dev/badge/skills/tencentcloudbase/cloudbase-skills/postgresql-best-practices-cloudbase/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.

agentmods 80×15 button for postgresql-best-practices-cloudbase

Your own site · 80×15
<a href="https://agentmods.dev/skills/tencentcloudbase/cloudbase-skills/postgresql-best-practices-cloudbase"><img src="https://agentmods.dev/badge/skills/tencentcloudbase/cloudbase-skills/postgresql-best-practices-cloudbase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,103 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.01103
Opus 5.5 $0.00030 $0.00441
Sonnet 5.5 $0.00015 $0.00221
Haiku 4.5 $0.00007 $0.00110

Measured 3d ago against content hash ff01acb1c43e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

postgresql-best-practices-cloudbase 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 3d 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.

Origin

This is a copy

100% identical to postgresql-best-practices-cloudbase — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/cloudbase/references/postgresql-best-practices-cloudbase/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CloudBase PostgreSQL Best Practices

This skill turns a working CloudBase PG implementation into a reviewable access design. It makes query paths, indexes, row authorization, and launch capacity explicit before code is considered complete.

Sibling skills (local only)

Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../postgresql-development-cloudbase/SKILL.md.

If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do not HTTP-fetch remote skill or protocol markdown into the agent context.

When to use

  • A feature needs a new or changed access pattern.
  • Application code performs repeated, serial, or high-frequency PG queries.
  • A SQL query, RPC, endpoint, or polling path is slow.
  • A high-traffic launch needs a database readiness review.

Do NOT use for

  • PG environment setup, app.rdb() syntax, migrations, GRANTs, or base RLS correctness: use ../postgresql-development-cloudbase/SKILL.md.
  • Login provider or UI implementation: use the matching auth skill.
  • Confirmed NoSQL collection work: use the document database skill.
  • Platform alarm diagnosis or slow-log collection: use ../ops-inspector/SKILL.md.

Workflow

1. Inventory access paths

List every changed endpoint, job, RPC, or UI flow and its reads and writes. Record filters, joins, sort keys, expected cardinality, and request frequency.

Complete when: every changed path has a concrete query inventory; unknown volume or peak concurrency is marked as an assumption for the user.

2. Design schema, indexes, and row authorization together

Derive columns and indexes from the query inventory. Every frequent filter, join, and stable ordering path must have a deliberate index decision. For user-owned rows, use the role as the policy gate and identity as the row predicate:

CREATE POLICY orders_select_own ON public.orders
  FOR SELECT TO authenticated
  USING ((SELECT auth.uid()) = owner_id);

Read the full file on GitHub · 98 lines

Files

What ships with it

5 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.

Changes

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.

  1. 3d ago Changed ff01acb1c43e
  2. 7d ago Changed · +1 lines 974e4c1976da
  3. 16d ago Changed c708c1d7d45f
  4. 25d ago Changed 45104c03d10c
  5. 26d ago Changed 06bcaa660eb2
  6. 1mo ago First seen · 97 lines · 74 tokens per session scan A 9ddf6882530c

Subscribe to this mod's changes

postgresql-best-practices-cloudbase is a skill published in the GitHub repository TencentCloudBase/cloudbase-skills (36 stars, last pushed today), licensed MIT. It adds 74 tokens to every session and 1,103 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to postgresql-best-practices-cloudbase, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

alloydb-basics

Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.

google/skills · 72 tokens

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens

db-repair

Auto-fix gbrain's Postgres access so the brain stays available. When any gbrain command or MCP tool result carries a GBRAINDBACCESS marker (or an operator reports the brain database is down), run the hardcoded gbrain db-repair ladder: diagnose, apply the safe tier, verify. The action is ALWAYS the hardcoded command …

garrytan/gbrain · 96 tokens

dsql

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, foreign key…

awslabs/agent-plugins · 246 tokens

volcengine-rds-postgresql

A tool for operating PostgreSQL databases hosted by Volcano Engine's managed database service. PostgreSQL is a relational database used to store structured application data.

bytedance/agentkit-samples · 63 tokens

analyzing-insights-across-teams

Analyze PostHog insights, dashboards, or teams beyond the current project by querying the prod Postgres replicas synced into the dogfood data warehouse (US project 2, "PostHog App + Website"). Use when asked to analyze insights across all teams or projects, another team's insights, or fleet-wide insight/dashboard…

PostHog/posthog-foss · 115 tokens