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
27k30 skills14 commands
Install
$ npx -y skills add mastra-ai/mastra --skill smoke-test --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/smoke-test

Context preview

The summary Claude sees to decide when to auto-load this skill.

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

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
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.

Get the whole plugin

Other skills on mastra.