polygres-retrieval-design

polygres-retrieval-design is a skill for Claude Code, Codex from Evokoa/polygres-skills. It costs 61 tokens per session (1,122 once invoked), scanned A, original, Apache-2.0.

A planning guide for choosing how an application searches PostgreSQL data, including relational, graph, text, combined, and AI-supported approaches.

In plain words
What is it for?
Use it to plan and review database search, embedding or graph inputs, grounded RAG (answers based on retrieved data), and migrations from existing vector search.
Why use it?
It helps you choose a retrieval method from the available data and requirements before configuring search or writing application code.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: $skill-name invocation.

Part of the polygres plugin — 5 skills, 1 MCP server shipped together

Good fit Use it to plan and review database search, embedding or graph inputs, grounded RAG (answers based on retrieved data), and migrations from existing vector search.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/evokoa/polygres-skills/polygres-retrieval-design
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 Evokoa/polygres-skills --skill polygres-retrieval-design
Clone the repo
git clone --depth 1 https://github.com/Evokoa/polygres-skills

Made for: Claude Code, Codex.

Or install polygres, the plugin that ships this one along with the rest of its 5 skills, 1 MCP server.

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 polygres-retrieval-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/evokoa/polygres-skills/polygres-retrieval-design/github.svg)](https://agentmods.dev/skills/evokoa/polygres-skills/polygres-retrieval-design)
Your own site
<a href="https://agentmods.dev/skills/evokoa/polygres-skills/polygres-retrieval-design"><img src="https://agentmods.dev/badge/skills/evokoa/polygres-skills/polygres-retrieval-design/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 polygres-retrieval-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/evokoa/polygres-skills/polygres-retrieval-design"><img src="https://agentmods.dev/badge/skills/evokoa/polygres-skills/polygres-retrieval-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,122 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 original No closer match found 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.00061 $0.01122
Opus 5.5 $0.00024 $0.00449
Sonnet 5.5 $0.00012 $0.00224
Haiku 4.5 $0.00006 $0.00112

Measured 2mo ago against content hash 1309c26f7f1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

polygres-retrieval-design 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 2mo 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.

plugins/polygres/skills/polygres-retrieval-design/SKILL.md · 95 lines

How it starts

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

Polygres Retrieval Design

Produce a reviewable plan before retrieval configuration or application work. This skill is advisory: it must not mutate a project directly.

When Polygres MCP tools are available, read references/mcp-tool-contract.md and use discovered read tools for bounded inspection. Call whoami, respect the connection's project boundary, and keep this skill read-only even when change tools are visible.

Workflow

  1. Extract the user outcome, authorization, latency, freshness, and expected result shape from the prompt and inspected application. Ask only for a missing fact that changes the recommendation; representative questions are useful evidence, not a mandatory interview.
  2. Resolve project mode, then inspect the supplied schema, verified row identifiers, sample data, and existing retrieval configuration. Label missing evidence as unresolved; never infer production facts from a table or column name.
  3. Select the smallest sufficient strategy using references/strategy-selection.md. Reject an unsupported strategy rather than inventing a capability.
  4. For semantic retrieval, use references/embedding-design.md to compare Polygres generation, local or external generation, and existing vectors. For graph retrieval, apply references/graph-modeling.md. For an existing vector configuration, TSVector, or fuzzy retrieval, apply references/vector-and-text-design.md. When MCP Graph tools are available, also read references/mcp-graph-retrieval.md for evidence and handoff requirements.
  5. For pgContext collections, point synchronization, registered filters, or Context retrieval modes, apply references/context-design.md.
  6. For multi-stage retrieval or RAG, apply references/hybrid-and-rag-plan.md.
  7. Write the result with references/plan-template.md. When called by $polygres-data-pipeline, return the selected and omitted components plus exact public-interface handoffs in a machine-readable section so the caller can continue without another interview.
  8. In a design-only request, return the plan. In an active data-pipeline setup, return control to the orchestrating skill with the user's existing authorization and any remaining decisions.

Read the full file on GitHub · 95 lines

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. 2mo ago Changed 1309c26f7f1f
  2. 2mo ago Changed · +6 lines · -4 tokens per session 68d67172edd1
  3. 2mo ago Changed · +7 lines · -30 tokens per session b4f1b2bdb4b1
  4. 3mo ago First seen · 82 lines · 95 tokens per session scan A fe08fba9c40e

Subscribe to this mod's changes

polygres-retrieval-design is a skill published in the GitHub repository Evokoa/polygres-skills (11 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 61 tokens to every session and 1,122 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-08-31.

Related

polygres-retrieval-design compared with skills from other repositories

polygres-retrieval-design next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
polygres-retrieval-designEvokoa/polygres-skillsSkill112mo agoApache-2.0A61Claude Code, Codex
pgvector-semantic-searchtimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A190Cursor
postgres-hybrid-text-searchtimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A162Cursor
vector-db-rag-expertroedyrustam/vibes-plugSkill132todayMITA47Cursor
postgres-semantic-searchlaguagu/claude-code-nextjs-skillsSkill756d agoMITA90Claude Code
managing-databasesrileyhilliard/claude-essentialsSkill1332d agoMITA61Claude Code
data-mcp-toolsmakifbaysal/tasktrooperSkill123yesterdayApache-2.0A60Claude Code, Codex