bd-source-adapter

Community

Bridge WP data stores to better-data hydration.

AuthorLonsdale201
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill enables adding a new WordPress data store source adapter to better-data, enabling typed hydration of posts, users, terms, and options using the AttributeDrivenHydrator with a safe meta fetcher contract.

Core Features & Use Cases

  • Source adapter scaffolding: implement a public Source class in src/Source/<Name>Source.php that wires hydrate and hydrateMany to the hydrator engine.
  • Safe meta hydration: implement a meta fetcher closure that returns null for missing keys using metadata_exists, ensuring proper default fallback behavior.
  • Bulk hydration performance: prewarm WP caches with prime*_caches and update_meta_cache to avoid N+1 queries when hydrating many records.

Quick Start

Create a new WordPress data store source adapter under src/Source/NameSource.php implementing hydrate(int|WP_Type, string $dtoClass) and hydrateMany(array $ids, string $dtoClass) using the AttributeDrivenHydrator and a fetcher closure with metadata_exists guard.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: bd-source-adapter
Download link: https://github.com/Lonsdale201/wp-agent-skills/archive/main.zip#bd-source-adapter

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.