YuanyuanMa03/cot-lint
给你的仓库做链式思维泄露检查——即AI助手在文档和注释中留下的会话记录残留。
Project Overview项目介绍
cot-lint is a linter that detects chain-of-thought leakage in repository prose, comments, and documentation, and ships a companion fixing skill called cot-trim. It flags content that only makes sense to someone who participated in the original authoring session, such as references to old PR discussions, dead design citations, and leftover planning notes. It works as an integrated plugin for DeepSeek Harness, can be manually added to Claude Code as a skill, and runs standalone on any repository or CI pipeline. To install it for DeepSeek Harness, run dsh plugin add cot-lint in your terminal. For standalone use, just run npx cot-lint to scan your repository, no local installation required beyond Node.js 20 or newer.
The typical workflow starts with a full repository scan to get a list of potential leakage points. You can add the --json flag to output machine-readable results for useful integration with CI or AI agents, the --ext flag to add extra file types like TypeScript or Python to scan line-by-line, and the --hidden flag to scan dot-directories like .agents/ that are normally skipped. This tool is designed for developers and teams that use AI coding assistants, as it helps keep documentation and comments clean, readable, and free of distracting leftover session content. It will not flag legitimate content like issue references, standard citations, or TODO comments that are still relevant.
cot-lint has no external dependencies beyond a supported Node.js version, and works on any operating system that can run Node.js 20 or newer. It has built-in support for both English and Chinese leakage patterns, and is released under the permissive MIT open source license, so you can use it freely for personal, commercial, or open source projects. You can add a cot-lint-ignore annotation to any line to suppress false positive findings, and the tool intentionally exempts common legitimate content like RFC references and TODO comments. First-run users can install the plugin to DeepSeek Harness to try the automatic fixing feature right away.
cot-lint 是一个用于检测代码仓库中思维链泄露问题的 linter 工具,同时提供了名为 cot-trim 的修复技能插件。它可以检测文档、注释、JSDoc 中残留的 AI 助手会话记录,这类引用和叙述只有参与过编写会话的人员才能理解,对后续读者只会造成干扰。该工具支持作为原生插件安装到 DeepSeek Harness 中,也支持 Claude Code 等其他常见的 AI 代理工具,还可以独立运行在任意 CI 流程中。
典型工作流中,开发者可以先运行 npx cot-lint 扫描仓库,获取所有思维链泄露点,也可以添加 --json 参数输出机器可读结果供 CI 或代理工具使用,添加 --ext 参数指定扫描额外的源代码文件,添加 --hidden 参数进入 .agents/ 这类点目录扫描。该工具适合日常使用 AI 辅助开发的团队和个人,能够帮助维护仓库文档和注释的整洁度,提升整体的代码可读性和可维护性。
该工具无额外依赖,仅需要 Node.js 20 及以上版本即可运行,支持中英文两种语言,使用 MIT 许可证开源,可免费用于商业和非商业项目。它不会误标记常见的标准引用、TODO 等有效内容,支持通过 cot-lint-ignore 标记忽略特定行,首次使用可以通过 dsh plugin add 命令安装到 DeepSeek Harness 方便体验自动修复功能。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:cot-lint(YuanyuanMa03/cot-lint)
仓库:https://github.com/YuanyuanMa03/cot-lint
本站详情页:https://www.yhbd.top/plugins/yuanyuanma03-cot-lint/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-08-15 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin add cot-lint
把 YuanyuanMa03/cot-lint 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
cot-lint
English | 中文
Lint your repo for chain-of-thought leakage — the session-transcript residue AI assistants leave in docs, comments, and JSDoc.
Your coding agent writes great code and leaks its thinking everywhere around it:
- // This PR adds a retry loop (decision 7) so the diff stays reviewable.
- // The manager used to serialize writes itself; it no longer does after v1.
- // The cast is safe — it simply narrows the union. Probably fine for now.
+ // Retries transient provider failures up to 3 times with jittered backoff.
+ // The shared coordinator serializes writes per session.
+ // The cast narrows a union already validated at the loader boundary.
None of the left column is wrong about the code. It is wrong about its reader: it argues with a reviewer who has left, cites a design session nobody can open, and narrates a change instead of stating behavior.
The one test
Could a reader at HEAD — with no access to any session transcript, PR thread, or uncommitted draft — resolve every reference and verify every claim?
If no, that passage is chain-of-thought leakage. cot-lint finds it.
Quick start
DeepSeek Harness — install the cot-trim fixing skill as a plugin:
dsh plugin add cot-lint
Any repo or CI — zero dependencies, Node ≥ 20:
npx cot-lint # scan the repo (Markdown and prose files)
npx cot-lint --json # machine-readable findings for CI or agents
npx cot-lint --ext ts,py # also scan source files line-by-line
npx cot-lint --hidden # descend into dot-directories such as .agents/
Exit codes: 0 clean · 1 findings · 2 usage error — drop it straight into CI.
What it detects
| Class | Example |
|---|---|
| dead design-session citation | (decision 7), design §4.7, phase tokens W3/T4, 设计稿 |
| stack/PR vantage | "this PR adds…", "a later PR in this stack" |
| change narration / version stamps | "used to", "no longer", "the old X", "the v1 refactor", "today", 旧版/不再 |
| review choreography | "Rejected in review:", "the reviewer confirmed", 上一轮评审 |
| reviewer-addressed justification | "the cast is safe — it simply…" |
| control-flow narration | "first we X, then we Y", "as you can see" |
| hedge / planning residue | "probably fine for now", "should be enough" |
| authoring-language slip | untranslated working-language fragments in the other language |
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
sunchaokun/PPT-Design-Skill
nexu-io/open-design
Devin-AXIS/iPolloWork
ysr666/dsh-vision-router
Anionex/dsh-vision-toolkit
EthanYoQ/Invoice-Downloader
zhaoolee/notes