본문으로 건너뛰기
cccskills
무료GitHub에 공개

playground-snapshot-release

Publish a Playground UI snapshot, a version for testing branch changes, through the npm release workflow. The skill checks publication results, updates the platform frontend's package versions and lockfile, and opens a pull request.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Publish a Playground UI snapshot (`@mastra/playground-ui` and its 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.

연동 도구GitHub

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • Publishing a snapshot from the latest main
  • Releasing current-branch Playground UI changes
  • Opening a PR to update the platform frontend
  • Checking published versions and updated dependencies

포함된 파일(1)

  • SKILL.md6.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Playground Snapshot Release

Dispatches .github/workflows/npm-publish.yml with publish_type=playground-snapshot. That job publishes only @mastra/playground-ui and its 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)

Stop if branch is main or empty. Make sure the remote branch exists and contains the local commits: if git status -sb shows the branch ahead of or without an upstream, push it (git push -u origin "$branch"). Stop and ask if it has diverged from the remote.

For both

Record the exact SHA that will be published:

head_sha=$(git ls-remote origin "refs/heads/$branch" | awk '{print $1}')
test -n "$head_sha"

3. Choose the tag

Derive a short lowercase kebab-case tag from the branch (the workflow default slugifies the branch name; passing it explicitly keeps it predictable). It must start with a letter and must not be latest, next, alpha, beta, rc, or stable. Tell the user which tag will be used.

4. Dispatch

The user picking a branch in step 1 is the confirmation to publish; do not ask again.

gh workflow run npm-publish.yml \
  --repo mastra-ai/mastra \
  --ref "$branch" \
  -f publish_type=playground-snapshot \
  -f tag="$tag"

5. Wait for completion

The run usually takes 5–10 minutes. Find the run matching the branch and SHA (never just the newest run); retry for a short while if it does not show up yet:

gh run list \
  --repo mastra-ai/mastra \
  --workflow npm-publish.yml \
  --branch "$branch" \
  --event workflow_dispatch \
  --limit 5 \
  --json databaseId,headSha,createdAt,status,conclusion,url \
  --jq ".[] | select(.headSha == \"$head_sha\")"

Watch it until it finishes. Tool calls time out, so run the watch in the background and poll, or use a long timeout (e.g. 1200 s):

gh run watch <run-id> --repo mastra-ai/mastra --exit-status --interval 30

On failure, report gh run view <run-id> --repo mastra-ai/mastra --log-failed and stop. Do not rerun automatically.

6. Resolve the published version

Do not use npm view here: freshly published versions can take many minutes to show up on the npm registry/CDN, so lookups fail even though the publish succeeded. Read the versions from the workflow run logs instead:

gh run view <run-id> --repo mastra-ai/mastra --log \
  | grep "Published package @mastra/" \
  | sed -E 's/.*Published package (@mastra\/[^ ]+)@([^ ]+).*/\1 \2/'
version=$(gh run view <run-id> --repo mastra-ai/mastra --log \
  | grep -oE "Published package @mastra/playground-ui@[^ ]+" \
  | sed 's/.*@mastra\/playground-ui@//')

All packages in the set share this version. Check that every package you are about to bump appears in the "Published package" lines with the same version. Do not continue if any is missing.

7. Open the platform PR

Work in a temporary clone of mastra-ai/platform (default branch main, pnpm workspace), never inside the mastra repo:

workdir=$(mktemp -d)
gh repo clone mastra-ai/platform "$workdir/platform" -- --depth 1
cd "$workdir/platform"
git checkout -b "chore/bump-playground-ui-$tag"

In frontend/package.json, set every @mastra/* dependency that belongs to the published set (@mastra/playground-ui, @mastra/ai-sdk, @mastra/client-js, @mastra/core, @mastra/schema-compat, @mastra/react) to the exact $version. Leave other @mastra/* packages (e.g. @mastra/memory) untouched, but mention in the PR body if they now differ from the bumped version, since they may need a full snapshot instead. Do not touch admin-portal unless the user asks.

Update the lockfile, then commit, push, and open the PR:

The new versions may not be installable yet because of npm registry propagation. Try the install, and if it fails, wait 1 minute and retry, for up to 10 attempts:

for i in $(seq 1 10); do
  pnpm install --filter ./frontend --lockfile-only && break
  [ "$i" = 10 ] && { echo "install failed after 10 attempts"; exit 1; }
  sleep 60
done

Run this with a long timeout (e.g. 900 s) or in the background and poll.

git add frontend/package.json pnpm-lock.yaml
git commit -m "chore(frontend): bump playground UI to $version" \
  -m "Snapshot published from mastra-ai/mastra@$head_sha ($branch)." \
  -m "Co-Authored-By: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>"
git push -u origin HEAD
gh pr create --repo mastra-ai/platform --base main --head "$(git branch --show-current)" \
  --title "chore(frontend): bump playground UI to $version" \
  --body "<summary: source branch, SHA, workflow run URL, npm tag, bumped packages and version>"

If pnpm install --lockfile-only still fails after the 10 attempts, report the error rather than committing an inconsistent lockfile.

8. Report

  • Source branch and published SHA
  • Workflow run URL and conclusion
  • npm tag and version
  • Bumped packages
  • Platform PR URL

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Design and audit an agent's system prompt, the instructions that guide its work. Define a concrete outcome, starting input, available tools, completion checks, fallback behavior, and final report so the prompt describes a complete run.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Designing the core instructions for a new agent
  • Auditing a prompt before saving it
  • Defining behavior when tools or permissions are missing
mastra-ai/mastra2.9만2026년 10월 23일 업데이트

Create a dedicated test project linked to the current worktree and check Agent Builder through APIs and browser interactions. It covers agent and skill management, permissions, defaults, and related features, with selectable test sections.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Validate an Agent Builder feature branch before review
  • Check role-based permissions and authentication
  • Test agent and skill management through APIs and the UI
mastra-ai/mastra2.9만2026년 10월 23일 업데이트

Reviews pull requests for bugs, error handling, code quality, and style consistency. Organizes feedback into an overview, must-fix issues with file locations, improvement suggestions, and positive notes so reviewers can distinguish urgent problems from refinements.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Finding bugs that must be fixed before merging
  • Reviewing TypeScript types and asynchronous code
  • Checking naming, imports, and leftover debug statements
mastra-ai/mastra2.9만2026년 10월 23일 업데이트

Design instructions for agents that write, fix, review, or refactor code. Define behavior based on file access, select suitable tools, and set clear verification and completion rules for repository changes or copyable code output.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Designing an agent for repository bug fixes
  • Defining a pull request review agent
  • Creating a code generator without workspace access
mastra-ai/mastra2.9만2026년 10월 23일 업데이트

Configure Factory board behavior and GitHub or Linear event handlers in deployment code. Adjust stage transitions, phase meanings, and tool-result handling, then check the changes with focused tests and versioned audit records.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Add approval requirements to board transitions
  • Change GitHub or Linear event handling
  • Define custom board phases and tool-result rules
mastra-ai/mastra2.9만2026년 10월 23일 업데이트

Design agents that draft blog posts, social posts, newsletters, and marketing copy. Define the audience, brand voice, length, and required output so each agent delivers a complete draft with a headline and supporting notes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Build a blog writing agent with a consistent brand voice
  • Design an agent for LinkedIn product posts
  • Define delivery rules for newsletter drafts
mastra-ai/mastra2.9만2026년 10월 23일 업데이트

mastra-ai의 스킬 모두 보기

이 스킬의 문제 신고