# mcloud-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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1300 installs · ★ 235
- Author: medusajs
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/medusajs/medusa-agent-skills/tree/HEAD/plugins/medusa-cloud/skills/mcloud-logs/SKILL.md
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/skills/mcloud-logs

## What it 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`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add medusajs/medusa-agent-skills --skill mcloud-logs -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/mcloud-logs/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/mcloud-logs/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add medusajs/medusa-agent-skills --skill mcloud-logs -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/mcloud-logs/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add medusajs/medusa-agent-skills --skill mcloud-logs -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/mcloud-logs/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install medusajs/medusa-agent-skills mcloud-logs
```

2. **Manually: put the files in place**
- File: `.github/skills/mcloud-logs/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add medusajs/medusa-agent-skills --skill mcloud-logs -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/medusajs/medusa-agent-skills --path plugins/medusa-cloud/skills/mcloud-logs
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/mcloud-logs/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add medusajs/medusa-agent-skills --skill mcloud-logs -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/medusajs/medusa-agent-skills/tree/HEAD/plugins/medusa-cloud/skills/mcloud-logs/SKILL.md

## When to use it
- 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
- show me backend errors from the last hour
- fetch logs for deployment `bld_01ABC123` as JSON
- check the storefront logs for 500s

## Similar
- [optimize-simplicite-logs](https://affpapa.org/en/nevibecode/skills/optimize-simplicite-logs.md) — skill · 31 installs
- [platform-apex-logs-debug](https://affpapa.org/en/nevibecode/skills/platform-apex-logs-debug.md) — skill · 6800 installs
- [dt-obs-logs](https://affpapa.org/en/nevibecode/skills/dt-obs-logs.md) — skill · 2700 installs
- [analyze_logs](https://affpapa.org/en/nevibecode/prompts/analyze-logs.md) — prompt · ★ 44429
- [base44-troubleshooter](https://affpapa.org/en/nevibecode/skills/base44-troubleshooter.md) — skill · 9900 installs

From the same set: [medusajs/medusa-agent-skills](https://affpapa.org/en/nevibecode/by/medusajs/medusa-agent-skills.md) — 11 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
