agentleFS
rgaddargadda/frontend-eng-team/skills/pr-prep/SKILL.md

pr-prep

Skill8 starsChanged 4 months agoMITView on GitHub

Load this when the user is preparing to open a pull request. Walks the diff hygiene + commit message + non-negotiables sweep + description-template checklist. Reminds the user to run typecheck/lint/tests/build before pushing. Triggers — "open PR", "prep PR", "ready to ship", "ready to push", "before I push", "PR description".

  • Reads credentials

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run git status and git diff --stat first.

    line 12
  2. Very specific:

    No stray files: console.logs, .env changes, .DS_Store, generated artifacts, commented-out code.

    line 13
  3. Distinctive:

    No unrelated formatting churn.

    line 14
  4. Distinctive:

    No lockfile changes unless a dependency was intentionally added — and if a dependency was added, that needs the team's approval first …

    line 15
  5. Distinctive:

    All must pass. Do not push red.

    line 39
  6. Very specific:

    If the team uses Conventional Commits, follow the prefix (feat:, fix:, refactor:, test:, chore:, docs:).

    line 45
  7. Distinctive:

    If the diff is over ~300 LOC or 5 files, justify the size in the description or split the PR.

    line 84

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PR Prep — playbook

Apply this before pushing a branch or opening a PR. Run in the main context. This is a checklist, not a delegated task.

1. Diff hygiene

  • Run git status and git diff --stat first. Confirm the changeset matches what the PR claims to do.
  • No stray files: console.logs, .env changes, .DS_Store, generated artifacts, commented-out code.
  • No unrelated formatting churn. If a file was reformatted incidentally, revert the unrelated hunks.
  • No lockfile changes unless a dependency was intentionally added — and if a dependency was added, that needs the team's approval first (CLAUDE.md non-negotiable).

2. Non-negotiables sweep

Grep the diff for these. Any hit blocks the PR.

  • \bany\b in .ts/.tsx files — should be unknown and narrowed.
  • fetch( outside src/api/client.ts — should go through the shared Axios instance.
  • style={{ with static values — should be a CSS Module class.
  • console\.(log|warn|error) — should use the logger utility if one exists; otherwise remove.
  • New entries in package.json dependencies/devDependencies that weren't pre-approved.
  • New index.ts files that only re-export — barrels are forbidden.
  • Class components (extends React.Component) — functional only.

3. Test + type + build gates (run before pushing)

npx tsc --noEmit
npx eslint . --max-warnings=0
npx jest --silent
npx vite build         # or: npm run build
npx playwright test    # only if your change touches a critical user flow

All must pass. Do not push red.

4. Commit messages

  • One commit per logical change. If the work was iterative, squash before pushing.
  • Subject line: imperative mood, ≤72 chars. ("Add order confirmation modal" — not "added" or "adds".)
  • If the team uses Conventional Commits, follow the prefix (feat:, fix:, refactor:, test:, chore:, docs:).
  • Body: explain why, not what. The diff already shows the what.

5. PR description template

## Summary
<1–3 sentences: what changed and why.>

## What's in the diff
- <feature/module touched> — <one line>
- <feature/module touched> — <one line>

## Why this approach
<Trade-offs considered, alternatives rejected with one-line reason each.>

## Testing
- [ ] Typecheck (`tsc --noEmit`) — clean
- [ ] Lint (`eslint .`) — clean
- [ ] Unit (`jest`) — <pass count>/<total>
- [ ] Build (`vite build`) — succeeds
- [ ] E2E (`playwright test`) — <pass count>/<total> (only if relevant)
- [ ] Manual smoke: <what you clicked through>

## Accessibility
- [ ] Keyboard-navigable
- [ ] Focus management (modals trap + restore)
- [ ] Semantic HTML (`<button>`, `<a>`, `<dialog>`, `<nav>`)
- [ ] Accessible names on form inputs and icon-only buttons

## Risk + rollback
<What could break in prod, and how to revert quickly if it does.>

## Screenshots / recordings
<For any UI change.>

6. Reviewer-friendly polish

  • If the diff is over ~300 LOC or 5 files, justify the size in the description or split the PR.
  • Self-review the diff in the PR UI before requesting review — you will catch half the issues yourself.
  • Link the issue/ticket if there is one. Reference any preceding architect plan or branch-plan.md.

7. Before clicking "Create PR"

  • Branch is rebased onto latest main (or your team's trunk).
  • CI is green locally on this exact SHA.
  • The description answers: what, why, how to test, what could go wrong.
  • No [wip] / [draft] markers unless you actually want a draft PR.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.