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 agentmods add skills/evokoa/polygres-skills/polygres-retrieval-designnpx skills add Evokoa/polygres-skills --skill polygres-retrieval-designgit clone --depth 1 https://github.com/Evokoa/polygres-skillsWrote 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/evokoa/polygres-skills/polygres-retrieval-design)<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="Measured on agentmods" 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 | $0.00095 | $0.00930 |
| Opus 5 | $0.00048 | $0.00465 |
| Sonnet 5 | $0.00019 | $0.00186 |
| Haiku 4.5 | $0.00010 | $0.00093 |
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 4d 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 — 82 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.
Workflow
- 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.
- 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.
- Select the smallest sufficient strategy using
references/strategy-selection.md. Reject an unsupported strategy rather than inventing a capability. - For graph retrieval, apply
references/graph-modeling.md. For an existing vector configuration, TSVector, or fuzzy retrieval, applyreferences/vector-and-text-design.md. - For pgContext collections, point synchronization, registered filters, or
Context retrieval modes, apply
references/context-design.md. - For multi-stage retrieval or RAG, apply
references/hybrid-and-rag-plan.md. - 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. - In a design-only request, stop before mutation. In an active data-pipeline setup, return control to the orchestrating skill; its consolidated review and approval govern the implementation.
Design rules
- Prefer relational retrieval for exact predicates, joins, aggregates, and transactions that do not need a retrieval index.
- For a synced project, keep exact SQL, transactions, and source mutations in the source PostgreSQL database. Use only the supported Runtime retrieval and retrieval-configuration surfaces on Polygres.
- Treat graph, vector, text, and Context indexes and point mappings as derived project resources whose readiness and refresh behavior must be validated.
- Use exact schema identifiers and stable row ID values from verified data. Do not use invented row IDs or fuzzy-match schema names.
- Bound graph direction, depth, fan-out, result count, and cycle behavior.
- Record the embedding model, dimensions, metric, input construction, and response to a dimension mismatch or empty embedding.
- Default new semantic retrieval plans to a Polygres AI Context collection.
Decide explicitly whether distinct embeddings belong as named vectors in one
collection or require separate collection-level source and policy settings.
Record any existing pgvector configuration that must remain compatible or
needs a migration plan. Never treat those resources as interchangeable.
On a synced project, use only an existing synchronized source table and
embedding column; do not plan
add_columnornew_tableon the target. - State TSVector language/configuration choices and fuzzy thresholds.
- For hybrid retrieval, define stage order, provenance, deduplication, authorization, and token budget.
- Include rebuild or reindex triggers, readiness checks, and rollback or fallback behavior.
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.
- 4d ago First seen · 82 lines · 95 tokens per session scan A fe08fba9c40e
polygres-retrieval-design is a skill published in the GitHub repository Evokoa/polygres-skills (10 stars, last pushed 15d ago), licensed Apache-2.0. It adds 95 tokens to every session and 930 once invoked, about $0.0005 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-31.
Other skills, from other repositories
safe-sql-execution
Use whenever code will build, return, fetch, or execute SQL that runs against a user's real Postgres database — even when the request reads like an ordinary feature or bug fix and never says "security," "injection," or "SafeSqlFragment." This covers: writing or editing any pg-meta function, query builder, or endpoint…
studio-e2e-tests
Write and run Playwright E2E tests for Supabase Studio (e2e/studio). Use when asked to run e2e tests, write new E2E tests, or debug flaky or failing Playwright tests. Covers running commands, avoiding race conditions, waiting strategies, selectors, helper functions, and CI vs local differences.
studio-queries
React Query conventions for data fetching in Supabase Studio. Use when writing or reviewing query hooks, mutation hooks, or query keys in apps/studio/data/ — including adding the first fetch or mutation for a new API endpoint or resource. Covers queryOptions pattern, keys.ts structure, mutation hook template, and…
write-the-docs
Draft new or updated Supabase docs content for a feature or launch, grounded in product intent (Linear when available), a read of the actual code, and the docs style guide once one exists. Use when asked to write docs for a new feature, a product launch, or a Linear ticket that needs net-new content rather than a bug…
sql-database-support
Guides classifying, gap-analyzing, and scaffolding support for a new SQL database in pREST (wire-compatible variants like TimescaleDB or new dialects). Use when adding database support, creating integration/ /, DIFFERENCES.md, adapters/ , per-DB docker-compose or GitHub workflows, or planning where config/app wiring…
upgrading-chart
Upgrades Helm chart dependencies (PostgreSQL, Vault) in the Chainloop project, including vendorized charts, container images, and CI/CD workflows. Use when the user mentions upgrading Helm charts, Bitnami dependencies, PostgreSQL chart, or Vault chart. CRITICAL - Major version upgrades are FORBIDDEN and must be…