Borrowing it
Nothing to install: this file belongs to LooseWireDev/mealforge. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/LooseWireDev/mealforge/main/.agents/skills/trpc-drizzle-patterns/SKILL.mdgit clone --depth 1 https://github.com/LooseWireDev/mealforgeWrote 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/loosewiredev/mealforge/trpc-drizzle-patterns)<a href="https://agentmods.dev/skills/loosewiredev/mealforge/trpc-drizzle-patterns"><img src="https://agentmods.dev/badge/skills/loosewiredev/mealforge/trpc-drizzle-patterns/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/loosewiredev/mealforge/trpc-drizzle-patterns"><img src="https://agentmods.dev/badge/skills/loosewiredev/mealforge/trpc-drizzle-patterns.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.00062 | $0.00877 |
| Opus 5.5 | $0.00025 | $0.00351 |
| Sonnet 5.5 | $0.00012 | $0.00175 |
| Haiku 4.5 | $0.00006 | $0.00088 |
Grade A, and why
trpc-drizzle-patterns 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 — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
tRPC + Drizzle Patterns (Hono backend)
Context and procedures
apps/api/src/trpc.ts is the hub. It defines:
export interface Context {
req: Request;
session: Session | null; // Session = typeof auth.$Infer.Session (Better Auth)
}
createContext resolves the session once per request via auth.api.getSession({ headers: req.headers }).
publicProcedure— no auth requirement.protectedProcedure— throwsTRPCError({ code: 'UNAUTHORIZED' })when there is no session, and narrowsctx.sessionto non-null for everything chained after it. Use it for anything user-specific; never re-check the session manually inside a protected handler.
Feature routers
Each feature owns a router in apps/api/src/features/<name>/router.ts:
import { z } from 'zod';
import { router, publicProcedure, protectedProcedure } from '../../trpc';
import { listThings } from './service';
export const thingRouter = router({
list: publicProcedure.query(() => listThings()),
create: protectedProcedure
.input(z.object({ name: z.string().min(1) }))
.mutation(({ ctx, input }) => createThing(ctx.session.user.id, input)),
});
Rules:
- Every input is a Zod schema. No unvalidated
input. - Routers stay thin — business logic lives in the feature's
service.ts, with explicit return types on every exported function. - Services throw
TRPCErrorwith the right code (NOT_FOUND,FORBIDDEN, ...). No try/catch in services or routers — errors propagate to the tRPC error handler. - Feature routers are registered in
appRouterby the feature generator via the// forge:feature-imports/// forge:feature-routersanchors intrpc.ts. Never register by hand; never delete the anchors.
Drizzle
- Tables live in
apps/api/src/db/schema.ts; auth tables are separate inapps/api/src/auth/authSchema.ts(owned by Better Auth — don't hand-edit). - The project is either postgres (
drizzle-orm/pg-core:pgTable,serial, ...) or sqlite (drizzle-orm/sqlite-core:sqliteTable,integer, ...) — check the existing imports inschema.tsand stay consistent. - Migrations:
drizzle.config.tsatapps/api/is already wired to the right dialect; generate migrations with drizzle-kit intosrc/db/migrations/. - Better Auth uses
drizzleAdapter(db, { provider: 'pg' | 'sqlite' })insrc/auth/auth.ts— the provider must match the database.
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 · 70 lines · 62 tokens per session scan A 4cf07afcde92
trpc-drizzle-patterns is a skill published in the GitHub repository LooseWireDev/mealforge (1 stars, last pushed 3mo ago), licensed MIT. It adds 62 tokens to every session and 877 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-31.
trpc-drizzle-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| trpc-drizzle-patternsLooseWireDev/mealforge | Skill | 1 | 3mo ago | MIT | A | 62 | Claude Code, Codex |
| typescript-guidexonovex/platform | Skill | 6 | 12d ago | MIT | A | 63 | Claude Code |
| zod-guidexonovex/platform | Skill | 6 | 12d ago | MIT | A | 87 | Claude Code |
| api-errorscyanheads/pubmed-mcp-server | Skill | 167 | 3d ago | Apache-2.0 | A | 54 | Claude Code |
| scraperapi-nodejs-sdkscraperapi/scraperapi-skills | Skill | 10 | 3mo ago | MIT | B | 187 | Claude Code |
| api-errorscyanheads/clinicaltrialsgov-mcp-server | Skill | 100 | 2d ago | Apache-2.0 | A | 54 | Claude Code |
| api-errorscyanheads/secedgar-mcp-server | Skill | 11 | 2d ago | Apache-2.0 | A | 54 | Claude Code |