Clarity DAL Architect

Enforce Clarity Data Access Layer architecture patterns and Drizzle ORM imports.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/zacharyr0th/next-starter --skill clarity-dal-architect
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Clarity DAL Architect
Source: https://github.com/zacharyr0th/next-starter/tree/main/.claude/skills/clarity-dal-architect
Command: npx skills add https://github.com/zacharyr0th/next-starter --skill clarity-dal-architect

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces Clarity project architecture: centralized DAL for auth, canonical types in a single place, repository pattern, and proper Drizzle usage.

Core Features & Use Cases

  • DAL-based authentication checks and redirects
  • Canonical type imports from centralized types
  • Repository pattern for data access
  • Balance helpers and secure patterns
  • Drizzle ORM import correctness

Quick Start

Request an architecture audit for a module to verify patterns and imports.

Frequently Asked Questions about Clarity DAL Architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Data Access Layer architecture patterns in a Drizzle ORM project?

Data Access Layer auditing validates that your project enforces centralized DAL patterns, including repository-based data access, canonical type imports from a single location, and correct Drizzle ORM usage. This Skill reviews modules to verify auth helpers (getUserId, verifySession), type centralization in @/lib/types, and proper repository patterns under /lib/db/repositories.

What is the repository pattern and why does it matter for DAL organization?

The repository pattern abstracts data access logic into dedicated modules, creating a single source of truth for queries and database interactions. It centralizes how your application accesses data, making type safety consistent, encryption handling predictable, and Drizzle ORM imports traceable across your codebase.

Can I enforce centralized type imports and authentication patterns across my Drizzle project?

Yes. This Skill enforces Clarity project architecture by validating that all type imports come from @/lib/types, auth helpers (getUserId, verifySession) are used consistently, and data access flows through repository modules. It catches imports from scattered locations and ensures encryption-aware balance handling throughout.

How do I verify my project meets repository and type centralization requirements?

Request an architecture audit to validate that your modules follow the repository pattern, import types from the canonical centralized location, use Drizzle ORM correctly, and leverage centralized auth helpers. The audit identifies deviations from Clarity patterns and recommends corrections.

What authentication helpers should be centralized in a DAL-based architecture?

Centralized auth helpers like getUserId and verifySession provide consistent session validation and user identification across your application. Storing these in a dedicated DAL location ensures encryption-aware handling, reduces duplication, and makes authentication logic auditable and maintainable.

Does this apply to existing Drizzle ORM codebases or new projects?

This Skill audits existing Drizzle ORM projects to verify they follow Clarity architecture patterns. It validates current DAL structure, type imports, repository usage, and auth patterns, then recommends refactoring where imports are scattered, patterns are inconsistent, or Drizzle usage deviates from the standard.