Skills

Playground Snapshot Release

Publish a Playground UI snapshot (`@mastra/playground-ui`, `@mastra/observability`, and...

Install

npx skills add mastra-ai/mastra --skill playground-snapshot-release -g -a claude-code -y
Repository
mastra-ai/mastra29.3k
Category
Design
Updated
3d ago
License
See repository
Context cost
Mediumabout 1,624 tokens
Runs scripts
No, instructions only

What it does

Publish a Playground UI snapshot (`@mastra/playground-ui`, `@mastra/observability`, and their workspace dependencies) from `main` or the current branch via the `playground-snapshot` mode of the Publish to npm workflow, wait for it to finish, then open a PR on `mastra-ai/platform` bumping the frontend to the published snapshot version. Use when asked to release, publish, or ship a playground/studio UI snapshot to the platform frontend.

Playground Snapshot Release

Dispatches .github/workflows/npm-publish.yml with publish_type=playground-snapshot. That job publishes only @mastra/playground-ui, @mastra/observability, and their non-private workspace dependencies (currently @mastra/ai-sdk, @mastra/client-js, @mastra/core, @mastra/schema-compat, @mastra/react) at version 0.0.0-<tag>-<timestamp>. It refuses to run on main, and publishes real immutable npm versions.

1. Ask which branch

Use ask_user with exactly this single-select question:

Which branch should the workflow run on?

Options:

  • main, publish from the latest main through a fresh branch
  • Current branch (<current-branch>), publish from the current branch (show the real name from git branch --show-current)

2. Prepare the branch

If main

The workflow rejects refs/heads/main, so publish from a new branch created from up-to-date origin/main. Do not git checkout main or switch the current worktree's branch: main is usually checked out in another worktree (so checkout fails), and switching would disturb the user's current work. Instead, create a dedicated temporary worktree from origin/main:

git fetch origin main
branch="playground-snapshot/$(date +%Y%m%d-%H%M%S)"
snapshot_dir=$(mktemp -d)/mastra-snapshot
git worktree add -b "$branch" "$snapshot_dir" origin/main --no-track
git -C "$snapshot_dir" push -u origin "$branch"

Run every later git command for this branch with git -C "$snapshot_dir" (or from inside it). Once the workflow has been dispatched and the run found, remove the worktree with git worktree remove "$snapshot_dir" (the remote branch stays for the workflow).

If current branch

branch=$(git branch --show-current)
Read the whole SKILL.md on GitHub

More in Design