Claude Code/open-repo
Open a session in a repo
Opens Claude Code in the reader's own clone of a GitHub repo, with a prompt pre-filled.
Format
claude-cli://open?repo={repo}&q={prompt}Try it
claude-cli://open?repo=acme/payments&q=Investigate%20the%20failed%20deploy.%0ACheck%20recent%20commits%20to%20main.OpenWhat you supply
{repo}A GitHub
owner/nameslug.Claude Code resolves this to a clone on the reader's own machine, so you do not need to know where they keep it.
{prompt}optionalText to pre-fill in the prompt box. Sent only when the reader presses Enter.
URL-encode it. Use
%0Afor line breaks. Maximum 5,000 characters.
This is the one to use for a link other people will click, because it does not assume anything about where they keep their code.
The resolution is a lookup, not a clone: each time someone runs claude in a git repo, that
path gets recorded against the repo's slug. A repo link opens whichever matching path they
used most recently, tracking multiple clones and worktrees separately. If they have never run
Claude Code in that repo, the session opens in their home directory instead — no error, no
prompt to clone. The welcome header shows which path it picked.
The link does not change which branch is checked out. It opens the directory in whatever state it is already in.