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

dsh-git-plugin

v0.1.0

Published

Git workflow plugin for DeepSeek Harness: slash commands and read-only git tools

Readme

dsh-git-plugin

给 DeepSeek Harness(DSH)的 Git 工作流插件:补齐 DSH 相比 Claude Code / Codex 缺失的「程序员手感」——diff 感知、自动分支、规范提交、可恢复撤销。全部通过 ctx.subprocess seam 以纯 argv 调用 git,不经过 shell 层,每次运行都受字节与超时上限约束。

能力

命令(面向人 / 斜杠命令)

| 命令 | 作用 | |---|---| | /status | 显示当前分支与工作区状态(porcelain v1) | | /diff | 摘要显示已暂存 / 未暂存的改动 | | /branch [<name>] | 不带参数列出分支;带参数则 git switch -c <name> 新建并切换 | | /commit [<message>] | 带参数则 git add -A + 提交;不带参数显示提交规范与当前改动 | | /undo [list\|pop] | 默认 git stash push -u 做可恢复快照;list 查看、pop 恢复 |

工具(面向模型 / 只读)

| 工具 | 作用 | |---|---| | git-status | 分支 + 工作区状态 | | git-diff | 未暂存(默认)或已暂存(staged=true)的 diff | | git-log | 最近提交历史(count 控制条数,path 过滤文件) | | git-show | 查看某个提交(默认 HEAD)的 message / author / diff |

插件还会注入一段 system-prompt 指引,让模型主动用 git 工具查看状态、并遵循仓库的提交与分支规范。

仓库发现

当会话工作目录不是 git 仓库时,插件会:若其直接子目录里只有一个 git 仓库,自动使用它;有多个则列出让用户选择;一个都没有才报 not a git repository。这让它能在「项目集合」式的工作区根目录下正常工作。

安装

尚未发布到 npm registry,当前按本地包安装。发布后可直接 dsh plugin --profile <name> add dsh-git-plugin

# 1) 本地安装到某个 profile
dsh plugin --profile <name> add /path/to/dsh-git-plugin

# 2) 在 profile 配置里声明插件
- name: dsh-git-plugin
  config:
    maxBytes: 1048576
    timeoutMs: 30000

配置

| 键 | 默认值 | 含义 | |---|---|---| | maxBytes | 1048576 | 单次 git 调用 stdout 的上限字节数 | | stderrMaxBytes | 65536 | 单次 git 调用 stderr 的上限字节数 | | graceMs | 3000 | 子进程终止前的宽限毫秒数 | | timeoutMs | 30000 | 工具调用的协作超时毫秒数 | | preCommit | [] | 提交前要运行的 argv 命令(如 ["npm","test"]);非零退出则中止 /commit |

提交规范

/commit 默认提示 MAA 风格的提交信息,与本仓库约定一致:

<类型>(<可选作用域>): <中文主体>
feat / fix / docs / chore / style / refactor / test / perf

若仓库根目录存在 AGENTS.md / CLAUDE.md,模型会读取并遵循其中的自定义规范。

开发

  • 分支工作流:所有开发在功能分支进行,稳定后才合并到 main
  • 分支命名:feat/xxxfix/xxxdocs/xxxchore/xxx
  • 提交消息:<类型>(<可选作用域>): <中文主体>

本地校验与测试:

npm install
npm run check   # 语法校验
npm test        # 单元 + 真实 git 集成测试

集成测试会在临时目录里真正 git init / commit / stash,验证 /commit/undo/branch 与只读工具端到端可用。

Hook 与 CI

  • 插件 pre-commit 钩子:通过 config.preCommit 配置一个 argv 命令,/commit 会在 git add 前运行它,失败即中止提交。

  • 仓库 commit-msg 钩子.githooks/commit-msg 强制 MAA 提交格式。启用:

    git config core.hooksPath .githooks
  • CI.github/workflows/ci.yml 在 push / PR 时跑 npm cinode --checknode --test

License

MIT