Token导航 LogoToken导航

Agent Skill · 开发

git-safe-pr-workflow(git 安全公关工作流程)

git-safe-pr-workflow 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

git-safe-pr-workflow 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 21,711。

总安装 1周安装 12GitHub Stars 公开资料未说明下载 97核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:git-safe-pr-workflow(git 安全公关工作流程)
来源仓库:https://github.com/caidanw/skills
仓库路径:skills/git-safe-pr-workflow
安装命令:
npx skills add https://github.com/caidanw/skills --skill git-safe-pr-workflow
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/caidanw/skills --skill git-safe-pr-workflow

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库和原始 README 核验具体用法和功能细节。

安装通过 npx skills add 命令从指定 GitHub 仓库获取,适用于 Codex、Claude、Cursor、Gemini CLI。建议确认权限范围、维护状态及是否触发联网、命令执行或文件读写。

来源仓库内路径:skills/git-safe-pr-workflow

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/caidanw/skills --skill git-safe-pr-workflow;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

git-safe-pr-workflow 怎么安装?

在终端执行 npx skills add https://github.com/caidanw/skills --skill git-safe-pr-workflow。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

git-safe-pr-workflow 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

git-safe-pr-workflow 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

git-safe-pr-workflow 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

git-safe-pr-workflow 用的人多吗?

公开数据是累计安装 1 次,近一周安装 12 次,下载 97 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

git-safe-pr-workflow 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
git-safe-pr-workflow

git 安全公关工作流程 · 本页

1—需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Git Safe Pr Workflow

Overview

Guide users through a GitHub-first PR workflow that keeps main clean without requiring frequent local rebases. Prefer short-lived feature branches, merge origin/main into the feature branch when syncing, and land changes with Squash and merge.

Bias toward safety over elegance. Choose reversible operations, avoid rewriting shared history, and teach the user in small steps while you work.

Safe Defaults

  • Treat main and master as shared, sensitive branches.
  • Use a short-lived feature branch for every task.
  • Assume a pushed branch or open PR may already be shared.
  • Prefer git fetch before any sync, merge, or recovery action.
  • Prefer merging origin/main into a feature branch over rebasing it.
  • Prefer git revert over rewriting history when commits may already be pushed.
  • Prefer Squash and merge to keep main clean.

Inspect First

Before any Git operation that changes history, branches, or remote state, inspect:

  • current branch and whether it is the default branch
  • clean vs dirty working tree
  • upstream tracking branch and whether local commits are pushed
  • whether the branch has an open PR or appears shared
  • staged and unstaged diff when undoing or syncing work

If you cannot determine whether a branch is shared, assume it is shared and choose the safer path.

Standard Workflow

Use this as the default GitHub workflow for low-experience users:

  1. Branch from main.
  2. Commit locally on the feature branch in small logical steps.
  3. Open a PR early.
  4. When the branch falls behind main, merge origin/main into the feature branch.
  5. Resolve conflicts carefully and verify the final code, not just the merge markers.
  6. Push the updated branch.
  7. Merge with Squash and merge.
  8. Delete the feature branch after merge.

Do not teach users to routinely rebase pushed PR branches just to get the latest main. That workflow is where many novices re-introduce old code or lose work.

Opening PRs

When helping a user open a PR, treat the PR title as the likely final squash-merge commit.

  • Write the title so it reads well on main after Squash and merge.
  • Use a concise Conventional Commit style title when the repo uses that convention.
  • Describe the final outcome, not the implementation journey or review process.
  • Avoid titles like WIP, fix stuff, address comments, or update branch.

Good default patterns:

  • feat: add <skill-name> skill
  • feat(<skill-name>): add <capability>
  • fix(<skill-name>): correct <problem>
  • docs: document <policy or workflow>

For the PR body:

  • briefly state what changed
  • briefly state why it changed
  • mention testing or validation if relevant

If the repo uses GitHub squash merges, prefer the PR title as the default squash commit message.

Sync Decision Tree

  • Need the latest main on a feature branch? Use fetch, then merge origin/main into the feature branch.
  • Need a clean main history? Rely on Squash and merge, not local rebasing of the feature branch.
  • Need to clean up unpublished local commits? Rebase is acceptable only if the branch is clearly private, unpublished, and not under review.
  • Need to undo pushed work? Use revert.
  • Need to discard local-only work? Use the least destructive local undo that matches the goal.

If a user asks to rebase a pushed branch, explain why that is risky and propose merging origin/main instead.

Conflict Resolution Rules

  • Resolve conflicts to the desired final code state, not by blindly taking both sides.
  • Assume old bugs can be reintroduced during conflict resolution.
  • After resolving conflicts, inspect the affected files and summarize what changed.
  • Run targeted verification after conflicts: tests, build, or focused checks in the touched area.
  • If the resolution is non-obvious, explain it briefly to the user while making the change.

For detailed conflict-handling steps and examples, read references/conflict-resolution.md.

Recovery Rules

  • If a merge is in progress and the user wants to stop, abort the merge rather than improvising.
  • If a rebase is in progress and has gone wrong, stop and recover with reflog or rebase abort.
  • If the wrong commit was pushed, prefer revert.
  • If work was committed to the wrong branch, preserve it and move it rather than deleting it.
  • When recovering history, explain what reference point you are returning to and why.

For recovery playbooks, read references/recovery.md.

Refuse or Warn Hard

  • Do not commit directly to main unless the user explicitly asks and the repo policy allows it.
  • Do not force-push main or other protected branches.
  • Do not rebase a pushed/shared branch by default.
  • Do not use git reset --hard, git clean -fd, branch deletion, or tag deletion unless the user clearly wants destructive cleanup.
  • Do not bypass branch protections, required checks, or required review flows.

If the user explicitly wants a risky operation, explain the safer alternative first. Only proceed when the request is clear and the branch is not a protected/shared branch.

Teaching Behavior

Teach in short, repeatable notes while working:

  • State what you are about to do and why it is the safer path.
  • When rejecting rebase, explain that rebase rewrites commit history and is easy to misuse once a branch is pushed.
  • When merging origin/main, explain that this preserves the branch's existing commits and is easier to recover from.
  • After recovery, explain what went wrong, how you recovered, and what safer habit to use next time.
  • Avoid long Git lectures. Teach the next decision, not the whole tool.

GitHub Settings To Recommend

When asked how to support this workflow at the repo level, recommend:

  • protect main
  • require pull requests before merge
  • require status checks
  • require at least one review
  • enable Squash and merge
  • disable Rebase and merge
  • optionally disable regular merge commits if the team wants squash-only history
  • set the default squash commit message to Pull request title
  • auto-delete head branches after merge

For repo policy details, read references/repo-settings.md.

Quick Checklist

Before syncing a feature branch:

  • confirm you are on the feature branch, not main
  • fetch remote changes
  • check for uncommitted work
  • merge origin/main, do not rebase by default
  • inspect and verify conflict resolutions

Before pushing:

  • review status and diff
  • confirm no accidental changes to unrelated files
  • explain any conflict resolution that changed behavior

Before undoing:

  • determine whether the commits are pushed
  • choose revert for pushed work
  • use local-only undo only for unpublished work

平台分布

Codex

37.18%
按下载量换算36

Claude

29.89%
按下载量换算29

Cursor

20.1%
按下载量换算19

Gemini CLI

9.89%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills