npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

git-safe-skills

v0.2.3

Published

Safe Git pull and push workflows for AI agents and non-programmers.

Readme

git-safe-skills

给不熟 Git 的人用的安全同步 / 提交工具。

你可以把它理解成:给 Codex、Cursor、Claude Code、opencode、WorkBuddy 等 AI Agent 加一条规则,让它们帮你更新代码、提交代码时先检查风险,不要乱覆盖你的本地改动。

它解决什么问题

很多非专业程序员用 AI 改代码时,最容易卡在这些地方:

  • 不知道现在能不能更新代码
  • 怕自己改的文件被覆盖
  • 不知道哪些文件会被提交
  • 不小心把代码直接推到主分支
  • 看到冲突提示不知道该怎么办

git-safe-skills 做的事情很简单:先检查,再操作;有风险就停下来告诉你。

第一步:安装

先确认电脑里有 Node.js。没有的话,先安装 Node.js。

然后打开终端,复制这一行:

npm install -g git-safe-skills

安装完成后,你会得到 3 个命令:

  • git-safe-install:把规则装进你的 AI Agent
  • git-pull-safe:安全更新代码
  • git-push-safe:安全提交代码

第二步:选择你的 AI Agent

进入你的项目文件夹后,按你使用的工具复制其中一行。

Codex:

git-safe-install codex

Cursor:

git-safe-install cursor --project .

Claude Code:

git-safe-install claude-code --project .

opencode:

git-safe-install opencode --project .

WorkBuddy:

git-safe-install workbuddy --project .

其他能读取 AGENTS.md 的 AI Agent:

git-safe-install generic --project .

你只需要安装自己正在用的那个,不需要每一条都运行。

平时怎么用

你可以直接跟 AI Agent 说人话。

也可以像 Skill 一样用 $SkillName 触发。

Codex 原生 Skill:

$git-pull-safe
$git-push-safe

中文短触发词:

$拉取
$提交

说明:Codex 这类支持原生 Skill 索引的 Agent,可能会显示类似「安全拉取代码 Skill」的自动补全卡片。Cursor、Claude Code、opencode、WorkBuddy 等工具通常不会保证显示同款 UI,但安装后会通过规则识别这些 $ 触发词。

更新代码:

帮我安全更新一下这个项目

提交代码:

帮我检查改了哪些文件,然后安全提交并推送

只处理某个文件夹:

只帮我提交 frontend 这个文件夹里的改动

如果你想自己运行命令,也可以这样:

git-pull-safe status
git-pull-safe pull
git-push-safe status
git-push-safe push --all-changes -m "更新页面文案"

它会怎么保护你

  • 更新代码前,会先看你本地有没有改动
  • 有本地改动时,会先临时保存,更新后再放回来
  • 发现冲突时会停下,不会自动乱改
  • 提交前会先列出会提交哪些文件
  • 默认不允许直接提交到 main / master
  • 如果你的代码落后于远端,会先提醒你更新

常见情况

如果它说“有冲突”,意思是:你本地和别人都改了同一个地方,需要你决定保留哪边,或者两边都保留。

如果它说“没有 upstream”,意思是:这个分支还没有绑定远端位置,需要懂 Git 的人或 AI Agent 帮你设置一次。

如果它说“behind remote”,意思是:线上已经有别人提交的新内容,你需要先更新,再提交自己的改动。

装到了哪里

  • Codex:安装到 ~/.codex/skills
  • Cursor:写入 .cursor/rules/git-safe.mdc
  • Claude Code:写入 CLAUDE.md
  • opencode / WorkBuddy / 通用 Agent:写入 AGENTS.md

这些文件只是给 AI Agent 看的规则,不会改你的业务代码。