Skip to content
Development
Skill

/smoke-test

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

From plugin
mastra
30k33 skills14 commands

Claude Code

$ npx -y skills add mastra-ai/mastra --skill smoke-test --agent claude-code

SKILL.md

smoke-test.SKILL.md
name: smoke-test
description: Create a Mastra project using create-mastra and smoke test the studio in Chrome using Chrome MCP server
model: claude-opus-4-5

Smoke Test Skill

Creates a new Mastra project using `create-mastra@<tag>` and performs smoke testing of the Mastra Studio in Chrome.

**This skill is for Claude Code with Chrome MCP server.** For MastraCode with built-in browser tools, use `mastracode-smoke-test` instead.

Usage

/smoke-test --directory <path> --name <project-name> --tag <version> [--pm <package-manager>] [--llm <provider>]
/smoke-test -d <path> -n <project-name> -t <version> [-p <package-manager>] [-l <provider>]

Parameters

| Parameter | Short | Description | Required | Default | | ------------- | ----- | ---------------------------------------------------------------------------- | -------- | -------- | | `--directory` | `-d` | Parent directory where project will be created | **Yes** | - | | `--name` | `-n` | Project name (will be created as subdirectory) | **Yes** | - | | `--tag` | `-t` | Version tag for create-mastra (e.g., `latest`, `alpha`, `0.10.6`) | **Yes** | - | | `--pm` | `-p` | Package manager: `npm`, `yarn`, `pnpm`, or `bun` | No | `npm` | | `--llm` | `-l` | LLM provider: `openai`, `anthropic`, `groq`, `google`, `cerebras`, `mistral` | No | `openai` |

Examples

# Minimal (required params only)
/smoke-test -d ~/projects -n my-test-app -t latest

# Full specification
/smoke-test --directory ~/projects --name my-test-app --tag alpha --pm pnpm --llm anthropic

# Using short flags
/smoke-test -d ./projects -n smoke-test-app -t 0.10.6 -p bun -l openai

Step 0: Parameter Validation (MUST RUN FIRST)

**CRITICAL**: Before proceeding, parse the ARGUMENTS and validate:

1. **Parse arguments** from the ARGUMENTS string provided above 2. **Check required parameters**:

  • `--directory` or `-d`: REQUIRED - fail if missing
  • `--name` or `-n`: REQUIRED - fail if missing
  • `--tag` or `-t`: REQUIRED - fail if missing

3. **Apply defaults** for optional parameters:

  • `--pm` or `-p`: Default to `npm` if not provided
  • `--llm` or `-l`: Default to `openai` if not provided

4. **Validate values**:

  • `pm` must be one of: `npm`, `yarn`, `pnpm`, `bun`
  • `llm` must be one of: `openai`, `anthropic`, `groq`, `google`, `cerebras`, `mistral`
  • `directory` must exist (or will be created)
  • `name` should be a valid directory name (no spaces, special chars)

**If validation fails**: Stop and show usage help with the missing/invalid parameters.

**If `-h` or `--help` is passed**: Show this usage information and stop.

Prerequisites

This skill requires the **Chrome MCP server** (Claude-in-Chrome) for browser automation. Ensure it's configured and running.

The Chrome MCP server provides tools like `tabs_create_mcp`, `tabs_context_mcp`, `navigate_mcp`, `click_mcp`, `type_mcp`, and `screenshot_mcp`.

Execution Steps

Step 1: Create the Mastra Project

Run the create-mastra command with explicit parameters to avoid interactive prompts:

# For npm
npx create-mastra@<tag> <project-name> --no-git --llm <llmProvider> --timeout 120000

# For yarn
yarn dlx create-mastra@<tag> <project-name> --no-git --llm <llmProvider> --timeout 120000

# For pnpm
pnpm create mastra@<tag> <project-name> --no-git --llm <llmProvider> --timeout 120000

