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.md
source 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:

PlaceholderReplace WithExample
BLOCK_NAME
kebab-case name
gallery
,
hero-section
BLOCK_TITLE
Human-readable title
Gallery Carousel
BLOCK_CLASS
PascalCase class
GalleryCarousel
BLOCK_DESCRIPTION
Short description
Image gallery with carousel
CATEGORY
Block category
media
,
text
,
design
ICON
Dashicon name
format-gallery
,
admin-home
FIELD_NAME
ACF field name
gallery_images

Native Block Scaffolds

For blocks built with

@wordpress/scripts
in
src/blocks/
:

FileTemplatePurpose
block.json
block-json-native.jsonBlock metadata
render.php
render-native.phpServer-side render
helpers.php
helpers-native.phpHelper functions
view.ts
view.tsFrontend Web Component
style.css
style.cssFrontend styles
edit.tsx
edit.tsxEditor component

ACF Block Scaffolds

For ACF PRO blocks in

blocks/acf-{name}/
:

FileTemplatePurpose
block.json
block-json-acf.jsonACF block metadata
render.php
render-acf.phpRender template
helpers.php
helpers-acf.phpHelper functions

Test Scaffolds

FileTemplatePurpose
view.test.ts
view.test.tsVitest Web Component tests
HelpersTest.php
helpers.test.phpPHPUnit 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