SkillNavora
Git & GitHub Complete Guide › Lesson 8 of 8 · about 20 minutes
Lesson 8

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.

Checked against official sources in November 2026. Lessons build on each other.
In plain words. AI coding agents are fast junior developers who never get tired. They can open pull requests on their own, but a human still reviews, tests and decides what gets merged. Your repository's rules (tests, rulesets, AGENTS.md) are how you keep quality high.

Key ideas

GitHub CopilotGitHub's AI assistant: completions and chat in editors, chat on github.com, code review, CLI and a cloud coding agent.
Copilot coding agent (cloud agent)Works on an issue or request in its own environment using GitHub Actions and opens a pull request for review.
@copilot in a PRMention Copilot in a pull request comment to have it make the changes you ask for, including fixing failing checks.
Copilot code reviewAutomatic or requested AI review comments on pull requests.
AGENTS.md / CLAUDE.mdRepository files that tell AI agents how to build, test and follow your conventions.

How it works

1. Copilot in four places

WhereWhat 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.comChat about a repository, file or pull request; ask "what does this PR change?"
Pull requestsRequest a Copilot review; mention @copilot to make changes
TerminalCopilot 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

  1. Write the issue like a ticket for a new teammate: goal, files involved, acceptance criteria, how to test.
  2. 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.
  3. By default its workflow runs wait for a person to approve them; repository admins can choose to skip that approval.
  4. Review the PR like any other: read the diff, run it, check tests. Comment @copilot please add a test for the empty-cart case to ask for changes.
  5. Merge only when checks pass and a human approves.
Good to know. Pull requests from forks are not supported for @copilot changes. Keep agent PRs small by writing small issues.

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 @claude in 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.md for Claude Code and AGENTS.md for 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

RuleWhy
Required status checks (tests, lint, CodeQL)Agents cannot merge broken or insecure code
At least one human approval; CODEOWNERS for sensitive foldersA person who knows the code decides
Least-privilege tokens and workflow permissionsAgents get only the access the task needs
Secret scanning with push protectionStops keys being committed by anyone, human or AI
Small issues with clear acceptance criteriaSmaller, 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

MistakeFix
Merging an agent PR because the description sounds rightRead the diff and run the tests yourself.
Vague issues assigned to an agentWrite acceptance criteria and test steps.
Giving an agent admin tokensUse least-privilege access and required reviews.

Practice

  1. Write an issue with acceptance criteria and assign it to an AI agent (Copilot, Claude Code or Codex); review its PR.
  2. Add AGENTS.md to a repository and import it from CLAUDE.md.
  3. 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).

Go further (official sources)

Refer & earn