MCPInstall

mastra-smoke-test

Smoke test Mastra projects locally or deploy to staging/production. Tests Studio UI, agents, tools, workflows, traces, memory, and more. Supports both local development and cloud deployments.

Installs
61
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/mastra-ai/mastra --skill mastra-smoke-test
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads mastra-smoke-test automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Mastra Smoke Test

Comprehensive smoke testing for Mastra projects.

Release smoke workflows

Use progressive disclosure: stay in this file until the workflow branches, then read only the reference for the branch you are on. references/release-smoke.md is a short index if you need the full map.

Alpha release branch point

Before alpha smoke testing, identify the alpha versioning PR state. Prefer the standard Changesets release branch:

gh pr view changeset-release/main \
  --json number,title,state,url,headRefName,baseRefName,isDraft,mergeable,reviewDecision,updatedAt,mergedAt,mergeCommit

Expected shape:

title: chore: version packages (alpha)
head: changeset-release/main
base: main

If that branch lookup fails, search open and recently merged PRs:

gh pr list --state open --search 'version packages alpha in:title' --limit 20
gh pr list --state merged --search 'version packages alpha in:title' --limit 20

Then branch:

  • If the versioning PR is open, read references/alpha-versioning-pr.md.
  • If the versioning PR is merged, read references/alpha-publish.md.
  • If no versioning PR exists, report that and wait for the scheduled alpha versioning flow or user direction.

Do not create the alpha smoke-test project until the automatic alpha publish workflow has completed and the intended packages are installable.

Stable release branch point

If the user is running the stable/full release workflow, read references/stable-release-smoke.md. If that workflow fails after some packages publish, switch to references/stable-partial-publish-recovery.md.

Scope and targeted checks

After the release package is published and before running smoke tests, read references/release-scope-discovery.md to identify changed features. Use the default generated project for the baseline checklist, then add targeted checks for changed features the generated project does not exercise.

When scope discovery identifies a branch:

  • For general changed-feature coverage, read references/targeted-feature-smoke.md.
  • For storage/provider schema or migration changes, read references/storage-provider-migration-smoke.md.

⚠️ Mandatory Test Checklist

Use task_write to track progress. Run ALL tests unless --test specifies otherwise.

Do not skip tests unless you hit an actual blocker. "Seemed complex" or "wasn't sure" are not valid reasons. Attempt everything - only stop a test when you literally cannot proceed. Report what you tried and what blocked you.

#TestReferenceWhen Required
1Setupreferences/tests/setup.mdAlways
2Agentsreferences/tests/agents.md--test agents or full
3Toolsreferences/tests/tools.md--test tools or full
4Workflowsreferences/tests/workflows.md--test workflows or full
5Tracesreferences/tests/traces.md--test traces or full
6Scorersreferences/tests/scorers.md--test scorers or full
7Memoryreferences/tests/memory.md--test memory or full
8MCPreferences/tests/mcp.md--test mcp or full
9Errorsreferences/tests/errors.md--test errors or full
10Experimentsreferences/tests/experiments.md--test experiments or local full
11Studio Deployreferences/tests/studio.md--test studio (cloud only)
12Server Deployreferences/tests/server.md--test server (cloud only)

Full staging and production runs skip Experiments as not applicable; the companion worker is a local build artifact. A targeted --test experiments run therefore requires --env local.

Execution Flow

  1. Read the reference file for each test you're about to run
  2. Execute the steps in that reference file
  3. Mark the test complete before moving to the next

Partial Testing (--test)

If --test is provided:

  1. Always run Setup (step 1)
  2. Run only the specified test(s)
  3. Skip other tests

Example: --test agents,traces → Run steps 1, 2, and 5 only.

Local Studio Browser Smoke

For local release smoke tests, do both API/curl checks and a Studio browser pass unless --skip-browser is explicitly requested or browser access is genuinely blocked. API checks prove runtime endpoints work; browser checks prove the Playground/Studio UI can load, submit forms, and display results.

