/medusa-cloud:mcloud-localfrom medusa-cloud
Runs `mcloud local build` to reproduce Cloud builds locally for debugging build-failed deployments without pushing to the tracked branch.
Ships in medusa-cloud. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Execute mcloud local build to run a Cloud build on the local machine, mirroring how Cloud builds the project. Use it to debug build-failed deployments without pushing changes and waiting for a full Cloud build.
--json flag. local build streams plaintext build output and signals the result through its exit code (0 = success). Do not parse its output as JSON.build-failed (build) failures only — not deployment-failed (runtime) failures. For runtime failures, use mcloud logs --deployment <id>.--docker-cache to enable it.Run a Cloud build locally. Infers the root path and build variables from the linked Cloud project and environment. Builds the backend by default; pass --type storefront for the storefront.
mcloud local build \
--organization <org-id> \
--project <project-id-or-handle> \
--environment <environment-handle>
Options:
-o/--organization <id> — Organization ID (falls back to active context)-p/--project <id-or-handle> — Project ID or handle (falls back to active context)-e/--environment <handle> — Environment whose variables are used (falls back to active context)-t/--type <backend|storefront> — Build type (default: backend)--root-path <path> — Backend root path relative to the repo root (inferred if omitted; . if no Cloud project found)--storefront-path <path> — Storefront path relative to the repo root, for --type storefront (inferred if omitted)--env-file <path> — Use a local .env file instead of the Cloud environment's variables-v/--var <KEY=VALUE> — Override a single build variable; repeatable--docker-cache — Enable the Docker build cache (default: false)Output:
0), the backend image is tagged <repository-name>:cloud-local-build-<commit-hash>; a storefront build writes its output directory and prints the path.Check out the same commit the failed deployment built so the local build matches, then route on the exit code:
# Identify the failing deployment and the commit it built
DEPLOYMENT_ID=$(
mcloud deployments list --json \
| jq -r '[.[] | select(.backend_status == "build-failed")][0].id'
)
COMMIT=$(mcloud deployments get "$DEPLOYMENT_ID" --json | jq -r '.commit_hash')
git checkout "$COMMIT"
if mcloud local build; then
echo "Build succeeded locally; failure not reproducible from this commit."
else
echo "Build failed locally; inspect the streamed output for the failing step."
fi
Once the local build exits 0, push the fix to the tracked branch and start a fresh Cloud build with mcloud environments trigger-build <env>.
# Reproduce the backend build for the active context
mcloud local build
# Reproduce the storefront build
mcloud local build --type storefront --storefront-path apps/storefront
# Test a build-variable fix without editing code
mcloud local build --var NODE_ENV=production
# Build against a local .env file
mcloud local build --env-file .env
# Reuse the Docker cache for a faster rebuild
mcloud local build --docker-cache
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub medusajs/medusa-agent-skills --plugin medusa-cloud9 skills in this plugin
/mcloud-authExecute mcloud authentication and context commands: login, logout, whoami, use, version, and signup. Use when setting up the CLI, switching accounts, verifying auth state, setting the active org/project/environment context, or checking the CLI version./mcloud-deploymentsExecute mcloud deployments commands to list deployments, retrieve deployment details, and fetch build logs. Use when listing deployments, checking deployment status, or reading build output for debugging build failures./mcloud-environmentsExecute mcloud environments commands to list, get, create, delete, redeploy, or trigger builds for Cloud environments. Use when managing environment lifecycle, redeploying after variable changes, or starting new builds from source./mcloud-logsExecute mcloud logs to fetch and stream runtime logs for Cloud environments. Use when reading backend or storefront logs, filtering by time range, searching for errors, or scoping logs to a specific deployment./mcloud-organizationsExecute mcloud organizations commands to list or get Cloud organizations. Use when discovering organizations, resolving organization IDs by name, or retrieving organization details including members and subscription./mcloud-projectsExecute mcloud projects commands to list, get, or delete Cloud projects. Use when discovering projects, resolving project handles by name, or retrieving project details including linked environments.Other plugins' skills for the same job