# Maestro Cli

> >

- **Type:** Skill
- **Install:** `agentstack add skill-dotnet-arcade-skills-maestro-cli`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [dotnet](https://agentstack.voostack.com/s/dotnet)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [dotnet](https://github.com/dotnet)
- **Source:** https://github.com/dotnet/arcade-skills/tree/main/plugins/dotnet-dnceng/skills/maestro-cli

## Install

```sh
agentstack add skill-dotnet-arcade-skills-maestro-cli
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Maestro CLI

Query Maestro/BAR data via the `mstro` CLI tool instead of loading MCP tools into context. Same data, same caching, zero context tax — agents discover capabilities progressively through `--help` and `mstro guide`.

## When to Use This Skill

Use this skill when:
- You need Maestro/BAR data but the maestro MCP server isn't configured
- You're scripting or chaining commands with `jq`, `grep`, or other CLI tools
- You want structured JSON output for downstream processing
- The task is one-shot (not a multi-turn conversational investigation)

**Prefer MCP-based skills (flow-analysis, flow-tracing) when:**
- The maestro MCP server is already loaded in your tool list
- You're doing multi-turn conversational investigation
- You need markdown-formatted output with visual indicators

## Installation

```bash
dotnet tool install -g lewing.maestro.mcp
```

After installation, `mstro` is available globally. Verify: `mstro --help`

> Note: The same package (`lewing.maestro.mcp`) serves as both a .NET global tool (providing the `mstro` CLI) and an MCP server (via `dotnet dnx`). The CLI is what this skill uses.

## Authentication

Three-tier cascade (automatic fallback):
1. **`MAESTRO_BAR_TOKEN`** env var — explicit PAT
2. **Cached Entra ID** — reuses `darc authenticate` credentials from `~/.darc/.auth-record-*`
3. **Anonymous** — read-only fallback (may be rate-limited)

Run `darc authenticate` once for persistent credentials.

## Progressive Discovery

Don't memorize commands. Discover them:

```bash
mstro --help              # All commands, one line each
mstro  --help    # Parameters for a specific command
mstro  --schema  # JSON response field names (for jq pipelines)
mstro guide               # Workflow-organized guide (~3KB)
```

Before writing jq queries, run `--schema` to see the response shape:
```bash
mstro subscription-health --schema   # → shows StaleSubs[].Id, .BuildsBehind, etc.
mstro latest-build --schema          # → shows Id, Repository, Commit, etc.
```

## Common Patterns

All query commands support `--json` (structured output) and `--no-cache` (fresh data).

### Check subscription health
```bash
mstro subscription-health --target-repository https://github.com/dotnet/dotnet --json
```

### Find latest build
```bash
mstro latest-build https://github.com/dotnet/runtime --channel-name ".NET 10.0.1xx SDK" --json
```

### Check codeflow status
```bash
mstro codeflow-statuses --json
```

### Trace a build graph
```bash
mstro build-graph  --json
```

### Trigger a stale subscription
```bash
# Provide --source-repository + --channel-name (auto-resolves latest build)
mstro trigger-subscription  --source-repository https://github.com/dotnet/runtime --channel-name ".NET 10.0.1xx SDK"
# Or provide --build-id directly. Add --force to overwrite stale PR branch.
```

## Chaining with jq

Use `mstro  --schema` to see all response fields before writing jq queries.

```bash
# Count stale subscriptions (StaleSubs[].Id, .BuildsBehind, .SourceRepository, .ChannelName)
mstro subscription-health --target-repository https://github.com/dotnet/dotnet --json | jq '.StaleSubs | length'

# Filter channels by name
mstro channels --json | jq '.[] | select(.Name | contains("10.0"))'

# Get build ID then trace graph
BUILD_ID=$(mstro latest-build https://github.com/dotnet/runtime --json | jq -r '.Id')
mstro build-graph $BUILD_ID --json
```

## Cache

Shared SQLite cache at `~/.mstro/cache.db` (WAL mode). Cache is shared between CLI and MCP server instances — using the CLI warms the cache for MCP and vice versa.

- `mstro cache status` — show cache stats
- `mstro cache clear` — clear all cached data
- `--no-cache` on any command bypasses cache

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [dotnet](https://github.com/dotnet)
- **Source:** [dotnet/arcade-skills](https://github.com/dotnet/arcade-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-dotnet-arcade-skills-maestro-cli
- Seller: https://agentstack.voostack.com/s/dotnet
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
