How GitHub prompts work
This page is for engineers and anyone else with questions a repository can answer. Claude works with the GitHub repositories an admin granted for the channel. It reads the code to answer questions, watches pull requests you name, and hands back changes as draft pull requests. Each prompt below is a Slack message. Paste it in the channel or thread where the question lives. Claude clones the repository into an isolated workspace Anthropic hosts, posts progress in that thread, and delivers the result there too. Name the repository in the first message. A session starts with no repositories checked out and clones one when the request names it. Anything Claude opens on GitHub is authored by the Claude GitHub App, so it appears in your review queue like any other pull request.An admin grants a repository to the channels that need it, and questions about the code work only in those channels. By default anyone in those channels can ask, and an admin can restrict who can use Claude.
Check the channel’s connections
Check that the channel has the connection below. Ask@Claude what can you access from this channel? and the reply also lists which repositories the channel can reach. An admin can add a connection the channel is missing.
| Connection | Examples | Why it matters here |
|---|---|---|
| Code | GitHub | Required. Reads granted repositories and opens draft pull requests |
Prompts to paste
Answer a repository question without interrupting the author
A question about how the code behaves lands in the channel, and the person who wrote it is away. Claude clones the repository, reads the code, and posts the answer in the thread.CODEOWNERS file, questions about who owns a path read from it too.
Stop refreshing a pull request
Your work is blocked on a pull request a teammate opened, and the only way to know it moved is to keep checking the page. Claude subscribes to the pull request and posts in the thread when it updates, whether Claude opened it or a person did.Hand off the change you keep postponing
Small, well-understood changes sit on the list for weeks because they never become urgent. Docs drift from the code, a config key keeps its old name, a dependency stays a version behind. Describe one in a message, and it comes back as a draft pull request linked to the thread.Triage a suspected bug where the report lands
A report lands in the feedback channel, and nobody knows yet whether it’s a bug. Claude investigates the repository and either explains the behavior or opens a draft fix.Hand off a change and follow its pull request in one message
You can combine the earlier recipes in a single message. The prompt below hands off a change, sets the definition of done, and asks Claude to subscribe to the pull request it opens.Repository instructions in CLAUDE.md
If your repository has conventions Claude should follow, such as file layout, pull request labels, or dependencies to install, add them to aCLAUDE.md file at the repository root. When Claude clones the repository into a session, its CLAUDE.md, .claude/CLAUDE.md, and .claude/rules/*.md files load on the next turn, so the guidance arrives without further prompting. Anyone with repository write access can edit these files, and they reach every session that works in that repository, from any channel.
Each session runs in an isolated sandbox with a standard set of preinstalled tools. Two threads are two sessions with two separate sandboxes. If the repository needs a tool that the standard set doesn’t include, such as a language runtime or a database client, add the install commands to CLAUDE.md, and Claude runs them when its work needs them.
A
CLAUDE.md is guidance rather than a gate. If a pull request must carry a label or pass a check, make that a repository rule. For where CLAUDE.md sits among channel memory, channel instructions, and skills, see Teach Claude something that sticks.Related resources
Fix bugs
The full arc from a bug report to a draft pull request and green CI
Set up routines
Pull request subscriptions and other standing work