editing-themes

द्वारा automattic

Guidelines for modifying existing WordPress block themes — load this before editing theme files

npx skills add https://github.com/automattic/studio --skill editing-themes

When to use me

Use this skill when modifying an existing theme (files already exist in the workspace). Do not use this skill when creating a new theme from scratch.

Absolute Rules

  • NEVER recreate or overwrite files the user did not ask you to change. If the user asks to "add a newsletter template", you add the new template/pattern files and update the index template to include it — nothing else.
  • NEVER rewrite theme.json, functions.php, or style.css unless the user's request specifically requires changes to them (e.g., adding a new color, changing fonts, registering a new asset).
  • NEVER change the theme's topic, branding, or content direction. If the theme is for a dance studio, new additions must be contextually appropriate for a dance studio — not generic placeholder content.
  • NEVER delete existing patterns, templates, or template parts unless the user explicitly asks to remove them.

Editing Guidelines

  • Read theme.json, style.css, and functions.php before making changes — understand the current configuration, design tokens, and registered assets
  • Make minimal, targeted changes — only modify what the user requested
  • Only touch files that need to change — do not rewrite unrelated templates or patterns
  • Use the edit tool for targeted changes; only use write when replacing more than 50% of a file
  • When modifying colors, typography, or spacing, update theme.json — not CSS — unless the change cannot be expressed in theme.json
  • When adding or modifying template parts, ensure they are registered in theme.json if needed
  • Preserve the theme's existing design direction and aesthetic unless the user explicitly asks to change it
  • New content (patterns, templates) must match the theme's existing topic, tone, and visual style
  • After changes, verify templates still reference valid template parts and patterns

Reference Files

Before editing theme files, read the relevant references from the creating-themes/references/ directory.

  • creating-themes/references/block-html.md — REQUIRED: read this FIRST. Block HTML validity rules, block comment ↔ HTML matching, image/cover/button block structure. Violating these causes "unexpected or invalid content" errors.
  • creating-themes/references/design-direction.md — REQUIRED: read this before generating any theme files. Contains guidelines and good design directions.
  • creating-themes/references/navigation.md — read this before generating any header template part, covers wp:navigation block markup, overlay (hamburger menu)
  • creating-themes/references/query-loop.md — read this if the theme must display dynamic content (blog posts, archives, search results) in templates or patterns

automattic की और Skills

wp-phpstan
automattic
वर्डप्रेस प्रोजेक्ट्स (प्लगइन्स/थीम्स/साइट्स) में PHPStan स्टैटिक एनालिसिस को कॉन्फ़िगर करने, चलाने या ठीक करने के लिए उपयोग करें: phpstan.neon सेटअप, बेसलाइन्स,…
official
wp-playground
automattic
वर्डप्रेस प्लेग्राउंड वर्कफ़्लो के लिए उपयोग करें: ब्राउज़र में या स्थानीय रूप से @wp-playground/cli (सर्वर, रन-ब्लूप्रिंट, बिल्ड-स्नैपशॉट) के माध्यम से तेज़ डिस्पोज़ेबल WP इंस्टेंस,…
official
wp-plugin-development
automattic
वर्डप्रेस प्लगइन विकसित करते समय उपयोग करें: आर्किटेक्चर और हुक्स, सक्रियण/निष्क्रियण/अनइंस्टॉल, एडमिन यूआई और सेटिंग्स एपीआई, डेटा स्टोरेज, क्रॉन/कार्य, सुरक्षा…
official
wp-project-triage
automattic
जब आपको किसी वर्डप्रेस रिपॉजिटरी (प्लगइन/थीम/ब्लॉक थीम/WP कोर/गुटेनबर्ग/पूर्ण साइट) का निर्धारित निरीक्षण चाहिए, जिसमें टूलिंग/टेस्ट/संस्करण… शामिल हों।
official
wp-rest-api
automattic
वर्डप्रेस REST API एंडपॉइंट/रूट्स बनाने, विस्तारित करने या डीबग करने के लिए उपयोग करें: register_rest_route, WP_REST_Controller/कंट्रोलर क्लासेस, स्कीमा/आर्गुमेंट…
official
wp-wpcli-and-ops
automattic
WP-CLI (wp) के साथ WordPress संचालन के लिए उपयोग करें: सुरक्षित खोज-बदलाव, db निर्यात/आयात, प्लगइन/थीम/उपयोगकर्ता/सामग्री प्रबंधन, क्रॉन, कैश फ्लशिंग,…
official
wpds
automattic
जब वर्डप्रेस डिज़ाइन सिस्टम (WPDS) और इसके घटकों, टोकन, पैटर्न आदि का उपयोग करके यूआई बनाया जा रहा हो, तब उपयोग करें।
official
woocommerce-finalize
automattic
WooCommerce प्लगइन्स के लिए प्री-रिलीज़ कोड स्वास्थ्य और ट्रेसेबिलिटी ऑडिट। कोड समीक्षा के बाद चलता है -- मृत कोड, डुप्लिकेशन, संरचनात्मक जटिलता, और… पर ध्यान केंद्रित करता है।
official