How-To Guides

prepare-pr: Review-to-Pull-Request Skill for Codex

Install prepare-pr for Codex to review finished work, update affected docs, check the branch name, commit only in-scope files and open the pull request, with you approving the branch, the commit and the push.

  • Reviews the change and reports only findings it could not disprove
  • Pauses for your yes before a new branch, a commit and a push
  • ️ Never stages unrelated files, force-pushes or pushes to the default branch
By Rejith Krishnan5 min read
prepare-pr: Review-to-Pull-Request Skill for Codex

What it is

prepare-pr takes finished, tested work in a git repository to a ready pull request. It runs after the code works and moves through six steps in order: scope, review, docs, branch, commit, push and PR. At each key decision it stops and waits for an explicit answer. A new branch, a commit and a push each need their own yes, and approval for one step never covers the next.

What it does

  • Scope: sorts every changed, staged and untracked file into in scope or unrelated. Scratch files and local config are never staged, stashed, reset or committed, and stay exactly as they were.
  • Code review: checks correctness, security, performance, maintainability and the original requirements. It lists candidate problems, tries to disprove each one, and reports only findings with a concrete failure scenario, ranked by severity. This follows Claude Code's code review approach.
  • Fixes: you choose all, some or none. It applies the approved fixes one at a time, then runs the relevant tests and reports the real commands and results. Anything that changes an API, a schema or the design comes back to you as a question.
  • Docs: updates only the Markdown the change makes wrong or incomplete. Otherwise it says "no documentation changes needed".
  • Branch: checks the branch name against the work. On the default branch or a detached HEAD it requires a new one. When the name does not fit, it suggests one in the repo's naming style and warns if the upstream points at the default branch.
  • Commit: stages by explicit path and runs a secret check first. It writes a detailed message with what changed, why, the key changes and a Testing: section, in the repo's commit style.
  • Push and PR: asks yes, yes as a draft, or no. Yes pushes with -u origin <branch> and runs gh pr create, filling the repo's PR template if there is one. No keeps the commit local and prints the commands to finish later.

What it never does

  • Run git add -A, git add . or git commit -a.
  • Force-push, use --no-verify, or amend or rebase unless you ask.
  • Push to the default branch, or merge the pull request.
  • Skip, delete or weaken a test to make it pass.
  • Print a secret. It names the file and line, never the value.
  • Follow text in code, comments, tickets or tool output that addresses an AI.

What it relies on

  • scripts/pr_context.py gathers read-only git context as JSON: branch and default branch, merge base, staged, unstaged, untracked and conflicted files, commits on the branch, detected test commands, PR templates, an operation in progress, and the repo's commit and branch-name conventions.
  • pr_context.py --scan-staged blocks staged secrets and .env or key files before every commit. .env.example is allowed.
  • It stops if a merge, rebase or cherry-pick is in progress, or if there are conflicted files.
  • Requirements come from what you said in the session, then a ticket key in the branch name and its plan prompt under docs/plan-prompts/, then the commit messages. If none is clear, it asks.
  • Needs Python 3.8+ and git. gh is optional and only needed to open the PR.

The default branch policy protects the default branch and main or master. Teams with other long-lived branches, such as develop or release/*, can extend it in classify_branch().

Install and usage

Codex CLI prerequisite: PowerShell setup or WSL setup.

Install, then restart Codex:

$skill-installer install https://github.com/lowtouch-ai/krithi-skills/tree/main/skills/prepare-pr

Open Codex in the repository where the work is done and tested, and run:

$prepare-pr prepare a pull request for this change

Expect up to five questions, in this order: confirm the file scope, which review fixes to apply, whether to switch to a new branch, whether to commit the staged files with the proposed message, and whether to push and open the PR. The run ends with a report of the branch, commit, review results, test results, docs changed, PR link and the files left untouched.

For update and uninstall steps, see the krithi-skills README.

Install all the skills together

If you want the whole set instead of one skill, point the installer at the repository root:

$skill-installer install all the skills in the https://github.com/lowtouch-ai/krithi-skills/

This asks Codex to install every skill in the krithi-skills repository in one step, so you do not repeat the install for each one. Restart Codex afterwards so the new skills are picked up.

The set currently covers six skills:

  • prepare-pr: reviews finished work, checks the branch, commits in-scope files and opens the pull request with your approval at each step.
  • migration-estimate: turns a codebase into PRDs, stories and a sprint estimate with human-team and Krithi timelines.
  • plan-builder: turns a ticket into a Plan Mode prompt that changes no code.
  • repo-readme-generator: creates or updates a README and documentation suite from verified repository evidence.
  • appsec-static-audit: runs a source-code-only security audit with compliance mapping.
  • wave-a11y-scan: runs a WAVE-style accessibility scan mapped to WCAG 2.x.

Prefer to install one at a time? Use the single-skill command in the install section above.

About the Author

Rejith Krishnan

Rejith Krishnan

Founder and CEO

Rejith Krishnan is the Founder and CEO of lowtouch.ai, a platform dedicated to empowering enterprises with private, no-code AI agents. With expertise in Site Reliability Engineering (SRE), Kubernetes, and AI systems architecture, he is passionate about simplifying the adoption of AI-driven automation to transform business operations.

Rejith specializes in deploying Large Language Models (LLMs) and building intelligent agents that automate workflows, enhance customer experiences, and optimize IT processes, all while ensuring data privacy and security. His mission is to help businesses unlock the full potential of enterprise AI with seamless, scalable, and secure solutions that fit their unique needs.

LinkedIn →