mcloud-logs — Claude Code skill: Cloud runtime logs
A skill that teaches your agent to read backend and storefront logs with mcloud logs, filter them by time or deployment, and pipe them to JSON.
npx skills add medusajs/medusa-agent-skills --skill mcloud-logs -a claude-codeWhat mcloud-logs does
The skill documents the mcloud logs command, which fetches runtime logs for a Cloud environment. Organization, project and environment come from the active context unless you pass them yourself.
One SKILL.md file covers the flags: --search matches a substring, --metadata status=500 narrows by field, --deployment scopes to a single build, --type storefront switches the stream. --json gives structured output that pipes cleanly into jq. Tool permissions stay tight — Bash(mcloud logs*) and Bash(jq*).
Here is where people trip up: --follow and --json cannot be combined. Streaming runs until Ctrl+C, so it has no place in scripts or pipelines; use a bounded window with --from and --to instead. The default returns the last 500 lines from the past 15 minutes, and --limit only applies outside follow mode. If --to is more than 15 minutes in the past, you must also pass --from.
What it helps with
- find backend errors in a given time window
- filter entries by HTTP status through metadata
- pull logs for one deployment or build
- read storefront logs separately from backend
- hand structured JSON to the agent for analysis
Example prompts for the agent
- show me backend errors from the last hour
- fetch logs for deployment
bld_01ABC123as JSON - check the storefront logs for 500s
How to install mcloud-logs
1Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill mcloud-logs -a claude-code2Manually: put the files in place
~/.claude/skills/mcloud-logs/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/mcloud-logs/
1Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill mcloud-logs -a codex2Manually: put the files in place
.agents/skills/mcloud-logs/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill mcloud-logs -a cursor2Manually: put the files in place
.cursor/skills/mcloud-logs/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install medusajs/medusa-agent-skills mcloud-logs2Manually: put the files in place
.github/skills/mcloud-logs/SKILL.md1Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill mcloud-logs -a gemini-cli2Platform CLI
gemini skills install https://github.com/medusajs/medusa-agent-skills --path plugins/medusa-cloud/skills/mcloud-logsManually: put the files in place
.devin/skills/mcloud-logs/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add medusajs/medusa-agent-skills --skill mcloud-logs -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-logs
How do I install mcloud-logs in Claude?
Run npx skills add medusajs/medusa-agent-skills --skill mcloud-logs -a claude-code. The skill lands in ~/.claude/skills/mcloud-logs/SKILL.md.
What does mcloud-logs do?
It gives the agent instructions for mcloud logs: fetching Cloud environment logs, filtering by time, source, metadata or deployment, and emitting JSON.
Why can't I combine --follow with --json?
The two flags are incompatible. For programmatic analysis, use a bounded window with --from and --to plus --json.