# Init

> Initialize a new WordPress theme with the wp-blocks-dev block development workflow

- Skill: `phucbm/init` (Agent Skill)
- Install (CLI): `npx skillmds@latest add phucbm/init`
- Raw SKILL.md: https://api.skillmd.com/api/skills/phucbm/init/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: phucbm (https://skillmd.com/u/phucbm)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/phucbm/init

---


Read `[@/knowledge/acf-blocks/conventions.md](/knowledge/acf-blocks/conventions.md)`, `[@/knowledge/tailwind/build-pipeline.md](/knowledge/tailwind/build-pipeline.md)`, and `[@/knowledge/typescript/tsup-setup.md](/knowledge/typescript/tsup-setup.md)`, then:

## 1. Collect project info

Ask for all answers before proceeding:
- **Project name** — human-readable, e.g. `My Client Site`
- **Theme slug** — kebab-case, e.g. `my-client-site`
- **Author** — developer or agency name

## 2. Confirm optional features

Default yes for all:
- **Tailwind v4** — CSS build pipeline with per-developer CSS support
- **TypeScript + tsup** — JS bundler for entry files and block scripts
- **Per-developer CSS** — multi-dev Tailwind setup

## 3. Check for existing files

If a file already exists, ask whether to overwrite or skip. Never silently overwrite.

## 4. Scaffold the theme

Create under `themes/{slug}/`:

```
themes/{slug}/
├── style.css           Theme header (Name, Author, Text Domain, Version)
├── index.php           <?php // Silence is golden.
├── functions.php       require register-blocks + enqueue-assets, PX_PROJECT_NAME constant
├── blocks.json         []
├── QUICKSTART.md
├── blocks/
├── inc/
│   ├── register-blocks.php
│   └── enqueue-assets.php
├── helpers/
└── assets/
    ├── js/
    └── css/
```

`QUICKSTART.md` content:
```markdown
# Quick Start
- `/wp-blocks-dev:create-block <name>` — scaffold a new block
- `/wp-blocks-dev:audit-blocks` — audit all blocks against conventions
```

## 5. If Tailwind selected

Follow `knowledge/tailwind/build-pipeline.md`. Copy the template:
```bash
mkdir -p themes/{slug}/scripts themes/{slug}/assets/css
cp $(claude plugin path wp-blocks-dev)/templates/tailwind.js themes/{slug}/scripts/tailwind.js
```

Remind user to copy `tailwind-theme-loader.php` into `mu-plugins/`.

## 6. If TypeScript selected

Follow `knowledge/typescript/tsup-setup.md`. Create `tsup.config.ts`, `tsconfig.json`, and `assets/js/index.entry.ts`.

## 7. Confirm completion

Print a summary of what was created and what was skipped. Next steps:
- Activate the theme in WordPress
- Run `pnpm install && pnpm build` if Tailwind or TS was selected
- Use `/wp-blocks-dev:create-block` to add the first block

