Skip to main content
Connect a GitHub repo so the agent can read your components, styles, and patterns, and build designs that look like your real product. Magic Patterns only reads your repo. It never changes your code. Connecting a repo doesn’t import a design system. To import one, see Choose how to import.

Connect a repo

1

Open the GitHub option.

When you open a new project, choose Connect a GitHub repo.The start screen with the Connect a GitHub repo option
2

Connect your GitHub account.

The first time you do this, click Connect GitHub. You only need to do this once.The Connect your GitHub account window
3

Authorize Magic Patterns.

A GitHub window opens. Click Authorize.The GitHub window asking to authorize Magic Patterns
4

Find your repo.

Search for it by name, or paste its URL, like https://github.com/your-org/your-repo. By default (after authorizing), your repo should appear.A selected repository with branch and subfolder options
5

Choose a branch.

The main branch is selected by default. To use a different one, pick it from the Branch menu.
6

Choose folders (optional).

Select only the folders or files the agent needs, like your components folder or style guide. For large repos, this keeps the agent focused.The Add a GitHub repository window with a search bar
7

Click Link.

The agent can now read your code while it builds. Next time, you’ll skip steps 2 and 3 because your GitHub account stays connected.