mcloud-variables — Claude Code skill: Medusa Cloud env vars
An agent skill that drives mcloud variables for Medusa Cloud environments: list keys, read one, write, delete, export to .env.
npx skills add medusajs/medusa-agent-skills --skill mcloud-variables -a claude-codeWhat mcloud-variables does
The skill hands your agent a narrow set of mcloud variables calls. It can pull a full key list for an environment, fetch a single entry by key or var_... ID, create or update values, remove them, and dump everything into dotenv format. Four subcommands cover the work: list, get, set, delete. Tool access is scoped to Bash(mcloud variables*), Bash(mcloud environments*) and Bash(jq*).
Writes alone change nothing in a running app. A runtime value needs mcloud environments redeploy <env> afterwards; a build value needs mcloud environments trigger-build <env>, because a redeploy reuses the existing image and skips build-time changes. Miss that and the agent reports success while the live app keeps the old value.
Secrets stay masked unless you ask to see them, and the skill treats --reveal as off-limits otherwise. System variables cannot be deleted. In non-interactive runs delete also needs --yes. Key-based lookup and creation require --project and --environment, while an ID lookup skips both. You need mcloud CLI v0.1.10 or later for set and delete.
What it helps with
- audit every variable in an environment before a release
- push a local
.envfile into a Cloud environment - check whether a key is stored as a secret
- mark a key build-only and rebuild the image
- remove an obsolete flag without touching system entries
Example prompts for the agent
- List the runtime variables for production as JSON, system ones included
- Create
REDIS_URLset toredis://cache:6379and redeploy so it takes effect - Export everything to
.envand show the secrets, I'm asking for them explicitly
How to install mcloud-variables
1Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill mcloud-variables -a claude-code2Manually: put the files in place
~/.claude/skills/mcloud-variables/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/mcloud-variables/
1Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill mcloud-variables -a codex2Manually: put the files in place
.agents/skills/mcloud-variables/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill mcloud-variables -a cursor2Manually: put the files in place
.cursor/skills/mcloud-variables/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install medusajs/medusa-agent-skills mcloud-variables2Manually: put the files in place
.github/skills/mcloud-variables/SKILL.md1Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill mcloud-variables -a gemini-cli2Platform CLI
gemini skills install https://github.com/medusajs/medusa-agent-skills --path plugins/medusa-cloud/skills/mcloud-variablesManually: put the files in place
.devin/skills/mcloud-variables/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill mcloud-variables -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about mcloud-variables
How do I install mcloud-variables in Claude Code?
Run npx skills add medusajs/medusa-agent-skills --skill mcloud-variables -a claude-code. The skill lands at ~/.claude/skills/mcloud-variables/SKILL.md.
What does mcloud-variables do?
It lets an agent manage Medusa Cloud environment variables through the CLI: list them, read one, set values, delete entries, and export the set as dotenv.
Why did my variable change have no effect?
set and delete only store the change. Run mcloud environments redeploy <env> for a runtime variable, or mcloud environments trigger-build <env> for a build variable.