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/neverinfamous/memory-journal-mcp/postgresnpx skills add neverinfamous/memory-journal-mcp --skill postgresgit clone --depth 1 https://github.com/neverinfamous/memory-journal-mcpWrote 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/neverinfamous/memory-journal-mcp/postgres)<a href="https://agentmods.dev/skills/neverinfamous/memory-journal-mcp/postgres"><img src="https://agentmods.dev/badge/skills/neverinfamous/memory-journal-mcp/postgres.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.00107 | $0.00677 |
| Opus 5 | $0.00053 | $0.00338 |
| Sonnet 5 | $0.00021 | $0.00135 |
| Haiku 4.5 | $0.00011 | $0.00068 |
Grade A, and why
postgres 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 5d 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 — 39 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PostgreSQL Production Standards
PostgreSQL is a deeply capable object-relational database. Because of its advanced feature set, AI agents and orchestrated deployment workflows MUST adhere to strict operational boundaries to avoid common pitfalls like index bloating, inefficient JSONB parsing, and locking regressions.
1. Advanced Querying & Safety
- Strict Parameterization: Just like MySQL, executing parameterized queries (
$1, $2, ...) is a non-negotiable hard mandate. String interpolation is globally prohibited. - Explicit Columns: NEVER use
SELECT *in production code. You must specifically query required columns. This minimizes data transfer latency and prevents application crashes if schema columns mutate. - N+1 Avoidance: Agents scaffolding code must implement batch loading architectures (e.g.,
DataLoader) or advancedJOINlogic when building APIs. Do not execute identical iterative queries inside loops. - Guarded Modifications: Any
UPDATEorDELETEMUST contain a deterministicWHEREblock.
2. Advanced Indexing Patterns
- Targeted Strategies: Do not blindly index every column. Optimize based on frequency.
- Partial Indexes: If you routinely query states like
WHERE active = true, you must use a Partial Index (CREATE INDEX idx_active_users ON users(email) WHERE active = true;) instead of indexing the entire column. - Composite Layout: For standard queries targeting multiple identifiers, employ Composite Indexes with the most selective columns first.
3. Operations & Migrations
- Transaction Safety: Wrap multi-step mutations in
BEGIN; ... COMMIT;. Standardize transactions to stay small and fast to prevent lock contentions. - Analytical Overviews: Use
EXPLAIN ANALYZElocally when debugging slow queries to analyze sequential sweeps relative to index scans. - Schema Extensibility: Add constraints and columns dynamically (e.g.,
ALTER TABLE users ADD CONSTRAINT unique_email UNIQUE (email);). Always apply saneDEFAULTproperties to avoid backfilling issues on massive tables.
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.
- 5d ago First seen · 39 lines · 107 tokens per session scan A 869f3b5245cd
postgres is a skill published in the GitHub repository neverinfamous/memory-journal-mcp (20 stars, last pushed 1mo ago), licensed MIT. It adds 107 tokens to every session and 677 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-30.
Other skills, from other repositories
migration-helper
Guide safe database and code migrations with zero-downtime strategies.
surrealdb-canonical-layer
Verify a SurrealDB-backed canonical layer directly, over the surrealdb MCP server, instead of writing a disposable Node script per check. Use whenever the user asks to confirm a batch of writes landed correctly ("did the FreedomFest speakers get tagged right", "do these people have an org relationship", "check that…
postgresql-psql
Comprehensive guide for PostgreSQL psql - the interactive terminal client for PostgreSQL. Use when connecting to PostgreSQL databases, executing queries, managing databases/tables, configuring connection options, formatting output, writing scripts, managing transactions, and using advanced psql features for database…
database-reviewer
PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.
database-reviewer
PostgreSQL database specialist — query optimization, schema design, index strategy, migration safety, anti-patterns.
postgresql-optimization
PostgreSQL optimization — query tuning, indexing strategies, EXPLAIN analysis, configuration, maintenance, and monitoring. Use when slow queries, missing indexes, vacuum lag, or performance bottlenecks are suspected.