Back to search
dsh-unrestricted-catgirl
SkillGitHub
为 DeepSeek Harness(DSH)提供的 破甲插件+猫娘人格
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Checked today
Badge for your README
Markdown
[](/listings/hkcreeper55-alt--dsh-unrestricted-catgirl)HTML
<a href="/listings/hkcreeper55-alt--dsh-unrestricted-catgirl"><img src="/api/listings/hkcreeper55-alt--dsh-unrestricted-catgirl/badge.svg" alt="findsafeskills safety rating" /></a>Install
i
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
见 [INSTALL.md](./INSTALL.md)。安装前请先移除 `dsh-unrestricted` 与 `dsh-catgirl-plugin` / `dsh-catgirl-plugin-client`,避免 assistant-step 渲染器 以相同 priority 重复注册。
# GitHub 安装(仓库内已附带构建好的 lib/client.js) dsh plugin --profile web add github:<your-account>/dsh-unrestricted-catgirl # 本地安装(必须使用 file:,不要用裸路径或 link:) dsh plugin --profile web add file:.
安装后重启 `dsh web`,进入 `设置 → 插件 → 插件配置 → 破限 + 猫娘流水线`。
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
README.md · README · 154 lines
- # dsh-unrestricted-catgirl
- 为 DeepSeek Harness(DSH)提供的**固定流水线插件**:把
- [`dsh-unrestricted`](https://github.com/yexi-by/dsh-unrestricted) 与
- [`dsh-catgirl-plugin`](https://github.com/Freakz2z/dsh-catgirl-plugin)
- 合并为一个插件:
- ```text
- 用户输入
- → ① 破限提示词融合(system-prompt/assemble,生成前)
- → 模型按改写后的系统提示词正常生成(输出普通文本)
- → ② 猫娘风格本地渲染(最终展示前,0 token)
- → 展示给用户
- ```
- - **阶段 1(unrestricted)**:沿用原版的锚点校验、开关控制、多模式兼容逻辑。
- 支持 Standard / PTC / Cordis / Minimal 及子代理;关闭后提示词与 DSH 原版
- 逐字节一致。
- - **阶段 2(neko-renderer)**:只在显示层把普通回复加上「喵~」和颜文字。
- 会话日志保存模型原文,模型上下文零污染,猫娘 persona 不进入 system prompt。
- - **可选保留**:`catgirl-lite` 极短行为约束、`catgirl-economy` 工具裁剪 +
- `enable_tool` 渐进式披露(默认关闭)。
- - **Web 设置卡**:可独立开关「破限」和「猫娘渲染」,也可一键全开 / 一键全关。
- 开关保存在 `~/.dsh/settings.yaml`。
- ## 安装
- 见 [INSTALL.md](./INSTALL.md)。安装前请先移除 `dsh-unrestricted` 与
- `dsh-catgirl-plugin` / `dsh-catgirl-plugin-client`,避免 assistant-step 渲染器
- 以相同 priority 重复注册。
- ```sh
- # GitHub 安装(仓库内已附带构建好的 lib/client.js)
- dsh plugin --profile web add github:<your-account>/dsh-unrestricted-catgirl
- # 本地安装(必须使用 file:,不要用裸路径或 link:)
- dsh plugin --profile web add file:.
- ```
- 安装后重启 `dsh web`,进入 `设置 → 插件 → 插件配置 → 破限 + 猫娘流水线`。
- ## 开关与 settings.yaml
- 所有运行时开关都在 `unrestricted-catgirl` settings namespace:
- | 键 | 默认 | 作用 |
- | --- | --- | --- |
- | `unrestricted` | `false` | 破限提示词融合 |
- | `neko` | `false` | 猫娘本地渲染(Web UI + headless stdout) |
- | `nekoEscapeTilde` | `false` | 猫娘显示层把非代码文本中的 `~` 转义为 `\~`(如 `喵~ → 喵\~`),会话日志仍存原文 |
- | `lite` | `false` | 注入 `litePersona`(约 6 token 的行为约束,**不是猫娘 persona**) |
- | `litePersona` | `Be concise, friendly, and natural.` | lite 行为约束文本 |
- | `economy` | `false` | 工具裁剪 + `enable_tool` 渐进式披露 |
- | `economyAllow` | `[bash, read, write, edit, glob, grep, str_replace_editor, todo_write]` | 初始工具白名单 |
- | `economyEscalate` | `true` | 注册 `enable_tool` |
- | `headlessLibPath` | `$HOME/.dsh/profiles/node_modules/@deepseek-ai/dsh-headless/lib/index.js` | headless 渲染器加载路径 |
- 等价的手动配置:
- ```yaml
- unrestricted-catgirl:
- unrestricted: true
- neko: true
- nekoEscapeTilde: true # 展示层把 ~ 转义为 \~,日志保存原文
- lite: false
- economy: false
- ```
- ## 架构
- ```text
- dsh-unrestricted-catgirl
- ├── cordis.patch.yml bundle 层:只挂 node 半身(客户端由 dsh.client manifest 发现)
- ├── src/
- │ ├── node.js host 半身:assemble waterfall 融合 + minimal 遮蔽 +
- │ │ headless 渲染 + lite/economy + settings watch + RPC
- │ ├── rules.js 继承 dsh-unrestricted:锚点、EXECUTION_MODE_BLOCK、fuseSections
- │ ├── neko-core.js 纯函数 decorate/decorateLine(node 与 client 共用)
- │ ├── neko-renderer.js headless stdout 装饰器(同步 createRequire)
- │ └── client/
- │ ├── index.tsx 注册设置卡 + shadow assistant-step 渲染器
- │ ├── controller.ts settingsScope + RPC + 一键全开/全关
- │ ├── CombinedCard.tsx
- │ ├── NekoAssistantNode.tsx
- │ └── decorate.ts 转发 neko-core(tsdown 打进 bundle)
- ├── lib/client.js 构建产物(随仓库提交,GitHub 安装免构建)
- └── tests/ 规则/渲染/manifest 测试(node:test,无外部依赖)
- ```
- ### 阶段 1:提示词融合
- 完全复用 `dsh-unrestricted` 的机制:
- 1. 监听根 `system-prompt/assemble` waterfall(unscoped listener 通过 dsh-scope filter)。
- 2. `next()` 拿到原版 sections 后,用 `agentPresets.composedPreset(agent.ctx)` 识别 preset。
- 3. `fuseSections()` 校验身份 / persona / plan / PTC / structured-output 锚点,
- 通过后在 persona 后插入 `unrestricted:execution-mode` 段,并做三处定向追加。
- 4. `minimal` 的 complete persona 在 waterfall 之后才恢复,因此对 minimal agent
- 用 agent 作用域的同名 complete section 遮蔽;启用时 sweep 存量 agent。
- 5. 任意锚点失败:该次组装保持原版,设置卡显示具体问题;关闭开关时返回
- `next()` 原值,提示词与未安装插件时逐字节一致。
- ### 阶段 2:猫娘渲染
- - **Web UI**:shadow `conversation.chat.node` 的 `assistant-step`(priority -1),
- 只对 `block.text` 调 `decorate()`;reasoning / 图片 / 代码块按原渲染逻辑处理,
- 代码块不喵化。`neko` 关闭时以原文渲染。
- - **headless**:同步替换 `dsh-headless` 的 `internals.stdout`,只装饰最终打印;
- `web` profile 找不到 headless bundle 时自动跳过。
- - 两种渲染共用 `src/neko-core.js`,与上游 `decorate` 行为一致且幂等。
- ### 可选功能
- - **catgirl-lite**:以 order 0 注册一个独立 section(`catgirl-lite:persona`),
- 默认文本 6 token,只约束输出简洁度,**不注入猫娘 persona**。
- - **catgirl-economy**:agent 创建时 `ctx.tools.restrict({ allow })` 裁剪工具 schema,
- 并在 agent 作用域注册 `enable_tool` 按需解锁;解锁失败回滚旧白名单。
- ## 为什么猫娘 persona 不进 system prompt
- 把「喵~」写进提示词会让模型每次生成都重复 persona token,输出变啰嗦,还可能与
- 破限规则争抢提示词优先级。本插件把人格留在显示层:模型负责内容和任务,界面负责
- 猫娘风味,省 token 且不破坏破限效果。
- ## 开发
- ```sh
- pnpm install
- pnpm build # 生成 lib/client.js(浏览器半身)
- pnpm typecheck # 需要同级 deepseek-harness checkout 提供类型 paths
- pnpm test # 纯 node:test,不依赖 @deepseek-ai 包
- ```
- `tests/rules.spec.mjs` 与 fixtures 继承自 `dsh-unrestricted`,用于锁定
- Standard / PTC / Cordis / Minimal / plan / 子代理的锚点与融合不变量。
- ## 与上游的关系
- - `src/rules.js`、`tests/rules.spec.mjs`、`tests/fixtures/` 与
- `THIRD_PARTY_NOTICES.md` 继承自
- [`dsh-unrestricted`](https://github.com/yexi-by/dsh-unrestricted)(MIT)。
- - 猫娘渲染、lite、economy 逻辑继承自
- [`dsh-catgirl-plugin`](https://github.com/Freakz2z/dsh-catgirl-plugin)(MIT),
- 见 `LICENSE.catgirl`。
- ## 已知限制
- - 破限只覆盖 DSH 自己生成的提示词;模型平台 / 网关 / 宿主环境的更高优先级规则
- 不受控制。
- - `dsh-unrestricted` 的锚点对应当前 DSH master。升级 DSH 后若锚点变化,对应模式
- 会自动保持原版并在设置卡提示,需要重新抓取锚点并更新 `src/rules.js`。
- - headless 渲染器要求 headless profile 里存在 `@deepseek-ai/dsh-headless`。
- - `economy` 会改变工具目录,与 PTC / 结构化子代理等依赖特定工具 schema 的模式
- 同时使用前请先验证。
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.