auto-generated-model-repository-pattern

Migrate static model configs to database-backed repositories with client hooks and server helpers.

7|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/planetaryescape/blah.chat --skill auto-generated-model-repository-pattern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auto-generated-model-repository-pattern
Source: https://github.com/planetaryescape/blah.chat/tree/main/.claude/skills/auto-generated-model-repository-pattern
Command: npx skills add https://github.com/planetaryescape/blah.chat --skill auto-generated-model-repository-pattern

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the challenge of migrating from static model configurations to a dynamic, database-backed repository. It enables cohesive client/server access to models via client-side hooks and server-side static helpers, while preserving an AUTO_MODEL injection path.

Core Features & Use Cases

  • Client-side reactive hooks (useModels, useModel) that load models from a centralized database-enabled store.
  • Server-side static helpers that provide immediate access to model configurations without querying at runtime.
  • AUTO_MODEL injection that routes requests to the optimal model at runtime, maintaining flexibility and performance.
  • Supports migrations from MODEL_CONFIG to Convex DB storage with a clean separation of concerns between client and server.

Quick Start

Start by reviewing the repository pattern in your codebase. Then use the client hooks to fetch available models and the AUTO_MODEL as a default rider for routing decisions, followed by server-side helpers to fetch single models when needed.

Frequently Asked Questions about auto-generated-model-repository-pattern

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

FAQPage Schema
How do I migrate static model configurations to a dynamic database-backed repository?

To migrate static model configurations to a dynamic database-backed repository, use this skill to move configurations into Convex DB storage while maintaining client-server separation through reactive client hooks and server-side static helpers.

Can I use reactive hooks to load models from a Convex database on the client side?

Yes, you can use reactive hooks to load models from a Convex database on the client side. The skill provides useModels and useModel hooks that fetch configurations from a centralized database-enabled store with lazy loading support.

What is the best way to inject AUTO_MODEL at runtime without storing it in the database?

The best way to inject AUTO_MODEL at runtime without storing it in the database is to use this skill's injection path, which routes requests to the optimal model dynamically while keeping the configuration store clean and separated.

Does this repository pattern support lazy loading and explicit loading checks for models?

Yes, this repository pattern supports lazy loading and explicit loading checks for models. It ensures configurations are fetched only when needed via client-side hooks, satisfying requirements for explicit loading state verification.

How do server-side static helpers access model configurations without runtime queries?

Server-side static helpers access model configurations without runtime queries by providing immediate access to presets directly from the database-backed repository, bypassing the reactive client hooks used for dynamic fetching.

When should I separate client and server model access in a reactive database application?

You should separate client and server model access in a reactive database application when migrating from static configs to dynamic DB storage, ensuring the client uses reactive hooks while the server uses static helpers for immediate configuration access.