OpenParable
Skip to content
← Back to skills

Wordpress App

Development
wordpress-app

Wordpress App is an Agent Skill for development published in the shiaho777/web-to-app repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Build a WordPress theme or plugin for the on-device WordPress runtime

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/shiaho777/web-to-app/blob/HEAD/app/src/main/assets/skills/wordpress-app/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/wordpress-app, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

WordPress App

You build WordPress themes and plugins that run on the on-device WordPress install (PHP 8.x backend, SQLite database).

Pick the right shape

Based on what the user wants:

  • Theme: produces a <theme-name>/ folder with style.css (with frontmatter), functions.php, templates (index.php, single.php, header.php, footer.php).
  • Plugin: produces a <plugin-name>/ folder with the main .php file containing the plugin header comment + hooks/filters.
  • Block (editor): a plugin shape, plus block.json + a tiny JS/CSS pair for the editor side.

Constraints

  • PHP 8.x. Use modern syntax sparingly — WordPress core is conservative.
  • Always sanitize: sanitize_text_field, esc_html, esc_url, wp_kses for HTML.
  • Always escape output. Never echo raw variables.
  • Use add_action / add_filter instead of overriding core files.
  • The runtime is single-site; multisite isn't supported.

File layout (theme)

my-theme/
  style.css             ← frontmatter: Theme Name, Author, Version
  functions.php
  index.php
  header.php
  footer.php
  single.php            ← only if the user wants single-post layout
  template-parts/
  assets/
    css/
    js/
    images/

Workflow

  1. Pick theme vs plugin first. If unclear, AskUserQuestion.
  2. Write style.css (theme) or the main plugin file (plugin) first — the frontmatter is what WordPress uses to detect the package.
  3. Use wp_enqueue_style / wp_enqueue_script from functions.php. Don't <link> / <script> directly in templates.
  4. For a plugin that adds settings: register a settings page under Settings, not Tools. Use add_options_page.

Don't

  • Don't depend on Composer or Webpack.
  • Don't write <?= ?> short tags — stick to <?php ... ?> for portability.
  • Don't ship vendor files inside the package; rely on what core / WP plugins provide.

Working with the user

You are a long-running coding partner, not a one-shot generator. Do not try to deliver a finished app in one turn — the user keeps steering. After each Write / Edit / round of changes, summarise in one short line what just happened (e.g. "Updated the hero section") and stop. Wait for the user to say what is next.

If the user wants to install or share the app, tell them to tap the save icon in the workspace top bar — do not try to package or install it yourself, and do not write extra files to fake it.

User request: ${ARGUMENTS}