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 skills add zhe-qi/clhoria-template --skill drizzle-v1git clone --depth 1 https://github.com/zhe-qi/clhoria-templateWrote 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/zhe-qi/clhoria-template/drizzle-v1)<a href="https://agentmods.dev/skills/zhe-qi/clhoria-template/drizzle-v1"><img src="https://agentmods.dev/badge/skills/zhe-qi/clhoria-template/drizzle-v1/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/zhe-qi/clhoria-template/drizzle-v1"><img src="https://agentmods.dev/badge/skills/zhe-qi/clhoria-template/drizzle-v1.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00048 | $0.04106 |
| Opus 5 | $0.00024 | $0.02053 |
| Sonnet 5 | $0.00010 | $0.00821 |
| Haiku 4.5 | $0.00005 | $0.00411 |
Grade A, and why
drizzle-v1 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 12d 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 — 580 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Drizzle ORM v1 (Relations Query v2) 指南
版本信息
- 当前版本:
[email protected](已进入 RC 阶段) - 官方文档: 所有 drizzle 官方文档已更新为 v1 写法
- 关键变化: Relations 定义方式、查询 API、多对多 through 支持
核心概念
drizzle() 初始化
传入 relations 而非 schema:
import { drizzle } from "drizzle-orm/postgres-js";
import { relations } from "./relations";
const db = drizzle({
client: getQueryClient(),
relations,
casing: "snake_case",
});
Relations 定义
基本结构
使用 defineRelations 在一处定义所有关系:
// src/db/relations/index.ts
import { defineRelations } from "drizzle-orm";
import * as schema from "@/db/schema";
export const relations = defineRelations(schema, (r) => ({
// 每个表的关系定义
users: {
posts: r.many.posts(),
},
posts: {
author: r.one.users({
from: r.posts.authorId,
to: r.users.id,
}),
},
}));
本项目的分片模式
本项目使用 defineRelationsPart + spread 方式拆分关系定义:
// src/db/relations/index.ts
import { defineRelations } from "drizzle-orm";
import * as schema from "@/db/schema";
import { userRolesRelations } from "./admin/user-roles";
export const relations = defineRelations(schema, (r) => ({
...userRolesRelations(r),
}));
// src/db/relations/admin/user-roles.ts
import type { ExtractTablesFromSchema, RelationsBuilder } from "drizzle-orm";
import type * as schema from "@/db/schema";
type Schema = ExtractTablesFromSchema<typeof schema>;
export const userRolesRelations = (r: RelationsBuilder<Schema>) => ({
systemUsers: {
roles: r.many.systemRoles({
from: r.systemUsers.id.through(r.systemUserRoles.userId),
to: r.systemRoles.id.through(r.systemUserRoles.roleId),
}),
enabledRoles: r.many.systemRoles({
from: r.systemUsers.id.through(r.systemUserRoles.userId),
to: r.systemRoles.id.through(r.systemUserRoles.roleId),
where: { status: Status.ENABLED },
}),
},
systemRoles: {
users: r.many.systemUsers(),
},
});
关键模式:
- 类型使用
ExtractTablesFromSchema<typeof schema>+RelationsBuilder<Schema> - 返回对象直接 spread 到
defineRelations中 - 按
src/db/relations/{tier}/{feature}.ts组织文件
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.
- 12d ago First seen · 580 lines · 48 tokens per session scan A 6b0d72743081
drizzle-v1 is a skill published in the GitHub repository zhe-qi/clhoria-template (190 stars, last pushed 1mo ago), licensed MIT. It adds 48 tokens to every session and 4,106 once invoked, about $0.0002 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
no-bare-casts
Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.
azure-resource-manager-postgresql-dotnet
Azure PostgreSQL Flexible Server SDK for .NET. Database management for PostgreSQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "PostgreSQL", "PostgreSqlFlexibleServer", "PostgreSQL Flexible Server", "Azure Database for…
azure-cosmos-java
Azure Cosmos DB SDK for Java. NoSQL database operations with global distribution, multi-model support, and reactive patterns. Triggers: "CosmosClient java", "CosmosAsyncClient", "cosmos database java", "cosmosdb java", "document database java".
azure-data-tables-java
Build table storage applications with Azure Tables SDK for Java. Use when working with Azure Table Storage or Cosmos DB Table API for NoSQL key-value data, schemaless storage, or structured data at scale.
efcore-patterns
Entity Framework Core best practices including NoTracking by default, query splitting for navigation collections, migration management, dedicated migration services, and common pitfalls to avoid.
jpa-patterns
JPA/Hibernate patterns and common pitfalls (N+1, lazy loading, transactions, queries). Use when user has JPA performance issues, LazyInitializationException, or asks about entity relationships and fetching strategies.