Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/justhamade/triadjsnpx agentmods add skills/justhamade/triadjs/triad-drizzleWrote 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/justhamade/triadjs/triad-drizzle)<a href="https://agentmods.dev/skills/justhamade/triadjs/triad-drizzle"><img src="https://agentmods.dev/badge/skills/justhamade/triadjs/triad-drizzle.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.00061 | $0.01675 |
| Opus 5 | $0.00030 | $0.00838 |
| Sonnet 5 | $0.00012 | $0.00335 |
| Haiku 4.5 | $0.00006 | $0.00168 |
Grade A, and why
triad-drizzle 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 8d 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 — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Drizzle bridge
The Drizzle bridge is not a migration tool. It reads .storage() hints on your models and emits a Drizzle schema file that you then check in. triad db generate regenerates the file when schemas change. You can hand-edit the generated file if you need features Triad doesn't model — but beware that running the generator again will overwrite it.
Marking a model as a table
Every field that should become a column must be on a t.model that has at least one field marked .storage({ primaryKey: true }). Models without a PK hint are not treated as tables and are skipped silently.
export const Pet = t.model('Pet', {
id: t.string().format('uuid').identity().storage({ primaryKey: true }),
name: t.string().minLength(1).maxLength(100).storage({ indexed: true }),
species: t.enum('dog', 'cat', 'bird', 'fish').storage({ indexed: true }),
age: t.int32().min(0).max(100),
status: t.enum('available', 'adopted', 'pending').default('available'),
createdAt: t.datetime().storage({ defaultNow: true }),
});
.identity()is the DDD identity marker;.storage({ primaryKey: true })is the persistence hint. They are different and most ID fields need both.
.storage() options
| Option | Effect |
|---|---|
primaryKey: true |
Marks the field as the table's PK (required to become a table) |
unique: true |
Unique constraint |
indexed: true |
Secondary index |
columnName: 'user_id' |
Override the SQL column name |
defaultNow: true |
Default to CURRENT_TIMESTAMP |
defaultRandom: true |
Default to a random UUID |
references: 'projects.id' |
Foreign key reference |
custom: { ... } |
Dialect-specific hints |
.storage() accumulates across calls — you can chain multiple to layer hints.
Dialects
sqlite, postgres, mysql. All three emit valid Drizzle sqliteTable/pgTable/mysqlTable definitions. Type mapping is logical:
| Triad type | Drizzle (SQLite) | Drizzle (Postgres) | Drizzle (MySQL) |
|---|---|---|---|
t.string() |
text |
text |
text |
t.string().format('uuid') |
text |
uuid |
varchar(36) |
t.datetime() |
text (ISO) |
text (ISO) |
text (ISO) |
t.int32() |
integer |
integer |
int |
t.int64() |
integer |
bigint |
bigint |
t.float64() |
real |
doublePrecision |
double |
t.boolean() |
integer (0/1) |
boolean |
tinyint |
t.enum(...) |
text + CHECK |
text (or pgEnum if configured) |
text |
t.array / t.record / ... |
text JSON |
jsonb |
json |
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.
- 8d ago First seen · 151 lines · 61 tokens per session scan A ef35dea95fa6
triad-drizzle is a skill published in the GitHub repository justhamade/triadjs (23 stars, last pushed 4mo ago), licensed MIT. It adds 61 tokens to every session and 1,675 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-30.
Other skills, from other repositories
schema-exploration
Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.
ha-data-stores
Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…
supabase
Supabase / PostgREST Row-Level-Security playbook — pull the anon (or leaked servicerole) key out of the frontend JS, map tables from the auto-generated OpenAPI spec, test anonymous RLS READ disclosures (PII/secret leaks), and anonymous RLS WRITE abuse (insert/update/delete — e.g. forging…
nornicdb-cypher-queries
Pick fast, predictable Cypher query shapes in NornicDB — point lookups, batch retrieval, pagination, search, traversal, batched UNWIND/MERGE writes, cleanup, multi-tenant isolation. Use when writing or reviewing Cypher whose latency or throughput matters; maps user intent to the executor's hot-path query templates.
dsql
Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, foreign key…
volcengine-rds-postgresql
A tool for operating PostgreSQL databases hosted by Volcano Engine's managed database service. PostgreSQL is a relational database used to store structured application data.