Skip to content
Back to Refinery
Cloud SetupCLOUD

Claude Code Cloud.

Get your repo cloud-ready in one prompt. Copy, push, go.

Claude Code Cloud
What this fixes
  • Repo not ready for cloud agents
  • Uncommitted files invisible to cloud sessions
  • Wrong GitHub account or broken remote
  • Secrets accidentally committed
  • Public repos created by accident

Cloud setup prompt

Copy this prompt and paste it into Claude Code. It inspects your repo, fixes what it can, and tells you whether the project is cloud-ready.

Cloud setup prompt

Paste into any Claude Code session — CLI or Desktop

You are preparing this repository for Claude Code Cloud. Follow every step in order. Do not skip any step. Do not force-push, rewrite history, or silently delete branches.

STEP 1 — GIT STATUS
Check whether this directory is a git repository. If not, run git init and create an initial commit. If it is already initialised, do not reinitialise it. Report the current branch name.

STEP 2 — WORKING TREE
Run git status. Report any untracked files, staged changes, and unstaged modifications. Do not commit anything yet.

STEP 3 — REMOTE
Run git remote -v. Report whether an origin remote exists and what URL it points to. If no remote exists, note that — we will fix it in Step 8. If a remote exists, confirm the URL looks correct (no embedded tokens or credentials in the URL — if you find user:token@ in the remote URL, fix it with git remote set-url origin to the clean HTTPS URL).

STEP 4 — GITHUB CLI
Check whether the GitHub CLI is installed: run gh --version. If it is not installed, stop and tell the user to install it (brew install gh on Mac, winget install GitHub.cli on Windows) and run this prompt again.

Check authentication: run gh auth status. Report which GitHub account is active. Then run gh api user --jq .login and report the username. If not authenticated, stop and tell the user to run gh auth login in their own terminal, then paste this prompt again.

STEP 5 — GITIGNORE AUDIT
Read .gitignore if it exists. Check whether these entries are present (add any that are missing):
.env
.env.local
.env*.local
node_modules/
.next/
dist/
build/
.DS_Store
*.pem
*.key
credentials.json
.claude/settings.local.json

If .gitignore did not exist, create it with all the entries above.

STEP 6 — SECRET SCAN
Search the working directory for files that might contain secrets. Check for the existence of: .env, .env.local, .env.production, .env.development, any file matching *.pem, *.key, *credentials*, *secret*. Report the file names and paths of anything found. Do NOT print or display the contents of these files. Do NOT cat, read, or log any values inside them. Just confirm they exist and that .gitignore covers them. If any secret-like file is NOT covered by .gitignore, add it before proceeding.

STEP 7 — REVIEW STAGED FILES
Run git add --dry-run . to see what would be staged. Review the list. If any file looks like it could contain secrets (environment files, key files, credential files), warn the user and do NOT stage it. If everything looks safe, stage the files with git add . (excluding anything flagged).

STEP 8 — GITHUB REPOSITORY
If no origin remote exists: ask the user what they want to name the repository. Then create it as PRIVATE using gh repo create <name> --private --source=. --remote=origin. Never create a public repository unless the user explicitly says so.

If origin already exists: verify the remote repository exists by running gh repo view --json name,visibility. Report the repository name and visibility. If it is public and the user did not intend that, warn them.

STEP 9 — COMMIT AND PUSH
If there are staged changes, commit with a descriptive message: "Prepare repository for Claude Code Cloud". Push to origin using the current branch: git push -u origin <branch>. Do not force-push.

If there are no changes to commit, just push any unpushed commits: git push.

STEP 10 — VERIFY
Run these checks and report each result:
1. git remote -v — confirm origin URL is clean (no token in URL)
2. git status — confirm working tree is clean
3. git log --oneline -1 — confirm latest commit
4. gh repo view --json name,visibility — confirm repo exists and visibility

OUTPUT YOUR VERDICT:

If all checks pass:
CLOUD READY: YES
"Open Claude Code Cloud at code.claude.ai and select this repository. Any uncommitted or unpushed files will NOT exist in the cloud session — only what is on the remote branch is visible to Cloud."

If any check fails:
CLOUD READY: NO
List every issue that must be fixed, with the exact command to fix each one.

How it works

01

COPY

Copy the prompt above

02

PUSH

Paste it into Claude Code — it prepares your repo

03

GO CLOUD

Open code.claude.ai and select your repo

Related

Using Cloud with a team?

Set up ORCHIE Cloud to coordinate your cloud agents.

Cloud pricing

Claude Code Pro ($100/month) and Max ($250/month) include Cloud. Credit claim period has ended. Credits expire 4 November 2026, 11:59 PM PT.

View plans
Next up

Want more resources?

Follow me on Instagram. New reels every week with a keyword in the caption.

Browse all resources