Repository Creation and Cloning Guide
The end-to-end proof. You’ve finished the three prerequisites — a GitHub account, Git, and the GitHub CLI. This guide uses all three together: you create a repository on GitHub and make a copy of it on your computer. If it works, everything is set up correctly — and you have the folder you’ll build in.
What This Guide Covers
Section titled “What This Guide Covers”A repository is a project folder that Git tracks. You create it on GitHub (in your browser), then clone it — make a linked copy on your own machine — so you can work on the files locally and Git keeps the two in sync.
Prerequisites
Section titled “Prerequisites”To create a repository (Step 1):
- A GitHub account
That’s all — creating a repository happens entirely in your browser. (If you only need this repository for an AI agent to use through a personal access token, Step 1 is all you need.)
To clone it to your computer (Steps 2 and 3):
- Git installed (see Git Installation Guide)
- GitHub CLI installed and logged in (see GitHub CLI Setup Guide)
- Cursor or VS Code (see Editor Setup Guide) — or the Claude Desktop app
Step 1: Create a Repository
Section titled “Step 1: Create a Repository”- From GitHub, click the + button (top-right corner) → New repository
- Enter a repository name (e.g.,
my-ai-projects) - Add an optional description
- Select Private (recommended for personal work)
- Check Add a README file
- Click Create repository
You’ll land on your new repository’s page with a README file. Copy the address from your browser’s address bar (e.g., https://github.com/your-username/my-ai-projects) — you’ll paste it in the next step.
Step 2: Clone the Repository
Section titled “Step 2: Clone the Repository”Cloning downloads a copy of the repository to your computer and links it to GitHub. Use whichever tool you’re working in.
In Cursor or VS Code
Section titled “In Cursor or VS Code”- Open the Command Palette: press
Cmd + Shift + P(Mac) orCtrl + Shift + P(Windows) - Type Git: Clone and press Enter
- Paste the repository address you copied in Step 1 (e.g.,
https://github.com/your-username/my-ai-projects) and press Enter - Choose a folder on your computer to put it in — Documents is fine
- When the editor asks whether to open the cloned repository, click Open
In Claude Desktop (Code tab)
Section titled “In Claude Desktop (Code tab)”If you’re working in the Claude Desktop app without a separate code editor, you can clone the repository by asking Claude to do it for you. Because you installed and logged in to the GitHub CLI in the GitHub CLI Setup Guide, Claude can use gh on your behalf.
-
Open Claude Desktop and click the Code tab
-
Start a new session and pick (or create) a folder on your computer you want the repository cloned into
-
In the chat box, paste a prompt like:
Clone
https://github.com/your-username/my-ai-projectsinto this folder. -
Approve the command when Claude asks for permission to run
gh repo clone(orgit clone) -
When it finishes, open Finder (macOS) or File Explorer (Windows) and navigate to the folder you chose — you should see the cloned repository there
Step 3: Verify the Clone Worked
Section titled “Step 3: Verify the Clone Worked”After cloning, confirm the repository is on your computer:
- Check the sidebar in your editor — you should see the repository’s files (at least
README.md) - Open the terminal inside your editor (View → Terminal, or press Ctrl + `) and run:
git statusYou should see a message starting On branch main — this confirms the repository was cloned correctly and Git is tracking it.
Done When
Section titled “Done When”- You can see the cloned repository’s files in your editor (or in the Claude Desktop Code tab)
- In your terminal, you can navigate to the cloned folder (
cd my-repo-name) and rungit status— it showsOn branch main
If both are true, your GitHub account, Git, and the GitHub CLI are all working together. Next: set up your AI Registry in this repository.
Troubleshooting
Section titled “Troubleshooting”Can’t create the repository?
- Make sure you’re signed in to GitHub
- Repository names must be unique within your account — try a different name if you get a conflict
Can’t clone the repository?
- Verify you have access to the repository
- Check that the URL is correct
- Make sure you’re signed into GitHub in your editor
Asked to sign in?
- Your editor may ask you to sign in to GitHub the first time — follow the prompts in your browser
- Still stuck? Run
gh auth statusin a terminal. If it doesn’t say you’re logged in, redo Step 3 of the GitHub CLI guide - If an AI agent or automation (not you) is doing the cloning, it needs a personal access token instead
Ask AI for help
If you’re stuck, paste this into ChatGPT, Claude, or Gemini:
I’m trying to create/clone a GitHub repository in [Cursor / VS Code] on [Mac / Windows] and getting this error: [paste the error message]. I have Git installed, a GitHub account, and the GitHub CLI logged in. What should I try?
Next Steps
Section titled “Next Steps”- Set up your AI Registry in the repository you just cloned
- Read Git Concepts for the vocabulary — commit, push, pull, branch — you’ll meet as you work