# @dlhck/strip-clanker-attribution 中文文档

规范地址：https://npmcn.com/package/%40dlhck/strip-clanker-attribution/

版本：1\.0\.1
npm 元数据更新时间：2026-08-21T12:08:05.303Z
中文译文更新时间：2026-11-12T12:43:02.394Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40dlhck/strip-clanker-attribution
原文对照：https://npmcn.com/package/%40dlhck/strip-clanker-attribution/?lang=original
项目主页：https://github.com/dlhck/strip-clanker-attribution#readme
源码仓库：https://github.com/dlhck/strip-clanker-attribution

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：10 kB，5 个文件
- 模块格式：ES Module
- TypeScript 类型：未声明
- Node.js 要求：\>=18
- 运行依赖：0 个
- 首次发布：2026-08-21T12:03:48.831Z
- 最新版本发布：2026-08-21T12:08:04.919Z
- 近 30 天下载量：6752（2026-10-13 至 2026-11-11，npm 官方下载统计）
- 已发布版本数：2（近 12 个月 2 个）

## 中文简介

脱去Cursor, Claude, 和 Codex 属性 从承诺消息。 为胡士诚所造-msg钩.

## 安装

```sh
npm install @dlhck/strip-clanker-attribution
```

也可以使用：`pnpm add @dlhck/strip-clanker-attribution`、`yarn add @dlhck/strip-clanker-attribution`、`bun add @dlhck/strip-clanker-attribution`

## README

# 脱衣舞女

脱去Cursor, Claude, 和 Codex 属性 从承诺消息。 建于胡同 `commit-msg` 钩子.

编码员喜欢在他们的作品上签字. 这个工具在行刑地之前移除了那个签名,所以你的历史保持干净,承诺永远不会被它所期望的拖车窒息.

它删除:

-   例如,代理联合作者拖车 `Co-authored-by: Cursor <cursoragent@cursor.com>` 或者说 `Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>`人类合著者留下来.
-   分配拖车,例如 `Made-with: Cursor`, (中文(简体) ), `Generated-by: Claude Code`,以及 `Codex-Session-Id: ses_123`。 。 。 .
-   签名线类 `🤖 Generated with [Claude Code](https://claude.com/claude-code)`。 。 。 .

它保留了其他一切,包括仅提及这些工具的正文.

## 安装

```sh
npm install --save-dev @dlhck/strip-clanker-attribution
```

## 使用Husky语

包裹只装了脱衣舞剧本 汝回宝所出胡同所出所出之所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出. 如果Husky已经设置了,从repo根中把它接入:

```sh
npx strip-clanker-attribution-init
```

这个 `npx strip-clanker-attribution "$1"` 在顶端 `.husky/commit-msg`,在承诺 或其他任何读取消息。 运行它两次改变什么。 没有 `.husky` 目录停止并告诉你运行 `npx husky init` 先说.

或以手相加一行为相

```sh
npx strip-clanker-attribution "$1"
bunx commitlint --edit "$1"
```

钩子重写承诺消息文件就位,所以在看到被清除的消息后,任何信息都会被重写. 这对 `git commit`, (中文(简体) ), `git merge`, (中文(简体) ), `git revert`,以及任何其它命令 `commit-msg` 钩.

## 国 际

```sh
strip-clanker-attribution <commit-msg-file>
```

重写文件到位 。 如果没有给出文件,则退出非零.

## 程序使用

```js
import { stripAiCommitAttribution } from '@dlhck/strip-clanker-attribution';

const clean = stripAiCommitAttribution(rawCommitMessage);
```

函数将完整承诺消息作为字符串,在没有归属行的情况下返回. 它保留了原来的行尾并倒塌了清除留下的空白行.

## 所需资源

节点.js 18或后. 无相依相.

## 释放

发布由标签驱动,并用 npm 发布 [值得信赖的出版](https://docs.npmjs.com/trusted-publishers) (OIDC) (英语). 没有 npm 令牌存储在任何地方 。 一次性设置: 在 npmjs.com 上, 打开软件包设置并添加 GitHub Actions 作为此寄存器的可信任的发布器 `release.yml` 工作流程.

然后,从干净的 `main`数字 :

```sh
npm run release:patch   # or release:minor / release:major
```

运行测试, 撞击版本, 承诺, 标记 `vX.Y.Z`并推来推去。 这个 `release` 工作流程验证标签匹配 `package.json`,以出处发布至npm,并创建了"GitHub"发行.

## 许可证

麻省理工学院

## 常见问题

### @dlhck/strip-clanker-attribution 是什么？

脱去Cursor, Claude, 和 Codex 属性 从承诺消息。 为胡士诚所造-msg钩\.

### 如何安装 @dlhck/strip-clanker-attribution？

在项目目录运行 npm install @dlhck/strip-clanker-attribution，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 strip-clanker-attribution、strip-clanker-attribution-init，可以用 npx strip-clanker-attribution 直接运行。

### @dlhck/strip-clanker-attribution 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/dlhck\_\_strip-clanker-attribution 是否存在。

### @dlhck/strip-clanker-attribution 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @dlhck/strip-clanker-attribution 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=18。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @dlhck/strip-clanker-attribution 可以商用吗？

@dlhck/strip-clanker-attribution 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @dlhck/strip-clanker-attribution 的下载量有多少？

根据 npm 官方下载统计，@dlhck/strip-clanker-attribution 在 2026/10/13 – 2026/11/11 这 30 天内被下载 6,752 次，日均约 225 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @dlhck/strip-clanker-attribution 还在维护吗？

最新版本 1\.0\.1 发布于 2026/08/21（2 个月前）；至今共发布 2 个版本，其中过去 12 个月发布了 2 个；首次发布于 2026/08/21。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

