Data Source Pattern Selector for Openclaw

A specialized architectural advisor that selects the optimal data access pattern for your persistence layer based on domain complexity and schema isomorphism.

quochungto
v1.0.0
Apr 21, 2026
0
350
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install bookforge-data-source-pattern-selector

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install bookforge-data-source-pattern-selector using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Data Source Pattern Selector?

The Data Source Pattern Selector is a technical guidance tool designed to help developers and architects navigate the critical decision of how objects interact with a database. By analyzing your domain logic and schema structure, this skill identifies the most sustainable pattern among the four canonical options: Table Data Gateway, Row Data Gateway, Active Record, and Data Mapper. Using Openclaw Skills like this ensures that your persistence strategy scales with your application logic rather than becoming a bottleneck.

This skill bridges the gap between high-level architectural theory and practical framework implementation. It evaluates whether your database schema is isomorphic with your domain objects and determines if your business logic weight justifies the complexity of a full Data Mapper. By leveraging Openclaw Skills, teams can avoid common pitfalls like business logic creeping into gateway classes or the over-engineering of simple CRUD applications.

Data Source Pattern Selector Use Cases

  • Designing the persistence layer for a new microservice before committing to a specific ORM.
  • Refactoring bloated Active Record models that have become difficult to maintain due to complex inheritance.
  • Evaluating whether a legacy database schema requires the isolation provided by the Data Mapper pattern.
  • Formalizing and documenting architectural decisions for database access layers using Openclaw Skills.
  • Deciding between different framework idioms such as Rails-style Active Record versus Hibernate-style Data Mapper.

How Data Source Pattern Selector Works

  1. Identify the primary domain-logic pattern in use, such as Table Module, Transaction Script, or Domain Model.
  2. Assess schema isomorphism to determine if database tables align one-to-one with code objects.
  3. Analyze the weight and complexity of business logic within the domain entities.
  4. Apply the specialized routing matrix to determine the primary data-source pattern recommendation.
  5. Map the recommended pattern to the specific language and framework idioms of your tech stack.
  6. Generate a comprehensive Pattern Decision Record through Openclaw Skills to document the rationale and migration path.

Data Source Pattern Selector Setup

To get started with this architectural tool, install the pattern library via your terminal:

clawhub install bookforge-patterns-of-enterprise-application-architecture

Once installed, provide your AI agent with your current domain-logic pattern and a description of your database schema to begin the selection process.

Data Source Pattern Selector Data Schema & Taxonomy

The skill organizes its analysis into a structured Pattern Decision Record with the following taxonomy:

Data Point Description
Context Summarizes the domain-logic pattern, schema isomorphism, and logic weight.
Recommendation The selected pattern (e.g., Active Record or Data Mapper).
Rationale Technical justification connecting constraints to the pattern choice.
Framework Mapping Idiomatic guidance for tools like Rails, Hibernate, or EF Core.
Migration Path Step-by-step instructions for refactoring from simpler to more complex patterns.
Anti-Patterns A checklist of common failure modes to avoid during implementation.

Data Source Pattern Selector Advanced Features

  • Multi-pattern routing that accounts for complex domain hierarchies and legacy schema constraints.
  • Seamless integration with downstream Openclaw Skills for implementing Unit of Work or Lazy Loading strategies.
  • Framework-specific mapping for over 20 modern ORM libraries including SQLAlchemy, Django, and Spring Data JPA.
  • Automated anti-pattern auditing to detect architectural drift in existing persistence codebases.
  • Support for migration path planning from Row Data Gateway to Active Record as business logic grows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*