dsh-hooks-pack
One-click Claude Code and Codex hooks for DeepSeek Harness: auto-discovers your existing hooks config and runs it on the official bridge plugins.
chenzhi-clude
@chenzhi-clude
⬇ 1
★ 0
main
安装
dsh plugin --profile web add github:chenzhi-clude/dsh-hooks-pack
需要可复现安装时,可在仓库后追加 #commit 固定提交。
One-click Claude Code and Codex hooks for DeepSeek Harness: auto-discovers your existing hooks config and runs it on the official bridge plugins.
该插件未提供要点说明,请参考仓库 README。
automationcodexdeepseekdeepseek-harnessdshhooks
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/chenzhi-clude/dsh-hooks-pack |
| 许可证 | MIT |
| 主要语言 | main |
| 下载量 | 1 |
| GitHub 星标 | 0 |
| 最近推送 | 2026-08-21 |
| 收录日期 | 2026-09-19 |
| 分类 | 开发与运行时 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
# dsh-hooks-pack
One-click **Claude Code & Codex hooks** for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness).
Already have a `hooks.json` from Claude Code or Codex? Install this pack and those hooks run inside DSH — no code, no config editing. No hooks yet? Copy the bundled starter pack and you have dangerous-command guarding plus a full tool-call audit log in one minute.
The heavy lifting is done by the official bridge plugins (`@deepseek-ai/dsh-hooks-claude-code`, `@deepseek-ai/dsh-hooks-codex`, shared protocol `@deepseek-ai/dsh-hook-protocol`). This pack adds what a manual setup is missing:
1. **Auto-discovery** — probes the standard locations for your existing hook configs.
2. **One row** — a single bundle mounts both dialects on the host plane.
3. **Safe idle** — with no config found anywhere it registers nothing; installing never changes agent behavior by itself.
## Install
From the plugin market UI: search **dsh-hooks-pack** → install.
Or with the CLI:
```sh
dsh plugin --profile web add github:REPLACE_ME/dsh-hooks-pack
# or from npm once published:
dsh plugin --profile web add dsh-hooks-pack
```
Restart the profile (or reload the web app) afterwards.
## What gets discovered
| Dialect | Probed locations (first hit wins) |
|---|---|
| Claude Code | `$CLAUDE_CONFIG_DIR/hooks.json` → `~/.claude/hooks.json` → `~/.claude/settings.json` (only if it has a `hooks` key) |
| Codex | `$CODEX_HOME/hooks.json` → `~/.codex/hooks.json` |
Explicit paths win over discovery:
```yaml
# your profile's cordis.patch.yml
- id: hooks-pack
name: dsh-hooks-pack
config:
claude:
configPath: D:/my-hooks/claude-hooks.json
codex:
configPath: D:/my-hooks/codex-hooks.json
```
## Supported hook points
Via the official bridges (command hooks only):
- Claude Code dialect: `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `Stop`, `SubagentStart`, `SubagentStop`
- Codex dialect: `PreToolUse`, `PostToolUse`, `SessionStart`, `UserPromptSubmit`, `Stop`
`deny` / `ask` decisions, blocking feedback, and `additionalContext` injection all work; see each bridge README for the exact per-event payload and output contract.
## Hook output format
Decisions must use Claude Code's **structured** form — top-level `permissionDecision` is ignored:
```json
{
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "deny",
"permissionDecisionReason": "blocked by policy X"
}
}
```
`hookEventName` must name the firing event (`PreToolUse`, `SessionStart`, …) or the event-scoped fields are discarded. Exit code 2 also blocks, with stderr as the reason.
## Starter pack
`examples/claude-hooks.example.json` ships two ready-made hooks:
- **guard-dangerous** (`PreToolUse` on shell tools): blocks `rm -rf`, force pushes, `Remove-Item -Recurse -Force`, disk formatting, fork bombs, …
- **audit-log** (`PostToolUse` on everything): appends every tool call to `~/.dsh-hooks-audit.jsonl`
Enable them:
```sh
# 1. copy the examples somewhere stable
xcopy /E /I \dsh-hooks-pack\examples %USERPROFILE%\dsh-hooks-examples\
# 2. point your hooks file at it
copy %USERPROFILE%\dsh-hooks-examples\claude-hooks.example.json %USERPROFILE%\.claude\hooks.json
# 3. edit that file, replacing with %USERPROFILE%\dsh-hooks-examples
```
## Config reference
| Key | Type | Default | Meaning |
|---|---|---|---|
| `autoDiscover` | boolean | `true` | Probe standard locations when no explicit path is given |
| `claude.configPath` | string | discovered | Explicit Claude Code config file |
| `claude.pluginRoot` | string | — | Replaces `${CLAUDE_PLUGIN_ROOT}` in commands |
| `claude.projectDir` | string | session cwd | Replaces `${CLAUDE_PROJECT_DIR}` and sets the env var |
| `claude.defaultTimeoutMs` | number | 600000 | Per-hook timeout when the hook sets none |
| `codex.configPath` | string | discovered | Explicit Codex config file |
| `codex.model` | string | — | Model name stamped on Codex payloads |
## Known limitations
Inherited from the official bridges: only shell-form command hooks run (`http`/`mcp_tool`/`prompt` handlers are skipped with a warning); config is read once at process load, so project-local `hooks.json` per-session discovery is not available yet; some newer Claude Code events are not mapped. See the bridges' READMEs for the complete lists.
## Compatibility
Tested against DeepSeek Harness `0.1.0-rc.7` with bridge packages `0.1.0-rc.7`. The dependency range also accepts `0.1.1-rc.1` for newer deployments.
## License
MIT
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。