Automated summary
This skill generates a complete WordPress theme from the Underscores starter, integrating Vite, Tailwind CSS v4, Alpine.js, Swiper, and AOS, based on an existing source folder.
Strengths
- Automates the installation and renaming of the Underscores theme
- Integrates modern tools (Vite, Tailwind, Alpine.js) without manual configuration
- Handles WooCommerce and Contact Form 7 options through interactive questions
- Systematically replaces all '_s' occurrences in PHP files
Limitations
- Requires a very specific source folder structure (src/index.html, src/js/app.js, etc.)
- Only supports Vite as the build tool
- Advanced theme customizations after generation are left to the developer
Use this skill when you need to create a modern WordPress theme from an existing static HTML/Vite project, with ready-to-use Tailwind CSS integration.
Do not use it if your source project does not follow the expected structure or if you prefer to configure each tool manually.
Security analysis
CautionThe skill uses Bash for file operations (clone, sed, rm) within a WordPress theme directory, which is legitimate for theme generation. No malicious or destructive commands are present.
No concerns found
How this analysis is madeExamples
Create a WordPress theme using my Vite/Tailwind project located at ./my-design-folderGenerate a WordPress theme from the source at /projects/shop-design and include WooCommerce supportname: wp-theme description: Creates a WordPress theme based on Underscores (_s) with Vite + Tailwind CSS v4 + Alpine.js + Swiper + AOS, using a source folder as design reference. Use when building a new WP theme from a static HTML/Vite project. argument-hint: [source-folder-path] disable-model-invocation: true allowed-tools: Bash Read Write Edit Glob Grep Agent AskUserQuestion
WordPress Theme Generator (Underscores + Vite/Tailwind)
You are creating a WordPress theme based on the Underscores (_s) starter theme, integrating a Vite + Tailwind CSS v4 build system from an existing source folder.
Input
The user provides a source folder path as $ARGUMENTS. This folder contains:
src/index.html— Static HTML template for the home pagesrc/js/app.js— Main JS entry point (Alpine.js, Swiper, AOS)src/css/app.css— Main CSS with Tailwind v4 config, theme tokens, custom utilitiessrc/css/*.css— Additional CSS modulespublic/img/— Static imagesvite.config.js— Vite configurationpackage.json— Dependencies
Step 0: Gather Information
Before starting, you MUST ask the user these questions using AskUserQuestion:
Question 1: Theme Name
Ask: "What should the theme name be? (used for the folder name, function prefixes, and text domain)"
- This will be used as: folder name, function prefix (e.g.,
mytheme_setup), text domain, and version constant (e.g.,MYTHEME_VERSION)
Question 2: Theme Metadata
Ask: "What are the theme details?"
- Theme URI (website URL)
- Author name
- Author URI
Question 3: WooCommerce Support
Ask: "Do you want to include WooCommerce support from Underscores?"
- Options: "Yes — Include WooCommerce integration (inc/woocommerce.php, WooCommerce CSS)" or "No — Skip WooCommerce support"
- If YES: Keep
inc/woocommerce.php, copy WooCommerce CSS files from source (woocommerce.css,custom-woocommerce.css,custom-booking.css), uncomment WooCommerce imports inapp.css, and keep the conditional require infunctions.php - If NO: Delete
inc/woocommerce.php,woocommerce.cssfrom theme root, and remove the WooCommerce conditional require fromfunctions.php
Question 4: Contact Form 7 Support
Ask: "Do you want to include Contact Form 7 CSS support?"
- If YES: Copy
contactForm7.cssand uncomment its import inapp.css - If NO: Skip copying
contactForm7.css
Step 1: Read the Source
Read and analyze the source folder provided:
- Read
src/index.html— Identify all sections (header, banner, content sections, footer) - Read
src/js/app.js— Understand JS initialization (Alpine, Swiper instances, AOS, scroll handlers) - Read
src/css/app.css— Get theme tokens, custom utilities, imports - Read
src/css/*.css— All additional CSS modules - Read
vite.config.js— Build configuration - Read
package.json— Dependencies - List
public/img/— Available images
Step 2: Clone Underscores
Clone the Underscores starter theme into the WordPress themes directory:
cd "wp-content/themes" && git clone https://github.com/Automattic/_s.git {theme-name}
Then immediately remove the .git directory:
rm -rf "wp-content/themes/{theme-name}/.git"
Step 3: Rename _s to Theme Name
Replace ALL references of _s with the theme name. This is a multi-pattern replacement:
# In all PHP files:
find . -name "*.php" -exec sed -i "s/'_s'/'{theme-name}'/g" {} +
find . -name "*.php" -exec sed -i "s/\"_s\"/\"{theme-name}\"/g" {} +
find . -name "*.php" -exec sed -i "s/_s_/{theme-name}_/g" {} +
find . -name "*.php" -exec sed -i "s/_s-/{theme-name}-/g" {} +
find . -name "*.php" -exec sed -i "s/ _s/ {theme-name}/g" {} +
CRITICAL: The above sed commands do NOT catch _S_VERSION (uppercase). You MUST also:
find . -name "*.php" -exec sed -i "s/_S_VERSION/{THEME-NAME}_VERSION/g" {} +
Where {THEME-NAME}_VERSION uses the uppercase version of the theme name (e.g., MYTHEME_VERSION).
VERIFY with: grep -r "_S_VERSION" . and grep -r "_s" . --include="*.php" — both should return empty.
Step 4: Clean Up Underscores Files
Delete files that will be replaced by the Vite build system:
rm -rf sass/
rm -f style-rtl.css js/customizer.js js/navigation.js
rm -f composer.json phpcs.xml.dist .eslintrc .stylelintrc.json
rm -f README.md LICENSE
rmdir js/ 2>/dev/null
If WooCommerce support was declined, also:
rm -f inc/woocommerce.php woocommerce.css
Step 5: Copy Source Files
mkdir -p src/js src/css public/img
cp {source}/src/js/app.js src/js/app.js
cp {source}/src/css/*.css src/css/
cp {source}/public/img/* public/img/
cp {source}/pnpm-lock.yaml ./
Step 6: Create Build System Files
package.json
Write the same package.json as the source with only dev and build scripts.
vite.config.js
Write the Vite config adapted for WordPress (no index.html):
CRITICAL: Use rollupOptions.input as an OBJECT { app: 'js/app.js' }, NOT a string. A string causes the dev server to fail with "failed to resolve rollupOptions.input".
import { defineConfig } from 'vite';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
root: './src',
publicDir: '../public',
build: {
manifest: true,
outDir: '../dist',
emptyOutDir: true,
assetsDir: 'assets',
rollupOptions: {
input: { app: 'js/app.js' },
output: {
assetFileNames: (assetInfo) => {
const info = assetInfo.names[0].split('.')
let extType = info[info.length - 1]
if (/png|jpe?g|svg|gif|tiff|bmp|ico/i.test(extType)) {
extType = 'img'
} else if (/woff|woff2/.test(extType)) {
extType = 'css'
}
return `assets/${extType}/[name]-[hash][extname]`
},
chunkFileNames: 'assets/js/[name]-[hash].js',
entryFileNames: 'assets/js/[name]-[hash].js',
},
},
},
server: { strictPort: true, port: 3000, cors: true },
plugins: [tailwindcss()],
resolve: { alias: { '@': '/src/js' } },
});
.gitignore
/node_modules
/dist
.DS_Store
Step 7: Configure Tailwind CSS v4 Source Scanning
CRITICAL: Tailwind CSS v4 only scans files inside Vite's root (./src) by default. PHP templates are OUTSIDE src/, so Tailwind won't detect their classes and the CSS output will be incomplete.
In src/css/app.css, modify the Tailwind import to include the theme folder:
@import "tailwindcss" source("../../../{theme-name}");
The source() path is relative to the CSS file and must point to the theme's root directory so Tailwind scans all PHP files.
Step 8: Rewrite style.css
Replace ALL content with only the theme metadata header (no CSS rules):
/*
Theme Name: {Theme Display Name}
Theme URI: {theme-uri}
Author: {author}
Author URI: {author-uri}
Description: {description}
Version: 1.0.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: {theme-name}
Tags: custom-menu, featured-images, threaded-comments, translation-ready
*/
Step 9: Rewrite functions.php
Replace the {theme-name}_scripts() function with a Vite asset loader:
- Define version constant:
define('{THEME_NAME}_VERSION', '1.0.0'); - Keep:
{theme-name}_setup(),register_nav_menus, theme supports, widget registration, allrequirestatements forinc/files - Remove: The old
wp_enqueue_styleforstyle.css,wp_style_add_datafor RTL,wp_enqueue_scriptfornavigation.js - Add
{theme-name}_vite_assets():- If
VITE_DEVconstant is true: enqueue scripts fromhttp://localhost:3000/ - Else: read
dist/.vite/manifest.json, enqueue hashed CSS/JS from manifest entryjs/app.js
- If
- Add
script_loader_tagfilter: Addtype="module"to Vite script tags - Add Google Fonts enqueue: Raleway (or whatever font the source uses)
- If NO WooCommerce: Remove the
if (class_exists('WooCommerce'))require block
Step 10: Rewrite header.php
Convert the <header> section from src/index.html to WordPress PHP:
<!doctype html><html <?php language_attributes(); ?>><head>withwp_head(), Google Fonts preconnect links<body <?php body_class('font-sans antialiased leading-loose'); ?> x-data="{ showMenu: false }"><?php wp_body_open(); ?>- Logo:
<img src="<?php echo esc_url(get_theme_file_uri('dist/img/{logo}')); ?>"> - Desktop nav:
wp_nav_menu(['theme_location' => 'menu-1', 'container' => false, 'menu_class' => '{desktop-menu-classes}']) - Mobile hamburger button with Alpine.js
@click - Mobile nav: second
wp_nav_menu()inside Alpine container
Step 11: Rewrite footer.php
Convert the <footer> section from src/index.html to WordPress PHP:
- All static content from the source footer
- Images with
get_theme_file_uri('dist/img/...') - Dynamic year:
<?php echo esc_html(wp_date('Y')); ?> <?php wp_footer(); ?>before</body>- Close
</body></html>
Step 12: Create front-page.php
Create a new file with all content sections from src/index.html (everything between header and footer):
<?php get_header(); ?>
<!-- All sections from index.html -->
<?php get_footer(); ?>
All image paths: ./img/X becomes <?php echo esc_url(get_theme_file_uri('dist/img/X')); ?>
All inline style background images: url('<?php echo esc_url(get_theme_file_uri('dist/img/X')); ?>')
Step 13: Build & Verify
cd "wp-content/themes/{theme-name}"
pnpm install
pnpm build
Verify:
dist/.vite/manifest.jsonexists with entry forjs/app.jscontainingcssarraydist/assets/css/anddist/assets/js/contain hashed filesdist/img/contains all images frompublic/img/
Step 14: Post-Setup Instructions
Tell the user:
- Activate the theme in WP Admin > Appearance > Themes
- Create a page and set it as static front page in Settings > Reading
- Create a menu in Appearance > Menus and assign to "Primary"
- For development: add
define('VITE_DEV', true);towp-config.phpand runpnpm dev - For production: run
pnpm build(remove or setVITE_DEVto false)
Important Rules
- Always use
esc_url()for image URLs andesc_html()for text output in PHP templates - Keep ALL Underscores template files (index.php, page.php, single.php, archive.php, search.php, 404.php, comments.php, sidebar.php, template-parts/) — only rename prefixes
- The
inc/directory files (template-tags.php, template-functions.php, customizer.php, custom-header.php) are kept and renamed - Use
get_theme_file_uri()for all asset paths (notget_template_directory_uri()) - The Vite manifest path is
dist/.vite/manifest.json(Vite 5+ places it inside.vite/subfolder)
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/wordpress-theme-generator-mrwakaoi/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/wordpress-theme-generator-mrwakaoi' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/wordpress-theme-generator-mrwakaoi/download' --output '.skill-downloads/wordpress-theme-generator-mrwakaoi/SKILL.md.part' && mv '.skill-downloads/wordpress-theme-generator-mrwakaoi/SKILL.md.part' '.skill-downloads/wordpress-theme-generator-mrwakaoi/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Bash Read Write Edit Glob Grep Agent AskUserQuestion
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/wordpress-theme-generator-mrwakaoi/SKILL.md' && test -s '.skill-downloads/wordpress-theme-generator-mrwakaoi/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/wp-theme' && cp -R '.skill-downloads/wordpress-theme-generator-mrwakaoi' '.claude/skills/wp-theme'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/wordpress-theme-generator-mrwakaoi'openskills read 'wordpress-theme-generator-mrwakaoi'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/wordpress-theme-generator-mrwakaoi/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.