home / skills / medusajs / medusa-agent-skills / new-user
This skill creates an admin user in Medusa using provided email and password, reports results, and guides next steps.
npx playbooks add skill medusajs/medusa-agent-skills --skill new-userReview the files below or copy the command above to add this skill to your agents.
---
name: new-user
description: Create an admin user in Medusa
argument-hint: <email> <password>
allowed-tools: Bash(npx medusa user:*)
---
# Create Admin User
Create a new admin user in Medusa with the specified email and password.
The user will provide two arguments:
- First argument: email address
- Second argument: password
For example: `/medusa-dev:user [email protected] supersecret`
Use the Bash tool to execute the command `npx medusa user -e <email> -p <password>`, replacing `<email>` with the first argument and `<password>` with the second argument.
Report the results to the user, including:
- Confirmation that the admin user was created successfully
- The email address of the created user
- Any errors that occurred
- Next steps (e.g., logging in to the admin dashboard)
This skill creates a new admin user in a Medusa project using the Medusa CLI. It accepts an email and password, runs the required Bash command, and returns a concise result summary with next steps. It is designed for use in development and local deployment workflows.
The skill runs the Bash command `npx medusa user -e <email> -p <password>` with the provided arguments to create an admin user. It captures the CLI output and any errors, then reports whether the creation succeeded, the created email, and relevant follow-up actions. If an error occurs, the skill surfaces the error text and suggests corrective steps.
What if the command fails?
Inspect the captured error message. Common issues include database connection problems, missing Medusa installation, or running outside the project root. Fix the underlying issue and retry the command.
Will this change production data?
If run against a production database, yes. Only run this against production when you intend to modify production users. Prefer environment-specific credentials and automation safeguards.