Magicpath

From openai/plugins · View interactive version

Magicpath is an AI agent skill from the GitHub repository openai/plugins. Use when the user mentions MagicPath, designs, UI components, themes, canvas selections, or repo-to-canvas UI work; run magicpath-ai to search, inspect, install, or author components.

How to use this skill

Skill file

MagicPath

MagicPath is a canvas and component platform. Use this skill when the user mentions MagicPath, designs, UI components, themes/design systems, team projects, selected canvas items, or bringing local/repository UI into a MagicPath canvas.

Always run MagicPath CLI commands as:

npx -y magicpath-ai <command> -o json

Use JSON output for data-returning commands and -y for non-interactive installs.

First Step

Run:

npx -y magicpath-ai info -o json

If the user is not authenticated, run:

npx -y magicpath-ai login
npx -y magicpath-ai whoami -o json

Pick the Workflow

Find and Confirm Components

  1. If the user refers to a selected design/component/image, run selection -o json.
  2. If the user refers to the project they have open, run active-project -o json.
  3. Otherwise search or browse:
npx -y magicpath-ai search "button" -o json
npx -y magicpath-ai list-projects -o json
npx -y magicpath-ai list-components <projectId> -o json

Search/list results include generatedName, project context, owner fields, and often previewImageUrl. Use previews when visual context matters.

Stop and ask for confirmation before installing or editing unless the user gave an exact generatedName, selected canvas item, or component/project id.

Install Into an App

Use this when MagicPath is the source and the user's app is the destination.

  1. Inspect first:
npx -y magicpath-ai inspect <generatedName> -o json
  1. Read the target code before installing. Understand current props, callbacks, validation, layout, data flow, styling system, and accessibility behavior.
  2. For React/TypeScript apps, install:
npx -y magicpath-ai add <generatedName> -y -o json
  1. Import and render the installed component using the returned importStatement and usage.
  2. Adapt the installed source in src/components/magicpath/<name>/:

Do not run add just to read code. Use inspect for read-only source. For non-JS projects, inspect and translate the design into the target framework instead of running add.

Create or Edit Canvas Components

Use this when the MagicPath canvas is the destination.

npx -y magicpath-ai code start --project <projectId> --dir <workdir> --name "Component Name" --width <px> --height <px> -o json
npx -y magicpath-ai code start --component <componentId> --dir <workdir> -o json
npx -y magicpath-ai code submit --dir <workdir> --wait -o json

Rules for code work:

code context is read-only. Do not use it as the submit path.

Teams, People, and Ownership

Personal projects are private to their owner unless shared. Do not search another person's personal work; search team projects instead.

Project and Share Links

Use share when you need a URL without opening a browser:

npx -y magicpath-ai share <generatedName> -o json
npx -y magicpath-ai share <projectId> -o json

Use view only when intentionally opening the OS browser:

npx -y magicpath-ai view <generatedName>
npx -y magicpath-ai view <projectId>

Never run view commands in parallel.

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.