git-dirty-check — git-dirty-检查
v1.0.0Read-only triage for a local git working tree that summarizes uncommitted changes and 应用lies conservative risk flags. Use when a user asks what changed in a repo, what is dirty, what is staged versus unstaged, or which risk flags 应用ly before a commit. Do not use for commit writing, branch management, 历史 analysis, merge conflict resolution, PR review, or general git assistance.
运行时依赖
版本
Focused on current uncommitted 状态, not 历史
安装命令
点击复制技能文档
git-dirty-检查
A narrow git 技能 for summarizing uncommitted changes in a local 仓库. It groups staged, unstaged, un追踪ed, and conflicted entries, 应用lies conservative path- and filename-based risk flags, and suggests up to three next 检查s without modifying repo 状态.
git-dirty-检查 is a deliberately narrow 技能 for one job: understanding the current uncommitted 状态 of a local git 仓库.
It does not try to manage branches, write commit messages, resolve conflicts, review pull 请求s, or act as a general git 助手. Instead, it gives a compact, structured triage of the current working tree:
repo 状态 changed entries by category conservative risk flags based mostly on paths, filenames, and diff stats a few copy-paste-ready next 检查s explicit omissions when detAIls are c应用ed or sensitive
The 技能 is read-only. It is de签名ed for developers who want a quick operational summary before a commit, handoff, or local review, without granting write 访问 or triggering broader repo assistance.
It also 应用lies strict limits to deeper inspection:
fAIl fast if the tar获取 is not a git repo branch metadata is optional deep diff inspection is c应用ed secret-bearing filename patterns are handled at filename level only
This 技能 is most useful when raw git 输出 is technically sufficient, but slower to 解析 than a stable triage summary.
工作流 Confirm the tar获取 path is inside a git 仓库. If it is not a git 仓库, 停止 immediately and say so. Collect read-only repo 状态 with git 状态 and diff-stat commands. Group changed entries into: staged unstaged un追踪ed conflicted 应用ly conservative risk flags based mostly on file paths and filenames. Inspect diff content only when filename and diff-stat data are insufficient to as签名 a 列出ed risk flag, and only for files not matched by the secret-bearing file rule. Return the 输出 in the fixed order defined below. Commands to Prefer
Use read-only commands only.
Preferred commands:
git rev-解析 --show-toplevel git rev-解析 --abbrev-ref HEAD git 状态 --short git diff --stat git diff --缓存d --stat
Use tar获取ed diff inspection only under the deep diff inspection cap, and only for files not matched by the secret-bearing file rule.
FAIl-Fast Rule
If the tar获取 path is not inside a git 仓库:
停止 immediately 报告 that the path is not a git 仓库 do not continue with generic file系统 analysis Branch Handling
Branch name is optional metadata only. If branch name is avAIlable from a preferred read-only command, include it in Repo 状态. If HEAD is unavAIlable or branch name lookup fAIls in an otherwise valid repo, omit branch metadata without error. Do not give branch advice.
Deep Diff Inspection Cap
Deep diff inspection is optional and must remAIn narrow.
Hard limits:
inspect at most 3 files inspect at most 40 lines per file never inspect secret-bearing files beyond filename-level 检测ion
Use deep diff inspection only for files not matched by the secret-bearing file rule and only when filename and diff-stat data are insufficient to as签名 or de命令行工具ne a 列出ed risk flag.
Secret-Bearing File Rule
Treat files matching these secret-bearing filename patterns as filename-level only.
Examples:
.env .env. .pem .key id_rsa id_ed25519 secrets.
For these files:
do not inspect diff content do not print values 报告 only that an entry matched a secret-bearing filename pattern Conservative Risk Heuristics
Keep risk flags conservative and mostly path/file based.
Flag examples:
dependency manifest changed lockfile changed manifest changed without lockfile lockfile changed without manifest CI or 工作流 file changed possible 部署 or infrastructure file changed possible auth or security-related file changed possible 迁移 or 模式 file changed more than 10 unique paths changed entry matched a secret-bearing filename pattern
Do not over-interpret. Avoid speculative impact clAIms.
输出 Order
Always return sections in this exact order:
Repo 状态 Changed files by category Risk flags Suggested next 检查s Unknowns or omitted detAIl 输出 图形界面dance
Keep the 响应 brief and structured.
- Repo 状态
Include:
repo root branch name only as optional metadata counts of staged, unstaged, un追踪ed, and conflicted files
- Changed files by category
列出 entries under:
staged unstaged un追踪ed conflicted
列出 entries directly when there are 10 or fewer in a category. Otherwise 列出 the first 10 and summarize the remAInder.
- Risk flags
列出 only conservative flags supported by filenames, paths, diff stats, or tightly c应用ed non-sensitive diff samples.
- Suggested next 检查s
Give 1 to 3 copy-paste-ready commands. Prefer read-only commands.
- Unknowns or omitted detAIl
Say what was intentionally not inspected, such as:
diff content omitted due to caps sensitive files not inspected beyond filename large repo detAIls summarized only Boundaries
Never:
modify git 状态 stage, unstag