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

@dog_world/dak

v0.1.1

Published

Dog Agents Kit - agent skills CLI

Readme

dak — Dog Agents Kit CLI

这是什么 / 做什么用

dak 是一个本机命令行小工具,帮你把同一批 skills / hooks / agents 同时接到多个 AI 工具(Codex、Claude Code 等)上,还不用每个工具都复制一份

怎么做到的:你把 skill / hook / agent 的源文件集中放进一个文件夹(store)。dak 在各工具目录里建「软链接」(快捷方式)指回 store 里的源文件,不复制实体文件。于是:

  • 一份源文件,多个工具共用;
  • 改 store 里这一份,所有工具立刻看到新内容;
  • 新加工具,跑一下 dak link 就接上,不用再复制。

解决的痛点:同一 skill 想给 Codex 和 Claude Code 用,以前得复制两份(~/.codex/skills/foo~/.claude/skills/foo),改了 foo 得记着改两处,漏一处就不同步。用 dak 只存一份,两边都生效。

安装

git clone <repo> && cd dog-agents-kit
npm install
npm run build      # 产物在 dist/
npm link           # 注册全局命令 dak(或直接 node dist/cli.js)

创建的目录与结构

dak init 后在 ~/.dog-agents-kit/(默认 store)生成:

~/.dog-agents-kit/
├── dak.config.json   # 配置:store 路径 + 目标工具映射
├── .dak-state.json   # 链接状态(dak 自维护,别手改)
├── skills/           # 你的 skills 源文件
├── hooks/            # 你的 hooks 源文件
└── agents/           # 你的 agents 源文件

默认配置两个目标工具(dak init 自动写入):

| 目标名 | 工具根目录 | |--------|-----------| | codex | ~/.codex | | claudecode | ~/.claude |

目标名是自己起的 key,不是写死的。想加 Cursor/Windsurf 等工具,直接编辑 dak.config.jsontargets 加一行即可。换 store 位置用 dak init --store <path>,多 store 并存互不干扰。

指令大集合

用法示例

| 指令 | 示例 | |------|------| | 初始化 store | dak init | | 初始化到自定义位置 | dak init --store ~/my-dak-store | | 列出 store 资源 | dak list | | 列出指定 store | dak list --store ~/my-dak-store | | 链接到 Codex | dak link codex | | 链接到 Claude Code | dak link claudecode | | 一次性链全部目标 | dak link all | | 只链 hooks | dak link codex -r hooks | | 只链 skills | dak link codex -r skills | | 只链 agents | dak link codex -r agents | | 冲突时备份旧文件再链 | dak link codex --on-conflict backup | | 冲突时直接覆盖 | dak link all --on-conflict overwrite | | 查看链接状态 | dak status | | 只看 skills 状态 | dak status -r skills | | 同步:补新链、清失效链 | dak update | | 只同步 hooks | dak update -r hooks | | 同步时冲突先备份 | dak update --on-conflict backup | | 取消 Codex 全部链接 | dak unlink codex | | 取消所有目标链接 | dak unlink all | | 只取消 agents 链接 | dak unlink codex -r agents | | 取消所有目标的 hooks | dak unlink all -r hooks |

指令解释

| 指令 | 解释 | |------|------| | init | 首次使用跑。建 store 目录、生成默认配置 dak.config.json 和空状态文件。配置已存在则不覆盖。 | | list | 列出 store 里现有的 skills / hooks / agents(标注 [dir] 文件夹、[link] 软链)。不碰任何链接。 | | link <目标> | 把 store 资源软链接到指定目标工具目录。all = 配置里所有目标。冲突按 --on-conflict 处理。 | | status | 查看每个资源在目标里的链接状态(linked/missing/stale/broken/conflict)。只读,不改东西。 | | update | 对齐 store 与已链接目标:store 新增的资源自动补链、store 删掉的资源自动清链。 | | unlink <目标> | 取消链接,只删目标里的软链,不删 store 源文件all = 取消所有目标。 |

通用参数

| 参数 | 说明 | 适用命令 | |------|------|---------| | --store <path> | 指定 store 路径(须与配置里 store 一致,否则报 config store mismatch) | 全部 | | -r / --resource <类型> | 只处理某一类资源(skills/hooks/agents 或 config 声明的自定义类型),不传则三类全处理 | link / unlink / status / update | | --on-conflict <skip\|backup\|overwrite> | 冲突处理策略:跳过 / 备份旧的 / 覆盖旧的 | link / update |

冲突策略没传时:交互式终端(TTY)里 dak 逐个问你 [s]kip/[b]ackup/[o]verwrite(默认 skip);非交互(脚本/管道)直接 skip。 保护规则:真实文件、其他 store 的链接、手动改过的链接,在 update/unlink 里永远受保护(conflict 状态),传 --on-conflict overwrite 也不会删。

快速上手

dak init                  # 1. 建默认 store
# 2. 把你的 skill/hook/agent 源文件丢进 ~/.dog-agents-kit/{skills,hooks,agents}/
dak link all              # 3. 一键链到 codex + claudecode
dak status                # 4. 看状态确认
# 之后改了 store 里的源文件 → 所有工具立即可见;
# 新增/删除资源后跑 dak update 对齐。

配置文件

<store>/dak.config.json,结构:

{
  "store": "~/.dog-agents-kit",        // store 路径,须与 --store 解析后一致
  "resourceTypes": ["skills", "hooks", "agents"],  // 受管理资源类型,可加自定义
  "targets": {
    "codex": {
      "path": "~/.codex",              // 工具根目录(支持 ~ 或绝对路径)
      "resources": {                   // 各资源在目标里的子路径;缺哪类就跳过哪类
        "skills": "skills",
        "hooks": "hooks",
        "agents": "agents"
      }
    },
    "claudecode": { "path": "~/.claude", "resources": { "skills": "skills", "hooks": "hooks", "agents": "agents" } }
    // 加新工具:在这加一行 "cursor": { "path": "...", "resources": { "skills": "skills" } }
  }
}

改完配置后跑 dak link / dak update 生效(init 不会覆盖已存在的配置)。

状态字段(status / unlink 输出)

| 状态 | 含义 | |------|------| | linked | 软链存在且指向当前 store 源 | | created / backed-up / overwritten | 本次新建 / 备份后新建 / 覆盖后新建 | | missing | store 有此资源,但目标路径不存在 | | stale | state 有记录,但 store 源已删(update 会清掉) | | broken | 软链指向不存在的目标 | | conflict | 目标位置是真实文件或外部软链(受保护,不删) | | deleted | 本次安全删除链接 |