Claude-skill-registry block-scaffolds
Copy-paste scaffolds for Oh My Brand! blocks. Templates for block.json, render.php, helpers.php, view.ts, style.css, and tests. Use when creating new blocks.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/block-scaffolds" ~/.claude/skills/majiayu000-claude-skill-registry-block-scaffolds && rm -rf "$T"
manifest:
skills/data/block-scaffolds/SKILL.mdsource content
Block Scaffolds
Ready-to-use templates for creating new blocks in the Oh My Brand! FSE theme.
When to Use
- Creating a new native WordPress block
- Creating a new ACF block
- Starting test files for blocks
- Quick copy-paste for block files
Placeholders
Replace these placeholders in all templates:
| Placeholder | Replace With | Example |
|---|---|---|
| kebab-case name | , |
| Human-readable title | |
| PascalCase class | |
| Short description | |
| Block category | , , |
| Dashicon name | , |
| ACF field name | |
Native Block Scaffolds
For blocks built with
@wordpress/scripts in src/blocks/:
| File | Template | Purpose |
|---|---|---|
| block-json-native.json | Block metadata |
| render-native.php | Server-side render |
| helpers-native.php | Helper functions |
| view.ts | Frontend Web Component |
| style.css | Frontend styles |
| edit.tsx | Editor component |
ACF Block Scaffolds
For ACF PRO blocks in
blocks/acf-{name}/:
| File | Template | Purpose |
|---|---|---|
| block-json-acf.json | ACF block metadata |
| render-acf.php | Render template |
| helpers-acf.php | Helper functions |
Test Scaffolds
| File | Template | Purpose |
|---|---|---|
| view.test.ts | Vitest Web Component tests |
| helpers.test.php | PHPUnit helper tests |
Quick Start
Native Block
# 1. Create directory mkdir -p src/blocks/my-block # 2. Copy templates from references/ # 3. Replace placeholders # 4. Build: pnpm run build
ACF Block
# 1. Create directory mkdir -p blocks/acf-my-block # 2. Copy templates from references/ # 3. Replace placeholders # 4. Create field group in WP Admin > ACF # 5. Register in functions.php $acf_blocks array
Related Skills
- native-block-development - Block structure guide
- acf-block-registration - ACF blocks guide
- web-components - View script patterns
- block-editor-components - Edit component patterns
- vitest-testing - TypeScript testing
- phpunit-testing - PHP testing