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-init

v0.1.2

Published

Claude Code style /init command for the DeepSeek Harness (DSH): generates a minimal CLAUDE.md and links AGENTS.md to it as a relative symlink.

Readme

dsh-init

GitHub · npm

DeepSeek Harness(DSH) 加上 Claude Code 风格的 /init 命令的官方机制插件(profile bundle)。

安装后,对 agent 说 /init 即可通过「访谈 → 侦查代码库 → 补缺口 → 写文件」的工作流生成:

  1. CLAUDE.md — 极简的项目级 agent 指引(含 Claude Code 标准文件头);
  2. AGENTS.md不生成第二份内容,而是创建一条指向 CLAUDE.md相对软链接,让读 AGENTS.md 的工具(含 DSH 自身、Cursor、Codex 等)和读 CLAUDE.md 的工具共享同一份事实来源。

设计

Claude Code 的 /init 没有一行"生成逻辑"——它是 type: 'prompt' 的内置命令,getPromptForCommand() 只返回一段静态工作流提示词,其余全部由模型用普通工具(读写文件、提问、子代理)完成。本插件沿用完全相同的架构:

  • 插件只注册一个名为 init 的模型 Tool(经 ctx.tools.register 挂入工具注册表);
  • Tool execute() 零参数、零业务逻辑,返回工作流提示词;
  • 提示词改编自 Claude Code NEW_INIT 八阶段流程(逆向自 claude-code-mapsrc/commands/init.ts),按 DSH 能力裁剪为七阶段,并新增 Phase 5: AGENTS.md 软链

工作流七阶段

| 阶段 | 内容 | | --- | --- | | 1 访谈 | 问范围:项目 CLAUDE.md / 个人 CLAUDE.local.md / 两者 | | 2 侦查 | 读 manifest、README、CI、已有的 CLAUDE.md / AGENTS.md / .cursor rules 等 | | 3 补缺口 | 只问代码答不了的问题,不标"推荐" | | 4 写 CLAUDE.md | 每行过"删掉会导致 agent 犯错吗"测试;已有文件走 diff 不覆盖 | | 5 软链 AGENTS.md | ln -s CLAUDE.md AGENTS.md;已存在常规文件时先 diff、经确认再替换,绝不静默删内容 | | 6 CLAUDE.local.md | 可选个人偏好文件 + 自动加 .gitignore | | 7 总结 | 回顾产物,提醒可随时重跑 |

安装

本包是一个标准的 DSH profile bundlepackage.json 声明 dsh.bundle.patch,与官方 @deepseek-ai/dsh-base、社区 dsh-context 等插件同一机制)。用 DSH 自带的 dsh plugin 命令安装(内部转发 pnpm,并把本包加入 profile 的 bundle 层):

# 方式一:从 npm 安装(推荐)
dsh plugin --profile web add dsh-init

# 方式二:从 GitHub 安装
dsh plugin --profile web add github:evanfang0054/dsh-init

# 方式三:从本地仓库安装(web profile;GUI 部署的默认 profile)
dsh plugin --profile web add /path/to/dsh-init

然后重启 DSH(bundle 层在进程启动时加载)。

验证安装成功:

cat ~/.dsh/profiles/web/package.json | grep dsh-init
# "dsh.profile.bundles" 数组里出现 "dsh-init" 即已挂载

卸载:

dsh plugin --profile web remove dsh-init

从本地路径安装时,pnpm 会自动以 link(软链) 方式挂入——仓库里改完代码,重启 DSH 即生效,无需重新 add。

安装机制说明

  • dsh plugin add = 在 ~/.dsh/profiles/<profile>/ 里跑 pnpm add <spec>,然后根据安装结果把声明了 dsh.bundle 的包写进该 profile 清单的 dsh.profile.bundles 层栈;
  • 启动时各 bundle 的 cordis.patch.yml 按层栈顺序应用(本包只插入一行 - id: dsh-init / name: dsh-init),后写的层覆盖同 id 行;
  • 本包零依赖:工具定义以规范化形态直接注册,不需要 @deepseek-ai/dsh-tools

使用

安装并重启后,插件向会话注册两个面(同一套工作流):

  • 斜杠命令 /init:输入 / 即可在补全列表看到 init(Claude Code 同款体验)。选中回车后,工作流提示词作为你的下一个用户回合注入,agent 立即开始访谈与生成。/init <附加要求> 可附带补充说明。
  • 模型工具 init:直接用自然语言说"初始化这个项目",agent 调用工具拿到工作流提示词开始执行。

注意事项

  • 软链与 git:git 原生保存 symlink(模式 120000),clone 后链接保持。Windows 需开启开发者模式并设置 git config core.symlinks true
  • 已有 AGENTS.md:工作流绝不静默覆盖——会先 diff,再经用户确认,可选备份为 AGENTS.md.bak
  • CLAUDE.md 变更:因为 AGENTS.md 是软链,改 CLAUDE.md 即同时生效于两边,永远不需要改两份。
  • 更新插件:本地路径安装是软链,改完仓库代码重启 DSH 即生效;GitHub/npm 安装则重新执行一次 dsh plugin add <spec> 更新到新版本。

发布新版本(GitHub Actions 自动化)

发布由 GitHub Actions 全自动完成(与 dsh-mermaid-zoom 同一套模式):推送 v* tag 触发流水线——语法检查 → 插件加载冒烟测试 → npm publish(token 取自仓库 secret NPM_TOKEN)。也支持在 Actions 页面手动触发(workflow_dispatch)。

npm run release        # = npm version patch(bump + commit + tag)+ git push --follow-tags

推完 tag 后 CI 自动发布到 npm,进度见仓库 Actions 页。

前置配置(仓库维护者):gh secret set NPM_TOKEN --body <npm token>,token 与 ~/.npmrc 无关,仅存于 GitHub 仓库 secret。

License

MIT