# For bun
bunx create-mastra@<tag> <project-name> --no-git --llm <llmProvider> --timeout 120000

`-c/--components` and `-e/--example` were removed and must not be used. `-l/--llm` is still supported and is the flag used above. Use the managed template by default, `--empty` for a deliberately empty project, or `--template <template>` for a specific template. If a flag is rejected, inspect the initializer's help rather than retrying a legacy command: `npm create mastra@<tag> -- --help`, `npx create-mastra@<tag> --help`, `pnpm create mastra@<tag> --help`, `yarn dlx create-mastra@<tag> --help`, or `bunx create-mastra@<tag> --help`.

Wait for the installation to complete. This may take 1-2 minutes depending on network speed.

Step 2: Verify Project Structure

After creation, verify the project has:

  • `package.json` with mastra dependencies
  • `src/mastra/index.ts` exporting a Mastra instance
  • `.env` file (may need to be created)

Step 2.5: Add Browser Agent for Browser Testing

To test browser functionality, add a browser-enabled agent:

1. **Install browser packages**:

<pm> add @mastra/stagehand
# or for deterministic browser automation:
<pm> add @mastra/agent-browser

2. **Create browser-agent.ts** in `src/mastra/agents/`:

import { Agent } from '@mastra/core/agent';
import { Memory } from '@mastra/memory';
import { StagehandBrowser } from '@mastra/stagehand';

export const browserAgent = new Agent({
  id: 'browser-agent',
  name: 'Browser Agent',
  instructions: `You are a helpful assistant that can browse the web to find information.`,
  model: '<provider>/<model>', // e.g., 'openai/gpt-4o'
  memory: new Memory(),
  browser: new StagehandBrowser({
    headless: false,
  }),
});

3. **Update index.ts** to register the browser agent:

import { browserAgent } from './agents/browser-agent';

// In Mastra config:
agents: { weatherAgent, browserAgent },

Step 3: Configure Environment Variables

Based on the selected LLM provider, check for the required API key:

| Provider | Required Environment Variable | | --------- | ------------------------------ | | openai | `OPENAI_API_KEY` | | anthropic | `ANTHROPIC_API_KEY` | | groq | `GROQ_API_KEY` | | google | `GOOGLE_GENERATIVE_AI_API_KEY` | | cerebras | `CEREBRAS_API_KEY` | | mistral |

Read more
@mastra-ai
Ships withmastra

Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack. It includes everything you need to go from early prototypes to production-ready applications.

Stars on GitHub

Momentum

stars in total
29.5k
Star history of mastra-ai/mastra on GitHub, a chart by star-history.com

Other skills on mastra.

builder-smoke-test

builder-smoke-test

Smoke test the Agent Builder feature branch end-to-end against a hermetic project scaffolded by the skill (linked to the current…

@mastra-ai@mastra-aiInstall Skill
debugging-difficult-bugs

debugging-difficult-bu…

Use early when debugging a medium or hard bug, especially when tests alone may not reveal the real runtime failure. Trigger this…

@mastra-ai@mastra-aiInstall Skill
docs-audit

docs-audit

Autonomous, report-only documentation review for Mastra docs. Use when auditing changed docs against source, validating…

@mastra-ai@mastra-aiInstall Skill
docs-diagrams

docs-diagrams

Convert existing docs diagram images to Mermaid, and author new Mermaid diagrams for Mastra docs. Use when replacing an…

@mastra-ai@mastra-aiInstall Skill
e2e-tests-studio

e2e-tests-studio

REQUIRED when modifying any file in packages/playground-ui or packages/playground. Triggers on: React component…

@mastra-ai@mastra-aiInstall Skill
label-core-bugs

label-core-bugs

Review open mastra-ai/mastra GitHub issues, identify direct @mastra/core bugs, and apply the @mastra/core label. Use when…

@mastra-ai@mastra-aiInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about smoke-test.

Which coding agents can use smoke-test?
smoke-test installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.