cli-forge-data

cli-forge-data is a skill for Claude Code from Destynova2/cli-code-skills. It costs 76 tokens per session (2,059 once invoked), scanned A, original, MIT.

A skill for designing and implementing safe PostgreSQL database changes in Rust applications that use SQLx, a Rust library for working with SQL databases. It focuses on explicit rules, compatible changes, short transactions, and tests or other proof of safety.

In plain words
What is it for?
It is for creating schemas, migrations, constraints, indexes, repositories, transaction boundaries, queues, state machines, multi-tenant data, soft deletion, ledgers, and repair jobs in PostgreSQL and Rust.
Why use it?
It reduces the risk of broken migrations, inconsistent data, race conditions, and unsafe transaction or concurrency logic.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter.

Part of the cli-code-skills plugin — 36 skills shipped together

Good fit It is for creating schemas, migrations, constraints, indexes, repositories, transaction boundaries, queues, state machines, multi-tenant data, soft deletion, ledgers, and repair jobs in PostgreSQL and Rust.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/destynova2/cli-code-skills/cli-forge-data
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 Destynova2/cli-code-skills --skill cli-forge-data
Clone the repo
git clone --depth 1 https://github.com/Destynova2/cli-code-skills

Made for: Claude Code.

Or install cli-code-skills, the plugin that ships this one along with the rest of its 36 skills.

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 cli-forge-data

README.md
[![agentmods](https://agentmods.dev/badge/skills/destynova2/cli-code-skills/cli-forge-data/github.svg)](https://agentmods.dev/skills/destynova2/cli-code-skills/cli-forge-data)
Your own site
<a href="https://agentmods.dev/skills/destynova2/cli-code-skills/cli-forge-data"><img src="https://agentmods.dev/badge/skills/destynova2/cli-code-skills/cli-forge-data/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 cli-forge-data

Your own site · 80×15
<a href="https://agentmods.dev/skills/destynova2/cli-code-skills/cli-forge-data"><img src="https://agentmods.dev/badge/skills/destynova2/cli-code-skills/cli-forge-data.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,059 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.00076 $0.02059
Opus 5.5 $0.00030 $0.00824
Sonnet 5.5 $0.00015 $0.00412
Haiku 4.5 $0.00008 $0.00206

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

Security

Grade A, and why

cli-forge-data 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.

cli-forge-data/SKILL.md · 220 lines

How it starts

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

Optimization: Load the shared invariant contract first, then only the PostgreSQL/SQLx references needed by the requested change.

Language rule: Write user-facing decisions and reports in the project's dominant language. Keep SQL, Rust identifiers, SQLSTATE values, and the mandatory uncertainty marker unchanged.

Forge Data — Safe PostgreSQL and SQLx Changes

Design or implement database changes whose safety comes from explicit invariants, PostgreSQL guarantees, short atomic operations, compatible evolution, and reproducible proof.

Read ../shared/data-invariants.md before acting. Read ../gotchas.md before producing output. Read ../shared/data-invariant-catalog.md when discovering domain rules, and ../shared/postgres-sqlx-patterns.md before writing non-trivial SQL.

Modes

Mode Trigger Behavior
Design User asks for schema, transaction, migration, or data architecture Produce a database decision and proof plan before code
Implementation User asks to build/fix the change or accepts a design Edit migrations/Rust/tests, then execute the relevant gates
Correction cli-audit-data finding is supplied Preserve the finding's invariant and close the smallest unsafe gap

Do not implement in design-only mode. In implementation or correction mode, inspect the existing schema and code before editing; never infer the database solely from Rust structs.

Non-negotiable rules

  1. Give every business fact one authoritative owner.
  2. Protect persistent invariants in PostgreSQL whenever a declarative guarantee exists.
  3. Put every write belonging to one business decision in one explicit transaction.
  4. Never perform network I/O while a PostgreSQL transaction is open.
  5. Treat zero affected rows as a business result when the command is conditional.
  6. Give every retryable command an explicit idempotency protocol.
  7. Retry a whole failed transaction, never one middle statement.
  8. Use a transactional outbox/inbox protocol for cross-system effects.
  9. Design migrations for old code, new code, and mixed-version deployment.
  10. Never edit an already-applied migration silently.
  11. Include tenant scope in database keys and references, not only query filters.
  12. Make derived facts reconstructible or provide auditable detection and repair.
  13. Never use SQLite or mocks as proof of PostgreSQL concurrency behavior.
  14. Never claim cross-system exactly-once behavior without a demonstrated protocol.

Read the full file on GitHub · 220 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. 1mo ago First seen · 220 lines · 76 tokens per session scan A 76e468c90d3c

Subscribe to this mod's changes

cli-forge-data is a skill published in the GitHub repository Destynova2/cli-code-skills (5 stars, last pushed 1mo ago), licensed MIT. It adds 76 tokens to every session and 2,059 once invoked, about $0.0003 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

Other skills, from other repositories

surrealism

SurrealDB Surrealism WASM extension development. Write Rust functions, compile to WASM, deploy as database modules. Part of the surreal-skills collection.

skillmds/skillmd · 37 tokens

diesel-guard

Lints Diesel and SQLx Postgres migrations for unsafe schema changes that lock tables or cause downtime, and authors custom Rhai checks. Use when reviewing, writing, or fixing SQL migrations, when diesel-guard reports a violation, when configuring diesel-guard.toml, or when the user mentions migration safety, table…

ayarotsky/diesel-guard · 77 tokens

database

Query and manage SQLite, PostgreSQL, and MySQL databases from the command line. Use when the user asks to run SQL queries, inspect database schemas, create or alter tables, import or export data, manage indexes, analyze query performance with EXPLAIN, back up or restore databases, or perform CRUD operations via…

bug-ops/zeph · 76 tokens

managing-supabase

Supabase CLI for database management, Edge Functions, migrations, and local development. Use for managing Postgres databases, deploying serverless functions, and debugging Supabase projects.

FortiumPartners/ensemble · 40 tokens

using-prisma

Prisma 5+ ORM with schema-first design, type-safe client, migrations, and database integrations (Supabase, PlanetScale, Neon). Use for TypeScript/JavaScript database access.

FortiumPartners/ensemble · 43 tokens

golem-add-postgres-rust

Using golem:rdbms/postgres from a Rust Golem agent. Use when the user asks to connect to PostgreSQL, run SQL, execute a Postgres transaction, or use PostgreSQL from Rust agent code.

golemcloud/golem · 52 tokens