Before opening the browser:

  1. Confirm the dev server is alive on the expected port:

    curl -s -o /dev/null -w '%{http_code}\n' http://localhost:4111
    lsof -i :4111 || true
    
  2. If the process died, restart it from the generated project and wait for readiness:

    cd "$SMOKE_DIR/smoke-project"
    pnpm run dev > "$SMOKE_DIR/logs/dev-server-browser.log" 2>&1 &
    
    for i in {1..60}; do
      code=$(curl -s -o /dev/null -w '%{http_code}' http://localhost:4111 || true)
      [ "$code" = 200 ] && break
      sleep 1
    done
    
  3. Use browser tools to navigate to http://localhost:4111. If networkidle times out but domcontentloaded succeeds and the UI is usable, continue and note the timeout.

Recommended browser task list:

1. Verify Studio shell loads
2. Smoke test agent chat UI
3. Smoke test tools UI
4. Smoke test workflows UI
5. Smoke test observability, scorers, and MCP pages
6. Report browser smoke results

Run these page checks:

AreaRouteWhat to verify
Studio shell/ or /agentsSidebar/nav visible, Mastra version visible, no crash/error overlay
Agents/agents → agent chatAgent list shows expected agent, chat input is visible, sending What's the weather in Tokyo? returns a coherent response, tool call badge/result appears when expected
Tools/tools → tool detailTool list shows get-weather, input form renders, submitting a city such as Paris displays JSON result with weather fields
Workflows/workflows → workflow detailWorkflow list shows weather-workflow, graph/details render, running with a city such as Berlin completes as success, steps show timings/output controls
Traces/observabilityRecent agent/workflow traces appear, including runs triggered during the browser pass
Scorers/scorersRegistered scorers appear with names/descriptions, e.g. Tool Call Accuracy, Completeness, Translation Quality
MCP/mcpsPage loads. Empty state is a pass for default templates: No MCP Servers yet

If a browser interaction does not expose enough text in the accessibility snapshot, inspect document.body.innerText or take a screenshot, then record the visible evidence. Do not rely only on API output for browser smoke.

Append browser results to $SMOKE_DIR/smoke-report.md with a separate section, for example:

## Studio Browser Smoke Results

| Area         | Result | Evidence                                                          |
| ------------ | ------ | ----------------------------------------------------------------- |
| Studio shell | PASS   | Browser loaded localhost:4111; sidebar/nav visible; version shown |
| Agents UI    | PASS   | Weather Agent chat returned Tokyo weather and displayed tool call |
| Tools UI     | PASS   | get-weather form returned Paris weather JSON                      |
| Workflows UI | PASS   | weather-workflow Berlin run completed as success                  |
| Traces UI    | PASS   | Recent agent/workflow traces listed                               |
| Scorers UI   | PASS   | Expected scorers listed                                           |
| MCP UI       | PASS   | Expected empty MCP state shown                                    |

Call out separately whether browser smoke was local Studio only or cloud Studio/deployed server.


Usage

# Full smoke test
smoke test --env local --existing-project ~/my-app
smoke test --env staging -d ~/projects -n test-app

# Partial testing
smoke test --env local --existing-project ~/my-app --test agents
smoke test --env production --existing-project ~/my-app --test studio,server,traces

# Multi-environment: same project, different targets
smoke test --env staging --existing-project ~/my-app   # Uses .mastra-project-staging.json
smoke test --env production --existing-project ~/my-app # Uses .mastra-project.json

Multi-Environment Support

One project can target all environments using separate config files:

EnvironmentConfig FileWhat Happens
LocalN/Apnpm dev → localhost:4111
Staging.mastra-project-staging.jsonDeploys to staging.mastra.cloud
Production.mastra-project.jsonDeploys to mastra.cloud

See references/tests/setup.md for setup details.

Parameters

ParameterRequiredDefaultDescription
--envYes-local, staging, production
--directory*~/mastra-smoke-testsParent dir for new project
--name*-Project name
--existing-project*-Path to existing project
--tagNolatestVersion tag (e.g., alpha)
--pmNopnpmPackage manager
--llmNoopenaiLLM provider
--dbNolibsqlStorage: libsql, pg, turso
--testNo(full)Specific test(s) to run
--browser-agentNofalseAdd browser agent
--skip-browserNofalseCurl-only (no browser UI)
--byokNofalseTest bring-your-own-key

* Either --directory + --name OR --existing-project required

Test Options (--test)

OptionDescriptionEnvironments
agentsAgent page and chatAll
toolsTools page and executionAll
workflowsWorkflows page and runAll
tracesObservability/tracesAll
scorersEvaluation/scorers pageAll
memoryConversation persistenceAll
mcpMCP servers pageAll
errorsError handlingAll
experimentsExperiment worker protocolLocal
studioStudio deploy onlyCloud
serverServer deploy onlyCloud

Prerequisites

All environments:

  • Node.js + package manager
  • LLM API key in env or .env

Local (--env local):

  • Browser tools enabled (/browser on)

Cloud (--env staging/production):

  • Mastra platform account

Quick Start Flow

1. Setup      → Read references/tests/setup.md, create/verify project
2. Start      → `pnpm run dev` (local) or deploy (cloud)
3. Test       → For each test, read its reference file and execute
4. Verify     → Check all items in reference file's checklist
5. Report     → Summarize pass/fail for each test

References

FilePurpose
references/tests/*.mdDetailed steps for each mandatory test
references/release-smoke.mdShort release-smoke reference index
references/alpha-versioning-pr.mdOpen alpha versioning PR readiness
references/alpha-publish.mdMerged alpha PR publish verification
references/stable-release-smoke.mdStable publish and final stable smoke
references/stable-partial-publish-recovery.mdPartial stable publish recovery
references/release-scope-discovery.mdRelease PR scope discovery and planning
references/targeted-feature-smoke.mdTargeted changed-feature smoke patterns
references/storage-provider-migration-smoke.mdStorage/provider migration smoke pattern
references/local-setup.mdLocal dev server setup
references/cloud-deploy.mdCloud deploy details
references/cloud-advanced.mdBYOK, storage testing
references/common-errors.mdTroubleshooting
references/gcp-debugging.mdInfrastructure debugging
references/architecture.mdSmoke-test architecture notes
references/environment-variables.mdEnvironment variable setup
scripts/test-server.shServer API test script
scripts/discover-release-scope.shRelease PR scope discovery
scripts/check-versioning-pr.shAlpha versioning PR spot-check helper

Platform Dashboards

  • Production: https://projects.mastra.ai
  • Staging: https://projects.staging.mastra.ai

For Gateway API testing (memory, threads, BYOK via gateway), use platform-smoke-test.

Result Reporting

After testing, provide:

## Smoke Test Results

**Environment**: local/staging/production
**Project**: <name>

| Test   | Status | Notes |
| ------ | ------ | ----- |
| Setup  | ✅/❌  |       |
| Agents | ✅/❌  |       |
| Tools  | ✅/❌  |       |
| ...    |        |       |

**Issues Found**: (list any)
**Warnings**: (list any deploy/runtime warnings)
**Skipped Tests**: (list with reason - e.g., "Server Deploy - not applicable in local environment")

FAQ

What does the mastra-smoke-test skill do?

Smoke test Mastra projects locally or deploy to staging/production. Tests Studio UI, agents, tools, workflows, traces, memory, and more. Supports both local development and cloud deployments.

How do I install mastra-smoke-test?

Run npx skills add https://github.com/mastra-ai/mastra --skill mastra-smoke-test in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/mastra-smoke-test/ (personal) or .claude/skills/mastra-smoke-test/ (project).

Which AI agents can use mastra-smoke-test?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is mastra-smoke-test safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains mastra-smoke-test?

It is published by mastra-ai in mastra-ai/mastra, and it is an official skill from the maker of the technology it covers. It has 61 recorded installs.

More from mastra-ai/mastra

View all →

react-best-practices

mastra-ai/mastra

React performance optimization guidelines from Mastra Engineering. This skill should be used when writing, reviewing, or refactoring React code to ensure optimal performance patterns. Triggers on tasks involving React components, data fetching, bundle optimization, or performance improvements.

OfficialCode Quality & Workflow2.8K installs

ralph-plan

mastra-ai/mastra

Interactive planning assistant that helps create focused, well-structured ralph-loop commands through collaborative conversation

OfficialCode Quality & Workflow2.6K installs

smoke-test

mastra-ai/mastra

Create a Mastra project using create-mastra and smoke test the studio in Chrome using Chrome MCP server

OfficialTesting & QA2.5K installs

e2e-tests-studio

mastra-ai/mastra

REQUIRED when modifying any file in packages/playground-ui or packages/playground. Triggers on: React component creation/modification/refactoring, UI changes, new playground features, bug fixes affecting studio UI. Generates Playwright E2E tests that validate PRODUCT BEHAVIOR, not just UI states.

OfficialTesting & QA2.5K installs

tailwind-best-practices

mastra-ai/mastra

Tailwind CSS styling guidelines for Mastra Playground UI. This skill should be used when writing, reviewing, or refactoring styling code in packages/playground-ui and packages/playground to ensure design system consistency. Triggers on tasks involving Tailwind classes, component styling, or design tokens.

OfficialFrontend & Design2K installs

mastra-docs

mastra-ai/mastra

Documentation guidelines for Mastra. Use this skill when creating, editing, moving, deleting, or reviewing Mastra documentation, sidebars, redirects, or docs components.

OfficialDocs & Writing158 installs

Popular testing & qa skills

View category →

tdd

mattpocock/skills

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

Testing & QA1.2M installs

grilling

mattpocock/skills

Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

Testing & QA996.2K installs

migrate-to-shoehorn

mattpocock/skills

Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.

Testing & QA484.1K installs

run-train

lllllllama/rigorpilot-skills

Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.

Testing & QA337.8K installs

test-driven-development

obra/superpowers

Use when implementing any feature or bugfix, before writing implementation code

Testing & QA261.8K installs

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

Testing & QA216.8K installs