Confirm successful installation by checking the skill directory location:
.cursor/skills/smoke-test
Restart Cursor to activate smoke-test. Access via /smoke-test in your agent's command palette.
โ
Security 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 environment. Always review source, verify the publisher, and test in isolation before production.
# 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 --pmpnpm--llm anthropic
# Using short flags/smoke-test -d ./projects -n smoke-test-app -t0.10.6 -p bun -l openai
Step 0: Parameter Validation (MUST RUN FIRST)
CRITICAL: Before proceeding, parse the ARGUMENTS and validate:
Parse arguments from the ARGUMENTS string provided above
Check required parameters:
--directory or -d: REQUIRED - fail if missing
--name or -n: REQUIRED - fail if missing
--tag or -t: REQUIRED - fail if missing
Apply defaults for optional parameters:
--pm or -p: Default to npm if not provided
--llm or -l: Default to openai if not provided
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 npmnpx create-mastra@<tag><project-name>-c agents,tools,workflows,scorers -l<llmProvider>-e# For yarnyarn create mastra@<tag><project-name>-c agents,tools,workflows,scorers -l<llmProvider>-e# For pnpmpnpm create mastra@<tag><project-name>-c agents,tools,workflows,scorers -l<llmProvider>-e# For bunbunx 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:
Install browser packages:
<pm>add @mastra/stagehand
# or for deterministic browser automation:<pm>add @mastra/agent-browser
Create browser-agent.ts in src/mastra/agents/:
import{ Agent }from'@mastra/core/agent';import{ Memory }from'@mastra/memory';import{ StagehandBrowser }from'@mastra/stagehand';exportconst browserAgent =newAgent({ 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:newMemory(), browser:newStagehandBrowser({ headless:false,}),});
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:
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
Check project .env file: If not set globally, check if .env exists in the project and contains the key
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
Get browser context using tabs_context_mcp
Create a new tab using tabs_create_mcp
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)
โบ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
Steps
1Install skill using provided installation command
2Test with simple use case relevant to your work
3Evaluate output quality and relevance
4Iterate on prompts to improve results
5Integrate 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
1Familiarize yourself with skill capabilities and limitations
2Start with low-risk, non-critical tasks
3Progress to more complex and valuable use cases
4Build expertise through regular use and experimentation