smoke-test

mastra-ai/mastra · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/mastra-ai/mastra --skill smoke-test
0 commentsdiscussion
summary

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

skill.md

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> -c agents,tools,workflows,scorers -l <llmProvider> -e

# For yarn
yarn create mastra@<tag> <project-name> -c agents,tools,workflows,scorers -l <llmProvider> -e

# For pnpm
pnpm create mastra@<tag> <project-name> -c agents,tools,workflows,scorers -l <llmProvider> -e

# For bun
bunx create-mastra@<tag> <project-name> -c agents,tools,workflows,scorers -l <llmProvider> -e

Flags explained:

  • -c agents,tools,workflows,scorers - Include all components
  • -l <provider> - Set the LLM provider
  • -e - Include example code

Being explicit with all parameters ensures the CLI runs non-interactively.

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
  1. 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,
  }),
});
  1. 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 MISTRAL_API_KEY

Check in this order:

  1. Check global environment first: Run echo $<ENV_VAR_NAME> to see if the key is already set globally

    • If set globally, the project will inherit it - no .env file needed
    • Skip to Step 4
  2. Check project .env file: If not set globally, check if .env exists in the project and contains the key

  3. Ask user only if needed: If the key is not available globally or in .env:

    • Ask the user for the API key
    • Create the .env file with the provided key

Only check for the ONE key matching the selected provider - don't check for all providers.

Step 4: Start the Development Server

Navigate to the project directory and start the dev server:

cd <directory>/<project-name>
<packageManager> run dev

The server typically starts on http://localhost:4111. Wait for the server to be ready before proceeding.

Step 5: Smoke Test the Studio

Use the Chrome browser automation tools to test the Mastra Studio.

5.1 Initial Setup

  1. Get browser context using tabs_context_mcp
  2. Create a new tab using tabs_create_mcp
  3. Navigate to http://localhost:4111

5.2 Test Checklist

Perform the following smoke tests using the Chrome automation tools:

Navigation & Basic Loading

  • Studio loads successfully (page contains "Mastra Studio" or shows agents list)
  • Take a screenshot of the home page

Agents Page (/agents)

  • Navigate to agents page
  • Verify at least one agent is listed (the example agent from --default)
  • Take a screenshot

Agent Detail (/agents/<agentId>/chat)

  • Click on an agent to view details
  • Verify the agent overview panel loads
  • Verify model settings panel is visible
  • Take a screenshot

Agent Chat

  • Send a test message to the agent (e.g., "What's the weather in Tokyo?")
  • Wait for response
  • Verify response appears in the chat
  • Take a screenshot of the conversation

Browser Agent (/agents/browser-agent/chat) - if browser agent was added

  • Navigate to the browser-agent
  • Send a message: "Go to example.com and tell me what you see"
  • Verify the agent launches a browser and extracts content
  • Verify response includes page content
  • Take a screenshot

Tools Page (/tools)

  • Navigate to tools page
  • Verify tools list loads (should show get-weather tool)
  • Take a screenshot

Tool Execution (/tools/get-weather)

  • Click on the get-weather tool to open detail page
  • Find the city input field and enter a test city (e.g., "Tokyo")
  • Click Submit button
  • Wait for execution to complete
  • Verify JSON output appears with weather data (temp, condition, etc.)
  • Take a screenshot

Workflows Page (/workflows)

  • Navigate to workflows page
  • Verify workflows list loads (should show weather-workflow)
  • Take a screenshot

Workflow Execution (/workflows/weather-workflow)

  • Click on the weather-workflow to open detail page
  • Verify visual graph displays (shows workflow steps)
  • Find the city input field and enter a test city (e.g., "London")
  • Click Run button
  • Wait for execution to complete
  • Verify steps show success (green checkmarks)
  • Click to view JSON output modal
  • Verify execution details with timing appear
  • Take a screenshot

Settings Page (/settings)

  • Navigate to settings page
  • Verify settings page loads
  • Take a screenshot

Observability Page (/observability)

  • Navigate to observability page
  • Verify traces list shows recent activity (from previous tests)
  • Click on a trace to view details
  • Verify timeline view shows steps and timing
  • Take a screenshot

Scorers Page (/evaluation?tab=scorers)

  • Navigate to /evaluation?tab=scorers (NOT /scorers - that route doesn't exist)
  • Verify scorers list loads (shows 3 example scorers)
  • Take a screenshot

Additional Pages (verify load only)

  • Templates page (/templates) - Gallery of starter templates
  • Request Context page (/request-context) - JSON editor
  • Processors page (/processors) - Empty state OK
  • MCP Servers page (/mcps) - Empty state OK

5.3 Report Results

After completing all tests, provide a summary:

  • Total tests passed/failed
  • Any errors encountered
  • Screenshots captured
  • Recommendations for issues found

Quick Reference

how to use smoke-test

How to use smoke-test on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add smoke-test
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

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

The skills CLI fetches smoke-test from GitHub repository mastra-ai/mastra and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/smoke-test

Reload or restart Cursor to activate smoke-test. Access the skill through slash commands (e.g., /smoke-test) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.568 reviews
  • Fatima Haddad· Dec 28, 2024

    smoke-test fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Evelyn Bhatia· Dec 24, 2024

    We added smoke-test from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Aanya Jackson· Dec 16, 2024

    smoke-test is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Ama Harris· Dec 8, 2024

    Useful defaults in smoke-test — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Kwame Martinez· Nov 27, 2024

    smoke-test has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • James Sethi· Nov 19, 2024

    smoke-test is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Fatima Bansal· Nov 15, 2024

    Keeps context tight: smoke-test is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Naina Abbas· Nov 7, 2024

    smoke-test fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Aanya Park· Oct 26, 2024

    We added smoke-test from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Evelyn Chawla· Oct 18, 2024

    Solid pick for teams standardizing on skills: smoke-test is focused, and the summary matches what you get after install.

showing 1-10 of 68

1 / 7
Step Action
Create Project cd <directory> && npx create-mastra@<tag> <name> -c agents,tools,workflows,scorers -l <provider> -e
Install Deps Automatic during creation