write-prlisted
Install: claude install-skill ku5ic/dotfiles
## Procedure
1. Get the scratch directory: `!`scratch-dir.sh``.
2. Check for a project PR template: resolve the project root via `!`project-root.sh``, then check these exact paths in order, using the first that exists:
- `<root>/.github/pull_request_template.md`, and its case variant `<root>/.github/PULL_REQUEST_TEMPLATE.md`
- the alphabetically-first `*.md` file directly inside `<root>/.github/PULL_REQUEST_TEMPLATE/`, if that directory exists (`fd -H . <root>/.github/PULL_REQUEST_TEMPLATE -e md | sort | head -1`)
- `<root>/docs/pull_request_template.md`
- `<root>/pull_request_template.md`
Test each exact path (e.g. `test -f <path>`) - do not run a keyword/substring search like `fd -i pull_request_template` across the tree. Two failure modes make that unsafe:
- `.github` is a hidden directory that `fd` silently excludes unless you pass `-H`, so a template living there gets missed entirely.
- `.github` commonly holds several unrelated `*_pull_request_template.md` variants (per-team or per-change-type templates, e.g. `ds_pull_request_template.md`), and a substring match sorted alphabetically will confidently pick the wrong one instead of the actual default.
Exact-path checks sidestep both.
If one exists, read it: its sections replace the default Structure below - this is mandatory, not a preference, even for a one-line diff. Never substitute the default Structure when a project template exists. If none exists, fall back to the default Structure.