差异
- 作者仓库星标 330
- 许可证 MIT
- 作者仓库 claude-skill-registry
- 领域
- 数据
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @majiayu000 · MIT
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- Python >=3.6
- 检测到的文件与系统行为
-
- 只读
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# git-diff
Display git changes in GitHub-style unified diff format.
## Execution
Run the Python script to display formatted diff:
```bash
python3 scripts/github_diff.py [optional-path]
```
## Output Format
- **File headers**: Dark background with filepath
- **Line numbers**: Two columns (old | new)
- **Deletions**: Red background with `-` marker
- **Additions**: Green background with `+` marker
- **Context**: Neutral with both line numbers
- **Chunk markers**: Cyan `@@ -n,m +n,m @@` headers
## Sections
1. **Staged Changes** (`git diff --cached`) - shown first if present
2. **Unstaged Changes** (`git diff`) - working directory modifications
## Examples
```bash
# Show all changes
python3 scripts/github_diff.py
# Filter by path
python3 scripts/github_diff.py src/components/
```
## Requirements
- Python 3.6+
- Git installed and in PATH
- Terminal with ANSI color support
章节与文件索引
按说明文件中的顺序排列。
执行
输出格式
部分
要求
文件/命令 -> @@ -n,m +n,m @@ · git diff --cached · git diff · scripts/github_diff.py · src/components
内容校验值 -> e480e076b70f
当前原文的自动摘译,尚未人工审校。
执行
运行 Python 脚本以显示格式化的差异:
输出格式
文件头:带有文件路径的深色背景 行号:两列(旧 | 新) 删除:带有
-标记的红色背景 添加:带有+标记的绿色背景 上下文:两个行号均为中性部分
分阶段更改 (
git diff --cached) - 如果存在则首先显示未分阶段更改 (git diff) - 工作目录修改要求
Python 3.6+ Git 安装在 PATH 终端中,支持 ANSI 颜色