create-fix-pr
БесплатноБез исполняемых скриптовНе проверенUse when opening or updating a GitHub pull request after Phase 5 of `/compliance:analyze-cve` has applied and verified a CVE fix locally.
от openshift-eng★ 123 звезды на GitHubОб этом скилле
Create Fix PR
Opens a GitHub pull request for the CVE fix already applied in REPO_DIR (Phase 5). Never commits, pushes, or opens a PR without explicit approval — interactive, or AUTO_APPROVE=yes recorded once upfront (see Autonomous Mode). Direct CVE mode (no --jira=/--jql=) still creates the PR; it just omits Jira Fixes: links and the Jira follow-up comment.
Called from Phase 6 of the analyze-cve skill after Phase 5 verification succeeds.
When to Use This Skill
Use this skill when:
- Phase 5 applied a fix in
REPO_DIRand verification passed - The user approved creating a GitHub PR
embargo_statusis notTrue
Do not use this skill to apply the fix itself (that is Phase 5) or to post the analysis report (that is report-to-jira in Phase 4).
Required Inputs
From the parent command:
| Input | Source | Required |
|---|---|---|
REPO_DIR |
Phase 0.7 | Yes |
GIT_BRANCH |
Phase 0.7 (mapped release branch, e.g. release-4.17) |
Yes |
REPO_URL |
Phase 0.7 | Yes |
CVE_ID |
Phase 0.5 / direct CVE mode | Yes |
SOURCE_TICKET |
--jira= / --jql= |
No |
AUTO_APPROVE |
Phase 0 (--auto-approve, default no) |
Yes |
FORK_ORG |
Caller environment (e.g. CI/RWS runner) | No — enables Fork Mode when set |
PHASE5_FILES |
Phase 5 allowlist (incl. untracked) | Yes |
| Module path, old version, new version | Phase 4 / 5 | Yes if a dependency bump |
| Short CVE description | Phase 1 | Recommended |
| Phase 5 change summary | Phase 5 "Document Changes" | Yes |
Prerequisites
Hard requirements for this skill. Phase 0 does not treat gh as required (warn-only). This skill must not assume either tool is present — re-check both, then fail if either is missing. Do not create a PR another way.
which git 2>/dev/null || echo "MISSING: git"
which gh 2>/dev/null || echo "MISSING: gh"
gh auth status 2>/dev/null || echo "MISSING: gh auth"
- IF
gitis missing → print install instructions and returnstatus: failed(git_missing). Stop. Do not commit or push. - IF
ghis missing → print install instructions (https://cli.github.com/) and returnstatus: failed(gh_missing). Stop. Do not commit or push. - IF
gh auth statusfails → printgh auth logininstructions and returnstatus: failed(gh_unauthenticated). Stop. Do not commit or push. - Do not print token or login output that contains credentials.
Credential rule: Never print, echo, or log tokens, PATs, or
ghauth output that contains credentials. Reference credentials only via environment variable names.
Fork Mode (FORK_ORG set)
By default (no FORK_ORG) this skill pushes the fix branch directly to the cloned repo's own origin and opens a same-repo branch→base PR. That requires the authenticated gh/git identity to have direct write access to every upstream repo image-repo-mapping might resolve to (e.g. openshift/cert-manager-operator, openshift/cert-manager, openshift/secrets-store-csi-driver-operator, ...). In an unattended CI/RWS runner that isn't a collaborator on all of those repos, that's the wrong default.
IF the environment variable FORK_ORG is set (e.g. a bot-owned org), push to a fork under that org instead and open a cross-repo PR — mirrors the fork/upstream model used elsewhere for automated OpenShift PRs. This section only changes where the branch is pushed and how the PR's --head is specified; Step 0 (safety gates), Step 1 (org/repo/base-branch resolution from origin), Step 2 (conflicting-PR detection), and Step 3b (commit, allowlist validation) are unchanged and still operate against REPO_DIR/ORG/REPO/BASE_BRANCH resolved from origin.
Resolve the fork repo
FORK_REPO="${FORK_ORG}/${REPO}" # REPO = repo name parsed from origin in Step 1, e.g. "cert-manager-operator"
Ensure the fork exists and is actually a fork of this repo
Never assume a repo at ${FORK_REPO} is the right push target just because the name matches — verify its fork lineage first. Reusing an unrelated (or unexpectedly renamed/transferred) repo that happens to occupy that name would push the fix branch and open a PR from somewhere unintended.
if FORK_JSON=$(gh repo view "${FORK_REPO}" --json isFork,parent 2>/dev/null); then
IS_FORK=$(echo "$FORK_JSON" | jq -r '.isFork')
PARENT_FULL_NAME=$(echo "$FORK_JSON" | jq -r '.parent.fullName // empty')
else
IS_FORK=""
PARENT_FULL_NAME=""
fi
- IF
${FORK_REPO}exists (thegh repo viewabove succeeded) and (IS_FORKis not exactlytrueorPARENT_FULL_NAMEis not exactly${ORG}/${REPO}) → stop immediately, do not add theforkremote or push anything, and returnstatus: failed(fork_wrong_lineage). - IF
${FORK_REPO}exists and lineage matches → skip fork cr
Установить create-fix-pr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл create-fix-pr?
Use when opening or updating a GitHub pull request after Phase 5 of `/compliance:analyze-cve` has applied and verified a CVE fix locally.
Как установить скилл create-fix-pr?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл create-fix-pr запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic