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 HigorAlves/orc --skill postgresql-optimizationgit clone --depth 1 https://github.com/HigorAlves/orcWrote 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/higoralves/orc/postgresql-optimization)<a href="https://agentmods.dev/skills/higoralves/orc/postgresql-optimization"><img src="https://agentmods.dev/badge/skills/higoralves/orc/postgresql-optimization/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/higoralves/orc/postgresql-optimization"><img src="https://agentmods.dev/badge/skills/higoralves/orc/postgresql-optimization.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.00050 | $0.00834 |
| Opus 5.5 | $0.00020 | $0.00334 |
| Sonnet 5.5 | $0.00010 | $0.00167 |
| Haiku 4.5 | $0.00005 | $0.00083 |
Grade A, and why
postgresql-optimization 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 1mo 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 — 50 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PostgreSQL Development & Review Assistant
Expert PostgreSQL guidance for ${selection} (or the entire project if no selection). Covers PostgreSQL-specific features, optimization patterns, and the review lens for PG code. This SKILL.md is a thin index — Read the relevant references/*.md file when you need that detail.
When to use
Reach for this skill whenever you are writing, optimizing, or reviewing PostgreSQL-specific SQL and want to leverage what makes PostgreSQL special rather than treating it as a generic SQL database:
- Modeling or querying JSONB, arrays, or custom/range/geometric types.
- Designing indexes or diagnosing slow queries (EXPLAIN ANALYZE,
pg_stat_statements). - Full-text search, window functions, recursive CTEs.
- Choosing and using extensions (pg_trgm, pgcrypto, PostGIS, pgvector, TimescaleDB, …).
- Reviewing PG code for anti-patterns, schema-design smells, function/trigger issues, and security (RLS, privileges).
How to work
- Identify the topic, open the matching reference, apply its patterns to the selection.
- Prefer PostgreSQL-native operators/types over generic SQL equivalents.
- Back every access path with the right index type (GIN for JSONB/arrays, GiST for ranges/geometry, BRIN for time-series).
- For a review pass, start from
references/review-checklist.md.
Decision tree
- Semi-structured data,
@>/?queries, GIN indexing →references/jsonb.md - Tag/category lists, ENUMs, domains, ranges, geometry →
references/arrays-and-custom-types.md - Slow query, EXPLAIN, index choice, pagination, connection/memory →
references/indexing.md - Running totals, rankings, LAG/LEAD, recursive hierarchies →
references/window-functions.md tsvector/tsquerysearch and ranking →references/full-text-search.md- Enabling/using extensions, monitoring, VACUUM/ANALYZE →
references/extensions.md - Auditing/reviewing PG code (anti-patterns, triggers, RLS, privileges, checklist) →
references/review-checklist.md
What ships with it
7 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.
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.
- 1mo ago First seen · 50 lines · 50 tokens per session scan A 095897649c13
postgresql-optimization is a skill published in the GitHub repository HigorAlves/orc (6 stars, last pushed 10d ago), licensed MIT. It adds 50 tokens to every session and 834 once invoked, about $0.0002 per session on Opus 5.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-09-03.
Other skills, from other repositories
optimize
Analyze and suggest performance improvements for code, queries, or systems.
sql-optimization-patterns
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.
deep-debug-sync
Deep root-cause analysis for data sync bugs in the Cortex stack — REX SOAP sync, Shopify product/inventory sync, and any pipeline where data flows between external systems and the local PostgreSQL database. Use this skill when the user reports wrong data after a sync ("wrong supplier", "missing products", "inventory…
postgres-patterns
PostgreSQL database patterns for query optimization, schema design, indexing, and security. Quick reference for common patterns, index types, data types, and anti-pattern detection. Based on Supabase best practices.
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.
five-whys
Finds the root cause of a bug, failure or recurring problem by asking "why" until the answer is a cause you can fix. Use when the user asks why something keeps happening, or wants the root cause rather than a quick fix.