skillsight: Command for Claude Code

.claude/commands/create-drizzle-repository.md

create-drizzle-repository is a command for Claude Code from PackmindHub/skillsight. It costs 51 tokens per session (534 once invoked), scanned A, original, Apache-2.0.

A project-specific command that creates a repository for database access using Drizzle, a TypeScript database toolkit. It defines a domain interface, adds typed database queries, and connects the repository to dependency injection.

In plain words
What is it for?
Adding persistence for a new table or entity, splitting an oversized repository, and wiring the required repository methods into the application.
Why use it?
It keeps data access consistent with the project's existing structure and prevents use cases from depending directly on database row types. This supports testable read and write code.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is PackmindHub/skillsight's own configuration. It tells Claude Code how to work on skillsight itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything skillsight configures →

Reuse

Borrowing it

Nothing to install: this file belongs to PackmindHub/skillsight. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/PackmindHub/skillsight/main/.claude/commands/create-drizzle-repository.md
Clone the repo
git clone --depth 1 https://github.com/PackmindHub/skillsight

Made for: Claude Code.

Wrote 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.

agentmods badge for create-drizzle-repository

README.md
[![agentmods](https://agentmods.dev/badge/commands/packmindhub/skillsight/create-drizzle-repository.svg)](https://agentmods.dev/commands/packmindhub/skillsight/create-drizzle-repository)
Your own site
<a href="https://agentmods.dev/commands/packmindhub/skillsight/create-drizzle-repository"><img src="https://agentmods.dev/badge/commands/packmindhub/skillsight/create-drizzle-repository.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 534 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.00534
Opus 5 $0.00026 $0.00267
Sonnet 5 $0.00010 $0.00107
Haiku 4.5 $0.00005 $0.00053

Measured 7d ago against content hash c4fe96c4d83e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

create-drizzle-repository 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 7d 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.

.claude/commands/create-drizzle-repository.md · 42 lines

What it actually says

Create a Drizzle Repository

Scaffold a new data-access repository the way every existing one is built: a port interface in domain/ports/, a Drizzle*Repository implementation in infrastructure/repositories/, and DI wiring in bootstrap/compose.ts. Use this when a use case needs to read or write a new table.

When to Use

  • A new use case needs persistence for an entity that has no repository yet.
  • You added a table to backend/src/db/schema.ts and need typed access to it.
  • Splitting an over-broad repository into a focused one.

Checkpoints

  • What is the entity/aggregate name (drives I<Name>Repository and Drizzle<Name>Repository)?
  • Does the table already exist in backend/src/db/schema.ts, or is a migration needed first?
  • Which read/write methods does the consuming use case actually require?

Steps

1. Declare the port

Add backend/src/domain/ports/<name>-repository.ts with an interface I<Name>Repository. Methods return domain entities (from domain/), use Promise<Entity | null> for single lookups, and never reference Drizzle row types.

2. Implement with Drizzle

Add backend/src/infrastructure/repositories/drizzle-<name>-repository.ts: export class Drizzle<Name>Repository implements I<Name>Repository with constructor(private readonly db: AppDb) {}. Use the Drizzle query builder; return row ?? null for single rows. For "IN (list)" filters use inArray(column, jsArray) from drizzle-orm — never ANY(${arr}::text[]).

3. Wire into the DI container

Instantiate the repository in backend/src/bootstrap/compose.ts and expose it so route handlers can inject it into use cases.

4. Migrate if the schema changed

If you touched backend/src/db/schema.ts, run bun run migrate:generate from backend/ (never hand-author migration files), then bun run migrate:run.

5. Verify

Run bun run typecheck and bun run lint; add a use-case test that supplies a stubbed I<Name>Repository.

Changes

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.

  1. 7d ago First seen · 42 lines · 51 tokens per session scan A c4fe96c4d83e

Subscribe to this mod's changes

create-drizzle-repository is a command published in the GitHub repository PackmindHub/skillsight (9 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 51 tokens to every session and 534 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.