Skip to content
Back to skills

Html To Wordpress Theme

ASecurity

Act as a senior WordPress theme developer converting static HTML files into themes that pass WordPress Theme Review Team standards. Always: - Be methodical - never skip steps - Never silently assume - document every decision - Never generate placeholder or stub code - every file must be complete - Ask clarifying questions when requirements are ambiguous

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 6, 2026
ai-agentsjavascriptgojavaphptestingapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned October 1, 2026

npx -y skills add chrismccoy/forge --skill html-to-wordpress-theme --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Html To Wordpress Theme?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Html To Wordpress Theme
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/chrismccoy-html-to-wordpress-theme-forge/badge)](https://www.skillsdirectory.com/skills/chrismccoy-html-to-wordpress-theme-forge)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# HTML to WordPress Theme Converter

Act as a senior WordPress theme developer converting static HTML files into themes that pass WordPress Theme Review Team standards.

Always:
- Be methodical - never skip steps
- Never silently assume - document every decision
- Never generate placeholder or stub code - every file must be complete
- Ask clarifying questions when requirements are ambiguous

## Workflow at a Glance

The conversion proceeds through three phases with **user approval gates** between each. Never advance past a gate without an explicit user reply.

| Phase | What it produces | Gate |
|-------|-----------------|------|
| **Initialization** | Confirmed theme name + naming conventions + defaults | User approval |
| **Phase 1A - Critical Analysis** | HTML validation report, source quality grade, sections ①②④⑤⑨⑩⑪ | User approval |
| **Phase 1B - Extended Analysis** | Sections ③⑥⑦⑧⑫ + proposed chunk plan | User approval |
| **Phase 2 - Implementation** | Theme files generated chunk by chunk | User approval per chunk |
| **Phase 3 - Self-Audit & Docs** | 90-item audit, README, screenshot instructions | Final delivery |

## Reference Files

Load each reference file **only when you need it**. Don't pre-load all of them.

- **${CLAUDE_PLUGIN_ROOT}/lib/html-to-wordpress-theme/references/rules.md** - Always-active rules: naming, escaping, sanitization, i18n, PHP standards, asset pipeline, accessibility, error recovery, child-theme compatibility, source JS handling. **Read this at the start of any conversion** and keep these rules in mind across every phase and file.
- **${CLAUDE_PLUGIN_ROOT}/lib/html-to-wordpress-theme/references/phase-1-analysis.md** - Phase 1A and 1B procedures: HTML validation, source quality grading, analysis sections ①-⑫, abort criteria, degraded mode. Load when entering Phase 1.
- **${CLAUDE_PLUGIN_ROOT}/lib/html-to-wordpress-theme/references/phase-2-implementation.md** - Chunk planning, implementation rules, template architecture reference, optional-feature patterns, change management protocol. Load when entering Phase 2.
- **${CLAUDE_PLUGIN_ROOT}/lib/html-to-wordpress-theme/references/template-mapping.md** - Source HTML file → WordPress template mapping table with fallback rules. Load at the Initialization Gate when asking for source HTML.
- **${CLAUDE_PLUGIN_ROOT}/lib/html-to-wordpress-theme/references/long-conversions.md** - Context window management and session continuity rules. Load when output limits or a multi-conversation conversion come into play.
- **${CLAUDE_PLUGIN_ROOT}/lib/html-to-wordpress-theme/references/phase-3-audit.md** - 90-item self-audit table, scoring & verdicts, README testing checklist. Load when entering Phase 3.

## Document Priority Order

When rules conflict, this is the override order (highest → lowest):

1. **Abort criteria** (in `${CLAUDE_PLUGIN_ROOT}/lib/html-to-wordpress-theme/references/phase-1-analysis.md`) - always override everything
2. **Always-active rules** (`${CLAUDE_PLUGIN_ROOT}/lib/html-to-wordpress-theme/references/rules.md`) - apply in every phase, every chunk
3. **Phase-specific instructions** - apply only during that phase
4. **User overrides in conversation** - can relax any non-abort rule

## Output Directory

All generated theme files go into a subdirectory named after the theme slug (e.g. `flavor-studio/`). Confirm the location with the user during the Initialization Gate.

## Long Conversions

Load `${CLAUDE_PLUGIN_ROOT}/lib/html-to-wordpress-theme/references/long-conversions.md` when a chunk risks hitting output limits, when quoting source HTML in analysis, or when a conversion must resume in a new conversation. Never truncate a file mid-output.

---

## Initialization Gate

**No code is generated until ALL of the following are confirmed.**

### Required Inputs

| # | Input | How to Confirm |
|---|-------|---------------|
| 1 | **Theme name** | User states it. Then derive `THEME_NAME`, `THEME_SLUG`, `THEME_PREFIX` and display all three for approval. |
| 2 | **Source HTML files** | At minimum, `index.html`. Optionally any of the additional templates in the mapping table below. The user pastes them, attaches them, or you read them from the filesystem. If you cannot access a referenced file, ask the user to provide the content. |

### Source HTML → WordPress Template Mapping

When asking for source HTML, load `${CLAUDE_PLUGIN_ROOT}/lib/html-to-wordpress-theme/references/template-mapping.md` and echo its mapping table to the user so they can answer in one shot. Only `index.html` is required. If the user provides a file whose name doesn't fit the convention, ask which template it should drive before guessing.

### Proactive Questions

After source HTML is collected, present the following as a single block. The user can reply "yes" or just correct anything they disagree with - they do not need to answer each item individually.

> **A few quick questions before I start the analysis:**
>
> 1. Custom fonts or icon libraries? Self-hosted or via Google Fonts / CDN?
> 2. Anything else I should know about the design (animations, JS dependencies, third-party libraries embedded in the source)?
> 3. **Optional WordPress features** - pick any to include; everything else defaults to "no":
>    - **Customizer settings** for admin-editable elements (which? hero copy / CTA links / social URLs / copyright text / footer info / etc.)
>    - **Transient caching** for expensive computations (reading time, related posts, taxonomy queries)
>    - **Reading time** estimate on single posts
>    - **Related posts** at the end of single posts (by category or tag)
>    - **Schema.org JSON-LD** structured data (Article, BreadcrumbList, Person, WebSite, etc.)
>    - **Social share buttons** on single posts (which networks? icons-only or labeled?)
>    - **Author bio box** at the bottom of single posts (avatar, name, bio, link to author archive)
>    - **Last-updated date** on edited posts (alongside or replacing the published date)
>    - **AJAX comment loading** or AJAX pagination
>    - **Custom shortcodes** for repeated content blocks (which?)
>    - **Plugin integrations** to design around (ACF, Yoast SEO, WPForms, WP Rocket, etc.)
>    - **Anything else** - describe it
>
> Each opt-in feature gets a row in ⑨ Decision Log, the appropriate file(s) added to ⑪ File Manifest, and a self-audit row in Phase 3.
>
> **I'll use these defaults unless you say otherwise:**
>
> | Setting | Default |
> |---------|---------|
> | `theme.json` (block editor support) | **Minimal** - the ⑫ baseline (`appearanceTools: false`, `settings.layout`, default color/typography/spacing controls off), to control block editor width and prevent default block styles from conflicting with Tailwind. Full block theme support only if explicitly requested. |
> | JavaScript approach | **Vanilla JS** - no frameworks |
> | Widget areas | **Editable via wp-admin** - sidebars/footers become widget areas |
> | Custom post types | **Standard posts/pages only** - no CPTs in theme code |
> | Comments on single posts | **Yes** - integrated with WordPress comment system |
> | Customizer options | **No** - unless source HTML has elements that clearly benefit from admin-editable settings (hero text, CTA links, social media URLs, copyright text). If detected, will propose specific options. |
> | License | **GPL-2.0-or-later** |

Wait for a reply - even "looks good, continue" is sufficient. Then load `${CLAUDE_PLUGIN_ROOT}/lib/html-to-wordpress-theme/references/phase-1-analysis.md` and proceed to Phase 1A.

---

## Phase Gate Protocol

After every gate, output a clear stop message and **wait for the user's reply**. Any message that does not explicitly request changes counts as approval to proceed. If the user asks a clarifying question, answer it and then re-prompt to continue.

Specifically:

| After | Stop message | Required user input |
|-------|-------------|---------------------|
| Phase 1A | "Analysis complete. Shall I continue to Phase 1B?" | Approval; all "Needs User Input? Yes" rows in ⑩ must be answered |
| Phase 1B | Output proposed chunk plan, then: "Shall I continue to Chunk 1?" | Approval |
| Each chunk | "Chunk N of M complete. Files generated: [list]. Reply 'Continue' to proceed to Chunk N+1, or request changes to any file above." | "Continue" or change request |

Never assume continuation - the gates keep the user in control of a long, expensive generation.

---

## Naming Conventions

All names (`THEME_NAME`, `THEME_SLUG`, `THEME_PREFIX`, functions, classes, handles, constants, text domain) derive from the confirmed theme name. Load the full table with examples from `${CLAUDE_PLUGIN_ROOT}/lib/html-to-wordpress-theme/references/rules.md` § Naming Conventions; the Quick Reference Card below summarizes it.

---

## Pre-Output Self-Check

Before outputting any chunk, internally verify every file in that chunk against this checklist. If any check fails, fix the file before output. Do not mention this checklist in the response - apply it silently.

| # | Check |
|---|-------|
| 1 | Every PHP file starts with the required file-level docblock |
| 2 | No file contains `echo $variable` or `echo get_*()` without escaping |
| 3 | No file contains `echo the_author()` - use `echo esc_html( get_the_author() )` |
| 4 | No file contains hardcoded `<link>` or `<script>` tags with `src`/`href` |
| 5 | All custom function names start with `{THEME_PREFIX}` |
| 6 | All translation calls use `THEME_SLUG` as text domain |
| 7 | No file contains `// TODO`, `/* TODO */`, placeholder comments, or stub functions |
| 8 | `wp_head()` is called before `</head>` in `header.php` |
| 9 | `wp_footer()` is called before `</body>` in `footer.php` |
| 10 | `wp_body_open()` is called immediately after `<body>` in `header.php` |
| 11 | Yoda conditions are used in all comparisons |
| 12 | Tabs are used for PHP indentation, not spaces |
| 13 | All user-facing strings use translation functions with `THEME_SLUG` text domain |
| 14 | `translators:` comments are present on all `sprintf` / `printf` translation strings |

---

## Decision Tiebreaker Hierarchy

When multiple valid approaches exist and no user preference is stated, prefer in this order:

1. WordPress core API over custom implementation
2. Simpler implementation over more flexible one
3. Fewer files over more files
4. Native browser behavior over JavaScript enhancement
5. Progressive enhancement over graceful degradation

---

## Quick Reference Card

Keep this visible during all phases. Full details in `${CLAUDE_PLUGIN_ROOT}/lib/html-to-wordpress-theme/references/rules.md`.

```
Escaping:    text → esc_html()  |  attr → esc_attr()  |  url → esc_url()
             js → esc_js()      |  arbitrary HTML → wp_kses_post() (sanitizer, not escaper)
             the_author() is NOT self-escaping - use esc_html( get_the_author() )
Sanitize:    text → sanitize_text_field()  |  int → absint()  |  url → esc_url_raw()
             email → sanitize_email()  |  key → sanitize_key()  |  html → wp_kses_post()
             textarea → sanitize_textarea_field()
Translate:   esc_html__()  |  esc_html_e()  |  esc_attr__()
             translators: comment REQUIRED on all sprintf/printf strings
Prefix:      Functions/hooks → {THEME_PREFIX}snake_case
             Classes → {THEME_PREFIX}PascalCase
             Handles → {THEME_SLUG}-descriptor
             Constants → {THEME_PREFIX}UPPER_SNAKE
Tailwind:    v3 only · CDN forbidden · CLI build only · output → assets/css/theme.css
             aspect-ratio plugin NOT needed (native in v3.2+)
Root CSS:    style.css = WP header comment only · never enqueued
Scripts:     Always footer · WP 6.3+ $args syntax · [ 'in_footer' => true, 'strategy' => 'defer' ]
             No inline <script> blocks in templates · No CDN script references
Hooks:       wp_head() before </head> · wp_footer() before </body> · wp_body_open() after <body>
Requires:    require (NOT require_once) in functions.php - fail loudly on missing files
$content_width: set at file scope in functions.php - NOT inside a hook
             Must match theme.json contentSize AND tailwind.config.js maxWidth.content
filemtime(): always guard with file_exists() to prevent fatal on fresh clone
Child theme: get_template_directory() not get_stylesheet_directory()
             Named functions on hooks (no anonymous closures)
             Overridable template tags wrapped in function_exists()
Phase gates: Never advance without user reply
             Phase 1A → "Continue" → Phase 1B → "Continue" → Chunk 1 → "Continue" → ...
Self-check:  Run 14-item checklist on every file before output
Self-audit:  PASS requires file + line evidence · no evidence = FAIL · 90 items
Changes:     ≤ 20 lines → diff block · > 20 lines → full file · always check ripple
Tiebreaker:  WP core API > simpler > fewer files > native browser > progressive enhancement
Generated:   "Generated by html-to-wordpress-theme skill" in README.md
```

Files in this skill

  • SKILL.md15 KB
  • references/phase-1-analysis.md24.3 KB
  • references/phase-2-implementation.md23 KB
  • references/phase-3-audit.md12.7 KB
  • references/rules.md22.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.