wp-block-development

द्वारा wordpress

We need to translate the given English text into Hindi, preserving the name "wp-block-development" only if it appears in the source text. The source text does not contain that name; it's only in the instruction. So we translate the text inside <text>. The text is a description of a skill for WordPress block development. We must preserve product names (WordPress, Gutenberg), protocol names, URLs (none), numbers (3, 6.9+), technical terms (block.json, register_block_type_from_metadata(), apiVersion, iframe, etc.). No extra commentary, labels, or formatting. Translation: WordPress ब्लॉक विकास Gutenberg के लिए: मेटाडेटा, पंजीकरण, रेंडरिंग, और बिल्ड वर्कफ़्लो। इसमें ब्लॉक निर्माण, block.json कॉन्फ़िगरेशन, स्थिर बनाम गतिशील रेंडरिंग

npx skills add https://github.com/wordpress/agent-skills --skill wp-block-development

WP Block Development

When to use

Use this skill for block work such as:

  • creating a new block, or updating an existing one
  • changing block.json (scripts/styles/supports/attributes/render/viewScriptModule)
  • fixing “block invalid / not saving / attributes not persisting”
  • adding dynamic rendering (render.php / render_callback)
  • block deprecations and migrations (deprecated versions)
  • build tooling for blocks (@wordpress/scripts, @wordpress/create-block, wp-env)

Inputs required

  • Repo root and target (plugin vs theme vs full site).
  • The block name/namespace and where it lives (path to block.json if known).
  • Target WordPress version range (especially if using modules / viewScriptModule).

Procedure

0) Triage and locate blocks

  1. Run triage:
    • node skills/wp-project-triage/scripts/detect_wp_project.mjs
  2. List blocks (deterministic scan):
    • node skills/wp-block-development/scripts/list_blocks.mjs
  3. Identify the block root (directory containing block.json) you’re changing.

If this repo is a full site (wp-content/ present), be explicit about which plugin/theme contains the block.

1) Create a new block (if needed)

If you are creating a new block, prefer scaffolding rather than hand-rolling structure:

  • Use @wordpress/create-block to scaffold a modern block/plugin setup.
  • If you need Interactivity API from day 1, use the interactive template.

Read:

  • references/creating-new-blocks.md

After scaffolding:

  1. Re-run the block list script and confirm the new block root.
  2. Continue with the remaining steps (model choice, metadata, registration, serialization).

2) Ensure apiVersion 3 (WordPress 6.9+)

WordPress 6.9 enforces apiVersion: 3 in the block.json schema. Blocks with apiVersion 2 or lower trigger console warnings when SCRIPT_DEBUG is enabled.

Why this matters:

  • WordPress 7.0 will run the post editor in an iframe regardless of block apiVersion.
  • apiVersion 3 ensures your block works correctly inside the iframed editor (style isolation, viewport units, media queries).

Migration: Changing from version 2 to 3 is usually as simple as updating the apiVersion field in block.json. However:

  • Test in a local environment with the iframe editor enabled.
  • Ensure any style handles are included in block.json (styles missing from the iframe won't apply).
  • Third-party scripts attached to a specific window may have scoping issues.

Read:

  • references/block-json.md (apiVersion and schema details)

3) Pick the right block model

  • Static block (markup saved into post content): implement save(); keep attributes serialization stable.
  • Dynamic block (server-rendered): use render in block.json (or render_callback in PHP) and keep save() minimal or null.
  • Interactive frontend behavior:
    • Prefer viewScriptModule for modern module-based view scripts where supported.
    • If you're working primarily on data-wp-* directives or stores, also use wp-interactivity-api.

4) Update block.json safely

Make changes in the block’s block.json, then confirm registration matches metadata.

For field-by-field guidance, read:

  • references/block-json.md

Common pitfalls:

  • changing name breaks compatibility (treat it as stable API)
  • changing saved markup without adding deprecated causes “Invalid block”
  • adding attributes without defining source/serialization correctly causes “attribute not saving”

5) Register the block (server-side preferred)

Prefer PHP registration using metadata, especially when:

  • you need dynamic rendering
  • you need translations (wp_set_script_translations)
  • you need conditional asset loading

Read and apply:

  • references/registration.md

6) Implement edit/save/render patterns

Follow wrapper attribute best practices:

  • Editor: useBlockProps()
  • Static save: useBlockProps.save()
  • Dynamic render (PHP): get_block_wrapper_attributes()

Read:

  • references/supports-and-wrappers.md
  • references/dynamic-rendering.md (if dynamic)

7) Inner blocks (block composition)

If your block is a “container” that nests other blocks, treat Inner Blocks as a first-class feature:

  • Use useInnerBlocksProps() to integrate inner blocks with wrapper props.
  • Keep migrations in mind if you change inner markup.

Read:

  • references/inner-blocks.md

8) Attributes and serialization

Before changing attributes:

  • confirm where the attribute value lives (comment delimiter vs HTML vs context)
  • avoid the deprecated meta attribute source

Read:

  • references/attributes-and-serialization.md

9) Migrations and deprecations (avoid "Invalid block")

If you change saved markup or attributes:

  1. Add a deprecated entry (newest → oldest).
  2. Provide save for old versions and an optional migrate to normalize attributes.

