Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
AI & knowledge

oss-submit-pr

Submit a pull request following the repo's contribution guidelines. Reviews the diff, checks for common rejection reasons, and helps the user write their own PR description. The LLM reviews. the user writes. Use when implementation is complete and tests pass. Not for responding to review comments after the PR is open. Use oss-post-pr for that.

chiruu12 · Static checks on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add chiruu12/OSS-Skills --skill oss-submit-pr

About this skill


name: oss-submit-pr description: | Submit a pull request following the repo's contribution guidelines. Reviews the diff, checks for common rejection reasons, and helps the user write their own PR description. The LLM reviews. the user writes. Use when implementation is complete and tests pass. Not for responding to review comments after the PR is open. Use oss-post-pr for that.

Submit PR

Get your PR right the first time. This skill checks your work against the repo's rules, catches common rejection reasons, and helps you write a PR description that maintainers actually want to read. You write the description. the LLM reviews it.

Purpose

A clean PR gets reviewed and merged. A sloppy PR gets ignored or closed. Most new contributors get rejected not because their code is bad, but because they didn't follow the process. wrong branch, missing tests, unclear description, scope creep. This skill catches all of that before you hit submit.

Prerequisites

  • Implementation complete (from oss-contribute)
  • Tests pass locally
  • Lint/formatting passes locally
  • User can explain what they changed and why (verified in oss-contribute step 6)

Process

1. Re-read contribution requirements

Even if oss-prep-to-contribute already read these, read them again. specifically for PR submission rules:

# Fetch latest CONTRIBUTING.md
gh api repos/{owner}/{repo}/contents/CONTRIBUTING.md --jq '.content' | base64 -d 2>/dev/null

# Check for PR template - all standard locations
for path in \
  ".github/PULL_REQUEST_TEMPLATE.md" \
  ".github/pull_request_template.md" \
  "PULL_REQUEST_TEMPLATE.md" \
  "pull_request_template.md" \
  "docs/PULL_REQUEST_TEMPLATE.md" \
  "docs/pull_request_template.md"; do
  if content=$(gh api "repos/{owner}/{repo}/contents/$path" --jq '.content' 2>/dev/null); then
    printf '%s' "$content" | base64 -d 2>/dev/null
    break
  fi
done

# Check for multiple PR templates (directory-based)
gh api "repos/{owner}/{repo}/contents/.github/PULL_REQUEST_TEMPLATE" \
  --jq '.[] | .name' 2>/dev/null

If a single template is found: use it. The PR description must follow its structure exactly.

If a template directory exists with multiple templates: present each template name to the user and ask which one matches their contribution type (bug fix, feature, docs, etc.). Fetch the selected template and use it.

If no template is found: no template required. follow the general PR description guidance below.

Extract PR-specific requirements:

  • PR template (must follow if present. check ALL locations above)
  • Branch naming convention
  • Commit message format (conventional commits? sign-off required? DCO?)
  • Squash policy (squash before merge? maintainer squashes?)
  • Linked issue format ("Fixes #123" vs "Closes #123" vs "Resolves #123")
  • Required reviewers or labels
  • CI checks that must pass

2. Find the gates that are not in the docs

CONTRIBUTING.md describes the rules a human will judge the PR by. The rules a bot enforces live in .github/workflows/, and they fail a PR that is otherwise fine, often with an error that does not say what it wants.

# Scan every workflow for the gates below in one pass
for f in $(gh api repos/{owner}/{repo}/contents/.github/workflows \
             --jq '.[] | select(.type == "file") | .name
                   | select(test("\\.ya?ml$"))'); do
  hits=$(gh api "repos/{owner}/{repo}/contents/.github/workflows/$f" --jq '.content' \
         | base64 -d 2>/dev/null \
         | grep -oiE 'semantic-pull-request|semantic-pr|issue-link|signed-off-by|[-/]dco|cla-assistant|contributor-assistant|towncrier|changeset|commitlint' \
         | sort -u | tr '\n' ' ')
  [ -n "$hits" ] && echo "$f: $hits"
done

# Then read any workflow that matched, to see what it actually requires
gh api repos/{owner}/{repo}/contents/.github/workflows/{file} --jq '.content' | base64 -d

A hit is a lead, not a verdict. Read the workflow it names and find the condition it fails on.

Each of these rejects a correct patch, so find them before writing anything:

GateWhat it demandsWhat to grep the workflows for
Semantic PR titleTitle shaped fix: ... or feat: ...semantic-pull-request, semantic-pr
Linked issueThe body must reference an issueissue-link, a step named like "Validate PR to Issue link"
DCOEvery commit carries Signed-off-bydco, signed-off-by
CLAAn agreement signed before reviewcla-assistant, contributor-assistant
Changelog entryA news fragment or CHANGELOG edittowncrier, changeset, changelog
Commit lintCommit messages match a conventioncommitlint, conventional
Branch namingThe branch matches a patterna step reading github.head_ref

Branch protection adds requirements that no file in the repo mentions:

gh api repos/{owner}/{repo}/rulesets --jq '.[] | "\(.name)\t\(.target)"' 2>/dev/null

Tell the user what each gate requires before they write a line of code. A DCO gate means git commit -s from the first commit. Finding out afterwards means rewriting every commit on the branch. A changelog gate means an extra file that reviewers will ask for anyway.

3. Pre-flight checks

Run every check the CI will run. locally, before pushing:

# Rebase on latest upstream
git fetch upstream
git rebase upstream/main

# Run tests
# {repo-specific test command}

# Run linting/formatting
# {repo-specific lint command}

# Check the diff is focused
git diff upstream/main...HEAD --stat

Re-check that the issue is still the user's. Implementation takes days, and a claim made on Monday can be overtaken by Thursday. Before pushing anything, run the same checks oss-find-issue step 5 runs:

gh issue view {number} -R {owner}/{repo} --json state,assignees,labels,comments

gh api repos/{owner}/{repo}/issues/{number}/timeline --paginat
Read the complete source ↗