creating-prslisted
Install: claude install-skill monte3l/m3l-automation
# creating-prs
This skill enforces quality gates before touching the remote (so you never push
a broken branch to CI), then uses the commit history to generate a PR title and
body that match this repo's conventions: Conventional Commit format, scoped
summary bullets, a concrete test-plan checklist, and a semver note.
## Steps
### 1 — Preflight checks
```bash
gh auth status
```
If the command fails (not authenticated), stop and tell the user:
`gh CLI is not authenticated. Run "gh auth login" and try again.`
```bash
git branch --show-current
```
If the branch is `main`, stop:
`You are on main. Branch off main first (e.g. feat/<slug> or fix/<slug>).`
### 2 — Resync with `origin/main`
Rebase the branch onto the latest `main` **before** the quality gates, so the
gates run against the state that will actually be reviewed and merged. This is
what keeps a stale branch from opening a PR that CI or a required check would
reject.
Detect staleness first:
```bash
git fetch origin main
git rev-list --count HEAD..origin/main
```
If the count is `0`, the branch is already up to date — print
`branch is up to date with main` and skip to Step 3.
Otherwise rebase onto the fetched `main`:
```bash
git rebase origin/main
```
- **On conflict:** capture the conflicted files, abort, and **hand back** —
never auto-resolve:
```bash
git diff --name-only --diff-filter=U # capture the conflicted paths first
git rebase --abort
```
Tell the user which files conflict and hand of