Read:

  • references/deprecations.md

10) Tooling and verification commands

Prefer whatever the repo already uses:

  • @wordpress/scripts (common) → run existing npm scripts
  • wp-env (common) → use for local WP + E2E

Read:

  • references/tooling-and-testing.md

Verification

  • Block appears in inserter and inserts successfully.
  • Saving + reloading does not create “Invalid block”.
  • Frontend output matches expectations (static: saved markup; dynamic: server output).
  • Assets load where expected (editor vs frontend).
  • Run the repo’s lint/build/tests that triage recommends.

Failure modes / debugging

If something fails, start here:

  • references/debugging.md (common failures + fastest checks)
  • references/attributes-and-serialization.md (attributes not saving)
  • references/deprecations.md (invalid block after change)

Escalation

If you’re uncertain about upstream behavior/version support, consult canonical docs first:

  • WordPress Developer Resources (Block Editor Handbook, Theme Handbook, Plugin Handbook)
  • Gutenberg repo docs for bleeding-edge behaviors

wordpress की और Skills

blueprint
wordpress
WordPress Playground ब्लूप्रिंट JSON फ़ाइलें बनाने, संपादित करने या समीक्षा करते समय उपयोग करें। ब्लूप्रिंट, प्लेग्राउंड कॉन्फ़िगरेशन या अनुरोधों के उल्लेख पर ट्रिगर होता है…
official
wordpress-router
wordpress
वर्डप्रेस कोडबेस को वर्गीकृत करें और प्लगइन्स, थीम्स, ब्लॉक्स और कोर चेकआउट के लिए सही वर्कफ़्लो पर रूट करें। रिपो प्रकार (प्लगइन, थीम, ब्लॉक थीम, गुटेनबर्ग ब्लॉक्स, WP कोर) और उपलब्ध टूलिंग की पहचान करने के लिए स्वचालित प्रोजेक्ट ट्राइएज चलाता है। उपयोगकर्ता के इरादे और प्रोजेक्ट प्रकार के आधार पर डोमेन-विशिष्ट कौशल के लिए वर्गीकरण परिणाम और निर्णय वृक्ष रूटिंग आउटप
official
wp-abilities-api
wordpress
We need to translate the given English text into Hindi. The text describes a WordPress Abilities API registration, REST exposure, and client-side consumption for WordPress 6.9+. It mentions functions like wp_register_ability() and wp_register_ability_category(), REST endpoints, and the @wordpress/abilities package. We must preserve product names, protocol names, URLs, numbers, technical terms. The name "wp-abilities-api" is not in the text, so we don't include it. We translate only the text inside <text>. No extra commentary. Let's translate sentence by sentence: "WordPress Abilities API registration, REST exposure, and client-side consumption for WordPress 6.9+." -> "WordPress Abilities API पंजीकरण, REST एक्सपोज़र, और WordPress 6.9+ के लिए क्लाइंट-साइड उपभोग।" "Register abilities and categories in PHP using wp_register_ability() and wp_register_ability_category() with stable IDs,
official
wp-abilities-audit
wordpress
किसी WordPress प्लगइन की REST सतह का ऑडिट करें और Abilities API पंजीकरण प्रस्तावित करने वाला एक मानकीकृत ऑडिट दस्तावेज़ तैयार करें। YAML के साथ एक markdown दस्तावेज़ तैयार करता है…
official
wp-abilities-verify
wordpress
किसी WordPress प्लगइन की Abilities API पंजीकरणों को सत्यापित करें: abilities की गणना करें, जाँचें कि callback व्यवहार प्रत्येक annotation के दावे से मेल खाता है (विरोधात्मक…
official
wp-block-themes
wordpress
We need to translate the given English text into Hindi. The text describes a WordPress block theme development skill. We must preserve the name "wp-block-themes" but it's not in the text, so we ignore. We translate only the text inside <text>. No extra labels, no markdown, no bullets. Just the translation. Let me translate paragraph by paragraph: "WordPress block theme development: theme.json, templates, patterns, and Site Editor troubleshooting." -> "वर्डप्रेस ब्लॉक थीम विकास: theme.json, टेम्पलेट्स, पैटर्न और साइट एडिटर समस्या निवारण।" "Covers theme.json editing (presets, settings, per-block styles), templates and template parts, patterns, and style variations across WordPress 6.9+" -> "इसमें theme.json संपादन (प्रीसेट, सेटिंग्स, प्रति-ब्लॉक शैलियाँ), टेम्प
official
wp-interactivity-api
wordpress
वर्डप्रेस इंटरैक्टिविटी एपीआई सुविधाओं (data-wp-* निर्देश, @wordpress/interactivity स्टोर/स्टेट/एक्शन, ब्लॉक viewScriptModule…) के निर्माण या डिबगिंग के दौरान उपयोग करें।
official
wp-patterns
wordpress
तकनीकी रूप से सटीक, डिज़ाइन-विशिष्ट WordPress ब्लॉक पैटर्न उत्पन्न करें। ब्लॉक पैटर्न, स्टार्टर पेज पैटर्न, टेम्पलेट पैटर्न, टेम्पलेट बनाते समय उपयोग करें…
official