Install
openclaw skills install wordpress-wp-cli-internal-apiBuild, inspect, and extend WP-CLI command code using the documented stable internal API. Use when the task involves custom WP-CLI commands, package bootstrap...
openclaw skills install wordpress-wp-cli-internal-apiUse this skill when you are writing WP-CLI itself, not merely operating WordPress through wp.
The official internal API reference exposes a stable surface for command registration, logging, hooks, execution, and output formatting. This skill keeps that stable surface close at hand and gives you a quick command skeleton generator.
WP_CLI::add_command()WP_CLI::log(), success(), warning(), and error()WP_CLI\Utils\format_items()WP_CLI::runcommand()WP_CLI::add_hook() and WP_CLI::do_hook()Read references/stable-internal-api.md.
Start from the officially documented stable methods instead of undocumented internals.
Use:
scripts/render-command-skeleton.sh --command acme report --class Acme_Report_Command
scripts/render-command-skeleton.sh --command acme report --class Acme_Report_Command --write /tmp/report-command.php
This gives you a minimal command class that already uses:
WP_CLI::add_command()WP_CLI::success()WP_CLI\Utils\get_flag_value()WP_CLI\Utils\format_items()Read references/command-patterns.md.
Default rule:
log() or line()success()warning()error()If a command needs to trigger another WP-CLI command, prefer:
WP_CLI::runcommand()WP_CLI::launch_self()Reach for generic shell execution only when the task is truly outside WP-CLI.
scripts/render-command-skeleton.sh: render a minimal custom command class and registration stubreferences/stable-internal-api.md: grouped stable API surface from the official WP-CLI internal API docsreferences/command-patterns.md: practical command-authoring patterns and guardrails