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/pr-pm/prpm/postgres-migrationsnpx skills add pr-pm/prpm --skill postgres-migrationsgit clone --depth 1 https://github.com/pr-pm/prpmWhat 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.00036 | $0.02902 |
| Opus 5 | $0.00018 | $0.01451 |
| Sonnet 5 | $0.00007 | $0.00580 |
| Haiku 4.5 | $0.00004 | $0.00290 |
Grade A, and why
postgres-migrations 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 2d 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 — 468 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PostgreSQL Migrations Skill
Common PostgreSQL Migration Errors and Solutions
1. "Subquery uses ungrouped column from outer query"
Cause: Subquery in SELECT/CASE references columns from outer query that aren't in GROUP BY.
Solution: Use CTE (Common Table Expression) to separate aggregation from subqueries:
-- ❌ Bad - subquery references ungrouped p.id
SELECT
SPLIT_PART(p.id, '/', 1) as author,
COUNT(*) as count,
CASE WHEN EXISTS (
SELECT 1 FROM users WHERE username = SPLIT_PART(p.id, '/', 1)
) THEN TRUE ELSE FALSE END as claimed
FROM packages p
GROUP BY SPLIT_PART(p.id, '/', 1);
-- ✅ Good - use CTE to compute aggregates first
WITH author_stats AS (
SELECT
SPLIT_PART(p.id, '/', 1) as author,
COUNT(*) as count
FROM packages p
GROUP BY SPLIT_PART(p.id, '/', 1)
)
SELECT
author,
count,
EXISTS (SELECT 1 FROM users WHERE username = author_stats.author) as claimed
FROM author_stats;
2. "Functions in index expression must be marked IMMUTABLE"
Cause: PostgreSQL requires functions in indexes/generated columns to be IMMUTABLE.
Problem Functions:
array_to_string()- marked STABLE, not IMMUTABLEto_char()- depends on timezone/locale settingsnow()- changes over time
Solution: Create IMMUTABLE wrapper functions:
-- Create IMMUTABLE wrapper for array_to_string
CREATE OR REPLACE FUNCTION immutable_array_to_string(text[], text)
RETURNS text AS $$
SELECT array_to_string($1, $2)
$$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE;
-- Use in generated column
ALTER TABLE packages
ADD COLUMN search_vector tsvector
GENERATED ALWAYS AS (
setweight(to_tsvector('english', coalesce(name, '')), 'A') ||
setweight(to_tsvector('english', immutable_array_to_string(tags, ' ')), 'B')
) STORED;
-- Now you can index it
CREATE INDEX idx_search ON packages USING gin(search_vector);
3. "Relation does not exist" (Extensions)
Cause: Extension not installed (e.g., pg_stat_statements, pg_trgm, uuid-ossp).
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.
- 2d ago First seen · 468 lines · 36 tokens per session scan A 8267e01da14d
postgres-migrations is a skill published in the GitHub repository pr-pm/prpm (120 stars, last pushed 2mo ago), licensed MIT. It adds 36 tokens to every session and 2,902 once invoked, about $0.0002 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
implement-fastapi-routes
The file docstring contains a description of the FastAPI routes we need to implement. Implement these routes.
react-router-client-loader
Do this in a clientLoader and use loaderData to render the component. DO NOT create mock data, new interfaces, or mock data loader functions. Instead, assume loaderData has all of the data you need to render the component.
refactor-on-instructions
Refactor this code following all the established coding rules. Pay very careful attention to each rule and instruction and update the referenced code.
architecture
Architecture Design Command 🏗️.
biome
Biome JavaScript/TypeScript linter and formatter.
laravel
Laravel PHP framework best practices.