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/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.
<a href="https://agentmods.dev/skills/justhamade/triadjs/triad-drizzle"><img src="https://agentmods.dev/badge/skills/justhamade/triadjs/triad-drizzle.svg" alt="Reviewed on agentmods" width="80" 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.5 | $0.00024 | $0.00670 |
| Sonnet 5.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 2mo 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.
- 2mo ago First seen · 151 lines · 61 tokens per session scan A ef35dea95fa6
triad-drizzle is a skill published in the GitHub repository justhamade/triadjs (24 stars, last pushed 6mo ago), licensed MIT. It adds 61 tokens to every session and 1,675 once invoked, about $0.0002 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-30.
triad-drizzle compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| triad-drizzlejusthamade/triadjs | Skill | 24 | 6mo ago | MIT | A | 61 | Claude Code |
| create-prprisma/orm | Skill | 48k | yesterday | Apache-2.0 | A | 48 | Claude Code, Codex |
| schema-explorationlangchain-ai/deepagents | Skill | 31k | today | MIT | A | 57 | Claude Code, Codex |
| atlas-mssqlariga/atlas | Skill | 8.8k | 2d ago | Apache-2.0 | A | 163 | Claude Code |
| ha-data-storesshiwenwen/hope-agent | Skill | 1.9k | yesterday | MIT | A | 115 | Claude Code, Codex |
| nornicdb-cypher-queriesorneryd/NornicDB | Skill | 924 | today | MIT | A | 79 | Claude Code, Codex |
| volcengine-rds-postgresqlbytedance/agentkit-samples | Skill | 484 | yesterday | Apache-2.0 | A | 63 | Claude Code, Codex |