use-cases/github-code-reviews.md +109 −0 added
1# Codex code review for GitHub pull requests | Codex use cases
2
3Codex use cases
4
5
6
7
8
9Codex use case
10
11# Codex code review for GitHub pull requests
12
13Catch regressions and potential issues before human review.
14
15Difficulty **Easy**
16
17Time horizon **5s**
18
19Use Codex code review in GitHub to automatically surface regressions, missing tests, and documentation issues directly on a pull request.
20
21## Best for
22
23 - Teams that want another review signal before human merge approval
24 - Large codebases for projects in production
25
26# Contents
27
28[← All use cases](https://developers.openai.com/codex/use-cases)
29
30Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/github-code-reviews/?export=pdf)
31
32Use Codex code review in GitHub to automatically surface regressions, missing tests, and documentation issues directly on a pull request.
33
34Easy
35
365s
37
38Related links
39
40[Codex code review in GitHub](https://developers.openai.com/codex/integrations/github) [Custom instructions with AGENTS.md](https://developers.openai.com/codex/guides/agents-md)
41
42## Best for
43
44 - Teams that want another review signal before human merge approval
45 - Large codebases for projects in production
46
47## Skills & Plugins
48
49- [Security Best Practices](https://github.com/openai/skills/tree/main/skills/.curated/security-best-practices)
50
51 Focus the review on risky surfaces such as secrets, auth, and dependency changes.
52
53| Skill | Why use it |
54| --- | --- |
55| [Security Best Practices](https://github.com/openai/skills/tree/main/skills/.curated/security-best-practices) | Focus the review on risky surfaces such as secrets, auth, and dependency changes. |
56
57## Starter prompt
58
59@codex review for security regressions, missing tests, and risky behavior changes.
60
61@codex review for security regressions, missing tests, and risky behavior changes.
62
63## How to use
64
65Start by adding Codex code review to your GitHub organization or repository.
66See [Codex code review in GitHub](https://developers.openai.com/codex/integrations/github) for more details.
67
68You can set up Codex to automatically review every pull request, or you can request a review with `@codex review` in a pull request comment.
69
70If Codex flags a regression or potential issue, you can ask it to fix it by commenting on the pull request with a follow-up prompt like `@codex fix it`.
71
72This will start a new cloud task that will fix the issue and update the pull request.
73
74## Define review guidance
75
76To customize what Codex reviews, add or update a top-level `AGENTS.md` with a section like this:
77
78```md
79## Review guidelines
80
81- Flag typos and grammar issues as P0 issues.
82- Flag potential missing documentation as P1 issues.
83- Flag missing tests as P1 issues.
84 ...
85```
86
87Codex applies guidance from the closest `AGENTS.md` to each changed file. You can place more specific instructions deeper in the tree when particular packages need extra scrutiny.
88
89## Related use cases
90
91[
92
93### Deploy an app or website
94
95Use Codex with Build Web Apps and Vercel to turn a repo, screenshot, design, or rough app...
96
97Front-end Integrations](https://developers.openai.com/codex/use-cases/deploy-app-or-website)[
98
99### Bring your app to ChatGPT
100
101Build one narrow ChatGPT app outcome end to end: define the tools, scaffold the MCP server...
102
103Integrations Code](https://developers.openai.com/codex/use-cases/chatgpt-apps)[
104
105### Complete tasks from messages
106
107Use Computer Use to read one Messages thread, complete the task, and draft a reply.
108
109Knowledge Work Integrations](https://developers.openai.com/codex/use-cases/complete-tasks-from-messages)