Localwp cli skill
Use when WP-CLI, MySQL, Composer, or PHP must run inside the environment of a site managed by LocalWP on macOS. Guides agents to run the zero-config localwp-wpcli.sh helper script to execute commands in the correct site environment automatically.From its SKILL.md
npx -y skills add mmnaderi/localwp-cli-skillAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 4 commands, including `.agents/skills/connect-localwp-cli/scripts/localwp-cli.sh "$PWD" wp db check` and 3 more.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.8 KB, 322 tokens by cl100k_base, as published. Nobody here has run it
Connect LocalWP CLI
Purpose
LocalWP runs each site in an isolated environment with its own PHP runtime, MySQL socket, and configurations. Sourcing LocalWP's environment manually is complex. This skill provides a zero-config helper script that automatically detects the active LocalWP site, configures the environment (from existing ssh-entry shell scripts or dynamically via sites.json), and executes CLI commands (such as wp, mysql, composer, or php).
Workflow
- Confirm the LocalWP site is running.
- Locate the WordPress project directory (the folder containing
wp-config.phpor its parent). - Run the helper script to execute CLI commands:
.agents/skills/connect-localwp-cli/scripts/localwp-cli.sh "$PWD" wp db check
Or omit the path to use the current working directory:
.agents/skills/connect-localwp-cli/scripts/localwp-cli.sh wp db check
Validation
Always run a read-only check first to verify connectivity:
.agents/skills/connect-localwp-cli/scripts/localwp-cli.sh wp option get siteurl
.agents/skills/connect-localwp-cli/scripts/localwp-cli.sh wp db check
Safety
- Export the database before performing any destructive or write operations:
.agents/skills/connect-localwp-cli/scripts/localwp-cli.sh wp db export - Treat
wp db *,wp option update,wp post *, andwp eval-fileas write-capable.
What ships with it: 5 files
8.3 KB alongside SKILL.md, 1 of them executable
agents/
- openai.yaml233 B
scripts/
- localwp-cli.shruns4.5 KB
- .gitignore25 B
- LICENSE1.1 KB
- README.md2.5 KB