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/ayeshakhalid192007-dev/graph-engineering-crash-course/transact-graph-writenpx skills add ayeshakhalid192007-dev/graph-engineering-crash-course --skill transact-graph-writegit clone --depth 1 https://github.com/ayeshakhalid192007-dev/graph-engineering-crash-courseWrote 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/ayeshakhalid192007-dev/graph-engineering-crash-course/transact-graph-write)<a href="https://agentmods.dev/skills/ayeshakhalid192007-dev/graph-engineering-crash-course/transact-graph-write"><img src="https://agentmods.dev/badge/skills/ayeshakhalid192007-dev/graph-engineering-crash-course/transact-graph-write.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.1 | $0.00051 | $0.01003 |
| Opus 5 | $0.00026 | $0.00502 |
| Sonnet 5 | $0.00010 | $0.00201 |
| Haiku 4.5 | $0.00005 | $0.00100 |
Grade A, and why
transact-graph-write 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 — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
transact-graph-write
Reads a shared edge row's current version before writing to it, commits the write only if that version still matches, and on a rejected write re-reads the row's new state and recomputes the writer's actual intent against it before retrying — never dropping the write and never reapplying stale values.
Instructions
You are a Claude Code skill implementing the postgres-backed-graph
pattern. Follow these steps in order:
- Read the target edge row's current state inside a transaction,
including its
versionmarker — never read the row and decide on a write outside a transaction boundary. Default to thecheckout-v2-flagwrite sequence in this kit'sREADME.mdunless given a different one. - Compute the intended write against the version just read, and before committing, check that version still matches the row's current version. If it does, write the new state, increment the version, and commit — all inside the same transaction.
- If the version no longer matches — someone else's write committed to this row since this write was computed — do not commit a blind overwrite. Abort this transaction.
- On abort, re-read the row's now-current state, and recompute the writer's actual intent against that new state, not against the stale state the first attempt used. The retry must still accomplish what the writer originally meant (e.g. "roll back" is still "roll back"), reapplied to the row as it now stands — never a blind replay of the original write's literal values.
- Retry the write as a new transaction against the current version, following the same check-then-commit logic as step 2. If it's rejected again, repeat steps 3–5.
- Never let two writers' transactions interleave a partial write to the same row. Every write to a given edge happens as one atomic transaction, from the initial read-and-lock through commit, with nothing else touching that row in between.
- Log every committed write with
updated_byandupdated_at, so a later reader can reconstruct the actual order writes landed in, not just infer it from the final value. - Report, per writer: the version it started from, the version it ended on, the final value it wrote, and whether it committed straight through or needed one or more retries due to a concurrent conflicting write.
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 · 98 lines · 51 tokens per session scan A e9714ee0efc0
transact-graph-write is a skill published in the GitHub repository ayeshakhalid192007-dev/graph-engineering-crash-course (5 stars, last pushed 10d ago), licensed MIT. It adds 51 tokens to every session and 1,003 once invoked, about $0.0003 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
moai-domain-database
Database specialist covering PostgreSQL, MongoDB, Redis, Oracle, and cloud database platforms (Neon, Supabase, Firestore). Use for schema design, query optimization, indexing strategies, data modeling, or cloud database selection. Cloud vendor guide absorbed from moai-platform-database-cloud.
moai-platform-database-cloud
Cloud database platform specialist covering Neon (serverless PostgreSQL), Supabase (PostgreSQL 16 with real-time), and Firebase Firestore (NoSQL with offline sync). Use when choosing or setting up cloud databases.
building-agents
Use when building or restructuring an LLM agent — provider adapter, tool calling, structured output, RAG, agent loop, eval gate, cost routing, tracing, MCP server — model-agnostic across OpenAI/Anthropic/Gemini/OSS so a model swap is a config change. NOT vector-store SQL alone (that is postgresdb) or service…
mongodb
Use when modeling MongoDB documents (embed versus reference, the 16MB cap, bucket and subset patterns), choosing or fixing indexes (compound order by the ESR rule, partial, TTL, multikey, reading explain), writing aggregation pipelines that stay index-eligible, running multi-document transactions with retry, or…
postgresdb
Use when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles, RLS, pooling, vacuum, partitioning, PITR). PG16, ORM-agnostic. NOT portable query logic (that is sql), NOT a managed provider's platform…
dynamodb
Use when modeling or operating a DynamoDB table: deriving partition/sort keys from access patterns, single-table vs table-per-entity, adding a GSI/LSI, on-demand vs provisioned capacity, or diagnosing hot-partition throttling. NOT relational schema/SQL/EXPLAIN (that is postgresdb), NOT aggregation-pipeline document…