Create a Mastra project using create-mastra and smoke test the studio in Chrome using Chrome MCP server
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.
/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>]
| 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 |
# 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
CRITICAL: Before proceeding, parse the ARGUMENTS and validate:
--directory or -d: REQUIRED - fail if missing--name or -n: REQUIRED - fail if missing--tag or -t: REQUIRED - fail if missing--pm or -p: Default to npm if not provided--llm or -l: Default to openai if not providedpm must be one of: npm, yarn, pnpm, bunllm must be one of: openai, anthropic, groq, google, cerebras, mistraldirectory 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.
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.
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 codeBeing 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.
After creation, verify the project has:
package.json with mastra dependenciessrc/mastra/index.ts exporting a Mastra instance.env file (may need to be created)To test browser functionality, add a browser-enabled agent:
<pm> add @mastra/stagehand
# or for deterministic browser automation:
<pm> add @mastra/agent-browser
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,
}),
});
import { browserAgent } from './agents/browser-agent';
// In Mastra config: