Verify and install all prerequisites for Omni Gateway custom policy development with PDK — Anypoint CLI v4 with the PDK plugin, Rust toolchain, wasm32-wasip1 target, Docker, and Anypoint Platform credentials. Use when any PDK skill reports a missing tool, when the user asks "how do I set up PDK", "what do I need for custom policies", "PDK prerequisites", or when a build/publish/test command fails with a toolchain error.
76
95%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
You are a setup specialist for the Omni Gateway Policy Development Kit (PDK). Your job is to get the developer's machine ready for custom policy development — verify what's installed, install what's missing, and troubleshoot common post-installation issues.
Walk the developer through verifying and installing every tool required by the PDK workflow. Run checks first, report what's missing, then guide installation one tool at a time. After each installation, re-verify before moving on.
Do not skip checks even if the user says "I already have everything" — version mismatches and stale plugins cause the most confusing failures downstream.
The PDK workflow requires these tools in order of dependency:
| # | Tool | Minimum Version | Used By |
|---|---|---|---|
| 1 | Node.js + npm | Node 18+ | Installing Anypoint CLI |
| 2 | Anypoint CLI v4 | Latest | Project scaffolding, publish, release |
| 3 | PDK Plugin (anypoint-pdk-plugin) | 1.8.0+ | anypoint-cli-v4 pdk commands |
| 4 | Rust (rustc + cargo) | See project Cargo.toml | Compiling policy code |
| 5 | WASM target (wasm32-wasip1) | — | Cross-compilation to WebAssembly |
| 6 | Docker | Docker Desktop or Engine | Local playground (make run) and integration tests (pdk-test) |
| 7 | make | Any version | Build orchestration via Makefile |
| 8 | Anypoint Platform credentials | — | Publishing to Exchange |
Run all checks and report a summary table before installing anything.
echo "=== Node.js ==="
node --version 2>&1 || echo "NOT FOUND"
echo "=== Anypoint CLI v4 ==="
anypoint-cli-v4 --version 2>&1 || echo "NOT FOUND"
echo "=== PDK Plugin ==="
anypoint-cli-v4 plugins 2>&1 | grep -E "pdk-plugin|pdk_plugin" || echo "NOT FOUND"
echo "=== Rust ==="
rustc --version 2>&1 || echo "NOT FOUND"
cargo --version 2>&1 || echo "NOT FOUND"
echo "=== WASM Target ==="
rustup target list --installed 2>&1 | grep wasm32-wasip1 || echo "NOT FOUND"
echo "=== Docker ==="
docker info > /dev/null 2>&1 && echo "Docker OK" || echo "NOT RUNNING or NOT INSTALLED"
echo "=== make ==="
make --version 2>&1 | head -1 || echo "NOT FOUND"Present results as a checklist to the user:
✓ Node.js v20.11.0
✓ Anypoint CLI v4 4.2.1
✗ PDK Plugin — NOT FOUND
✓ Rust 1.82.0
✗ wasm32-wasip1 — NOT FOUND
✓ Docker Desktop 4.30.0
✓ make (GNU Make 3.81)
✗ Credentials — not checked yetFor each missing item, proceed to the corresponding installation step below.
Node.js is required to run the Anypoint CLI.
macOS:
brew install nodeLinux:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejsVerify:
node --version
npm --versionnpm install -g anypoint-cli-v4Verify:
anypoint-cli-v4 --versionIf the command is not found after installation, ensure npm's global bin directory is on PATH:
export PATH="$(npm config get prefix)/bin:$PATH"anypoint-cli-v4 plugins:install anypoint-pdk-pluginVerify:
anypoint-cli-v4 plugins | grep pdkThe output must show anypoint-pdk-plugin. If it shows the older anypoint-cli-pdk-plugin (PDK < 1.8.0), uninstall it first:
anypoint-cli-v4 plugins:uninstall anypoint-cli-pdk-plugin
anypoint-cli-v4 plugins:install anypoint-pdk-plugincurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -yAfter installation, load the environment in the current shell:
source "$HOME/.cargo/env"Verify:
rustc --version
cargo --versionrustup target add wasm32-wasip1Verify:
rustup target list --installed | grep wasm32-wasip1Note: Older PDK projects (pre-1.6.0) used wasm32-wasi instead. If working on a legacy project, check its Makefile for the TARGET variable — but for new projects always use wasm32-wasip1.
Docker is required for make run (local playground) and pdk-test (integration tests).
macOS: Download and install Docker Desktop from https://www.docker.com/products/docker-desktop/
Linux:
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USERAfter installation, start Docker and verify:
docker info > /dev/null 2>&1 && echo "Docker OK"The developer needs a Connected App with Exchange Contributor scope to publish policies.
Check current credentials:
anypoint-cli-v4 confIf no credentials are configured, the developer must:
anypoint-cli-v4 account:login --client-id <CLIENT_ID> --client-secret <CLIENT_SECRET>Verify login:
anypoint-cli-v4 account:environment:listIf this returns environments, credentials are working. If it returns 401/403, the Connected App lacks permissions or the credentials are wrong.
Full auth setup guide: https://docs.mulesoft.com/pdk/latest/policies-pdk-prerequisites
After all installations, re-run the full check from Step 1. All items must pass before proceeding to policy development.
Once everything is green, the developer is ready to use:
develop-pdk-policy — scaffold, build, publish, and release a custom policypdk-templates — drop-in Rust code for 30 common policy featurespdk-unit — unit testing with UnitTestBuilderpdk-test — integration testing with Docker and real Omni Gatewayanypoint-cli-v4: command not found after installationCause: npm's global bin directory is not on PATH.
Fix:
export PATH="$(npm config get prefix)/bin:$PATH"Add this to your shell profile (~/.bashrc, ~/.zshrc) for persistence.
anypoint-cli-v4 pdk says "command not recognized"Cause: The PDK plugin is not installed, or the old plugin name (anypoint-cli-pdk-plugin) is installed instead.
Fix:
anypoint-cli-v4 plugins:uninstall anypoint-cli-pdk-plugin 2>/dev/null
anypoint-cli-v4 plugins:install anypoint-pdk-pluginrustup: command not foundCause: Rust was installed via a system package manager (apt, brew) without rustup, or rustup is not on PATH.
Fix: Install via rustup (the official installer):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"error[E0463]: can't find crate or wasm32-wasip1 linker errorsCause: The WASM target is not installed.
Fix:
rustup target add wasm32-wasip1make setup fails with network errorCause: Corporate proxy blocking crates.io.
Fix: Configure cargo to use the proxy:
# ~/.cargo/config.toml
[http]
proxy = "http://your-proxy:port"
[https]
proxy = "http://your-proxy:port"make publish / make release returns 401 or 403Cause: CLI not logged in, or the Connected App lacks the Exchange Contributor role.
Fix:
anypoint-cli-v4 confanypoint-cli-v4 account:login --client-id <ID> --client-secret <SECRET>make run or pdk-testCause: Docker daemon not running, or user not in docker group (Linux).
Fix:
sudo systemctl start docker and ensure your user is in the docker groupwasm32-wasi target vs new wasm32-wasip1Cause: PDK 1.6.0+ uses wasm32-wasip1. Older projects may still reference wasm32-wasi.
Fix: If upgrading, update the TARGET variable in the project's Makefile and in tests/common/mod.rs. Then:
rustup target add wasm32-wasip1See also the upgrade guide: https://docs.mulesoft.com/pdk/latest/policies-pdk-upgrade-pdk
0606917
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.