AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Localwp Shell

skill-jtsternberg-claude-plugins-localwp-shell · by jtsternberg

Run wp/php/mysql/composer through LocalWP's sandboxed environment when inside a LocalWP site — fixes 'command not found', wrong PHP version, opcache/xdebug load failures, MySQL socket errors.

No reviews yet
0 installs
17 views
0.0% view→install

Install

$ agentstack add skill-jtsternberg-claude-plugins-localwp-shell

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-jtsternberg-claude-plugins-localwp-shell)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5d ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Localwp Shell? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

LocalWP Shell

> Platform: macOS only.

Run commands through LocalWP's sandboxed environment (PHP, MySQL, WP-CLI, Composer). Auto-detects the correct LocalWP site from the current working directory, including through symlinked app/public directories and project directories whose contents symlink into a site tree (e.g. myproject/links/theme -> ~/Sites/wp-site/wp-content/themes/x — the script follows the project's symlinks, finds the site, and runs commands from its WordPress root).

Usage

All scripts live in this skill's directory. Resolve that directory at every independent shell block, then run them with bash:

# Codex: this path resolves under Claude Code; substitute the directory containing this SKILL.md.
SKILL_DIR="${CLAUDE_SKILL_DIR}"

# WP-CLI (most common) — silent by default
bash "$SKILL_DIR/scripts/wplocal" plugin list
bash "$SKILL_DIR/scripts/wplocal" search-replace 'old.test' 'new.test'
bash "$SKILL_DIR/scripts/wplocal" db export backup.sql

# PHP, Composer, MySQL — full env with version info
bash "$SKILL_DIR/scripts/localwpshell" php -v
bash "$SKILL_DIR/scripts/localwpshell" composer install
bash "$SKILL_DIR/scripts/localwpshell" mysql -e "SHOW DATABASES;"

# Silent mode — only command output, no env info
bash "$SKILL_DIR/scripts/silentlocalwpshell" php -r 'echo PHP_VERSION;'

Commands

| Command | Purpose | |---------|---------| | $SKILL_DIR/scripts/localwpshell [cmd] | Load LocalWP env, show versions, optionally run a command | | $SKILL_DIR/scripts/silentlocalwpshell [cmd] | Same as above but suppresses info output | | $SKILL_DIR/scripts/wplocal [wp-args] | Shorthand for silentlocalwpshell wp ... |

When to Use

Always wrap commands through these scripts when the working directory is inside a LocalWP site. The system PHP/MySQL on macOS is not the same as what LocalWP provisions.

Recognizing a LocalWP Site

  • The path contains Local Sites/
  • The path is inside a symlinked LocalWP directory (handled automatically)
  • The project has the typical LocalWP structure: app/public/wp-content/
  • The project directory contains symlinks INTO a LocalWP site (handled automatically — searched up to 2 levels deep)

Critical Warnings

NEVER source a LocalWP ssh-entry script directly (source "~/Library/Application Support/Local/ssh-entry/XXX.sh"). It launches an interactive shell that blocks the agent indefinitely. Always go through localwpshell / silentlocalwpshell / wplocal, which extract the environment without spawning a shell.

WordPress Multisite: always pass --url=. On a multisite install, WP-CLI without --url targets the network's primary site — pages, options, and plugin changes land on the WRONG site silently. Find the right URL first (wp site list), then include it in every command:

# Codex: this path resolves under Claude Code; substitute the directory containing this SKILL.md.
SKILL_DIR="${CLAUDE_SKILL_DIR}"
bash "$SKILL_DIR/scripts/wplocal" site list
bash "$SKILL_DIR/scripts/wplocal" post list --post_type=page --url=https://wp.wpengine/coaching

Error Patterns That Mean "Use This Skill"

  • Error: Failed loading /opt/...opcache.so or xdebug.so — wrong PHP binary
  • ERROR 2002 (HY000): Can't connect to local MySQL server through socket — wrong MySQL
  • PHP Fatal error: Uncaught Error: Call to undefined function ... — missing PHP extension
  • wp: command not found — WP-CLI not on PATH
  • PHP version mismatch (e.g. expecting 8.x, got system 7.x)
  • Composer dependency conflicts due to wrong PHP version

Recovery

# Codex: this path resolves under Claude Code; substitute the directory containing this SKILL.md.
SKILL_DIR="${CLAUDE_SKILL_DIR}"
# Instead of:        Use:
wp plugin list       bash "$SKILL_DIR/scripts/wplocal" plugin list
php -v               bash "$SKILL_DIR/scripts/localwpshell" php -v
composer install     bash "$SKILL_DIR/scripts/localwpshell" composer install

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.