lucky8197/dsh-git-hygiene

lucky8197★ 1TypeScript最后同步: 2026-08-15

在 GitHub 打开

DSH 插件:Git 卫生巡检——只读扫描已合并/过期分支、大文件、未跟踪文件与未提交修改,输出体检报告与清理建议,不自动删除任何东西。Git Hygiene Checker for DeepSeek Harness.

README 摘要

dsh-git-hygiene(Git 卫生巡检) Git Hygiene Checker for DeepSeek Harness. A read-only DSH plugin that inspects a repository's hygiene: merged-but-not-deleted branches, stale branches with no commits for months, oversized tracked files, untracked files, and uncommitted work — then outputs a health report with cleanup suggestions. It never deletes or modifies anything automatically. Install with: dsh plugin --profile web add "github:lucky8197/dsh-git-hygiene main" . 仓库用久了会"长胖":功能分支合并后没人删、几个月不动的老分支堆积、不小心提交了 几十 MB 的二进制、未跟踪文件散落一地。 dsh-git-hygiene 用 只读 git 命令 给仓库 做一次"体检",把这些问题量化成带清理建议的报告。 特性 维度 说明 发现类型 严重度 已合并分支 已合并到当前分支但未删除的分支( git branch --merged ) merged branch medium 过期分支 超过 N 天(默认 90)无提交的分支( for-each-ref committerdate) stale branch low 大文件 跟踪文件超过阈值(默认 5 MB),提示用 LFS/filter-repo 处理 large file low 未跟踪文件 git status --porcelain 的 ?? 条目 untracked low 未提交修改 工作区 dirty 状态( M / A / D 等) dirty worktree low 快速安装 工具用法 canonical JSON 配置(cordis 配置节) 安全边界(硬性要求) - 只执行白名单只读 git 子命令 ( src/git.ts WHITELIST 全量枚举:status --porcelain / branch --merged / for-each-ref / ls-files / count-objects -v / remote -v / rev-parse / log -1 / symbolic-ref);白名单外的一律拒绝(含 checkout / reset / clean / delete / push ); - 不自动删除/修改任何分…

在 GitHub 查看完整 README →
工具/开发dsh-plugin

分类