GitHub with AI: Copilot, the coding agent, Claude Code and Codex
Use GitHub Copilot in your editor and on github.com, assign issues to the Copilot coding agent, ask @copilot to fix a pull request, review AI pull requests safely, and connect Claude Code or Codex to your repositories.
Key ideas
How it works
1. Copilot in four places
| Where | What you do |
|---|---|
| Editor (VS Code, JetBrains, Visual Studio) | Accept suggestions with Tab; use chat to explain, refactor or write tests; agent mode edits several files |
| github.com | Chat about a repository, file or pull request; ask "what does this PR change?" |
| Pull requests | Request a Copilot review; mention @copilot to make changes |
| Terminal | Copilot CLI for commands and code tasks, including a security review command |
Plans and limits change; check github.com/features/copilot for what your plan includes (premium requests are counted for heavier features).
2. Hand an issue to the coding agent
- Write the issue like a ticket for a new teammate: goal, files involved, acceptance criteria, how to test.
- Assign the issue to Copilot (or start a task from the agents panel). It works in its own environment powered by GitHub Actions and opens a draft pull request.
- By default its workflow runs wait for a person to approve them; repository admins can choose to skip that approval.
- Review the PR like any other: read the diff, run it, check tests. Comment
@copilot please add a test for the empty-cart caseto ask for changes. - Merge only when checks pass and a human approves.
3. Claude Code and Codex with GitHub
- Claude Code: works in your local clone or in cloud sessions (claude.ai/code) on repositories you connect; it commits on a branch and can open pull requests. The Claude GitHub app lets you mention
@claudein issues and PRs where your organisation has set it up. - Codex: connect GitHub in Codex (desktop app, web, IDE or CLI); it works on a copy of the repository and proposes a pull request.
- Both read repository instructions:
CLAUDE.mdfor Claude Code andAGENTS.mdfor Codex and many other agents. Import AGENTS.md from CLAUDE.md to keep one source. - The Claude GitHub connector also lets Claude chat read your repositories and issues (Claude guide, Lesson 6).
4. Rules that keep AI pull requests safe
| Rule | Why |
|---|---|
| Required status checks (tests, lint, CodeQL) | Agents cannot merge broken or insecure code |
| At least one human approval; CODEOWNERS for sensitive folders | A person who knows the code decides |
| Least-privilege tokens and workflow permissions | Agents get only the access the task needs |
| Secret scanning with push protection | Stops keys being committed by anyone, human or AI |
| Small issues with clear acceptance criteria | Smaller, reviewable pull requests |
5. Show your work: a portfolio that gets interviews
- Pin 3 to 5 repositories with clear READMEs: problem, approach, results, how to run.
- Use issues and pull requests on your own projects; recruiters can see a real workflow.
- Add a GitHub Actions badge and a live demo link (GitHub Pages).
- Say which parts used AI and how you checked them; this is increasingly asked in interviews.
More on portfolios: SkillNavora lesson Portfolio, GitHub and resume for data roles.
Common mistakes and fixes
| Mistake | Fix |
|---|---|
| Merging an agent PR because the description sounds right | Read the diff and run the tests yourself. |
| Vague issues assigned to an agent | Write acceptance criteria and test steps. |
| Giving an agent admin tokens | Use least-privilege access and required reviews. |
Practice
- Write an issue with acceptance criteria and assign it to an AI agent (Copilot, Claude Code or Codex); review its PR.
- Add AGENTS.md to a repository and import it from CLAUDE.md.
- Set a ruleset on main that requires passing checks and one approval.
Quick check
What does the Copilot coding agent produce?
A pull request (often a draft) for a human to review.
How do you ask Copilot to change an open pull request?
Mention @copilot in a PR comment with the change you want.
Which file do Codex and many agents read for repository rules?
AGENTS.md (Claude Code reads CLAUDE.md, which can import AGENTS.md).
Name two repository settings that keep AI PRs safe.
Required status checks and required human approval (also CODEOWNERS, secret scanning, least-privilege tokens).