Agent Skills
› opensquilla/opensquilla
› git-diff
git-diff
GitHub直接调用 shell 获取 Git 差异文本,避免 LLM 循环开销。支持暂存、工作树及文件列表模式,无变更时返回 NO_DIFF,错误时退出码1,显著提升效率。
Trigger Scenarios
需要快速获取当前仓库代码差异
检查工作区或暂存区的变更内容
获取已暂存的文件路径列表
Install
npx skills add opensquilla/opensquilla --skill git-diff -g -y
SKILL.md
Frontmatter
{
"name": "git-diff",
"metadata": {
"requires": {
"bins": [
"git"
]
}
},
"entrypoint": {
"args": [
"--mode",
"{{ with.mode | default('cached_fallback_worktree') }}",
"--cwd",
"{{ with.cwd | default('.') }}"
],
"parse": "text",
"command": "python {baseDir}\/scripts\/git_diff.py",
"timeout": 30
},
"provenance": {
"origin": "opensquilla-original",
"license": "Apache-2.0"
},
"description": "Capture the current git diff (staged, working-tree, or staged file list) as text. Direct shell call for workflows that need repository diffs without an LLM agent loop."
}
git-diff (sub-skill)
Direct shell invocation that returns the current git diff as text.
Replaces sub-agent sub-Agent steps that just shell out to
git diff — order-of-magnitude faster (no LLM round-trip).
Modes
mode (with.mode) |
behaviour |
|---|---|
cached_fallback_worktree |
git diff --cached HEAD; falls back to git diff HEAD if staged diff is empty. Default. |
cached |
git diff --cached HEAD only |
worktree |
git diff HEAD only |
staged_files |
git diff --cached --name-only (path list) |
Output
- Non-empty diff: raw unified diff text on stdout.
- Empty (no changes): exits 0 with the literal
NO_DIFFon stdout so downstream meta-step prompts can short-circuit reviewers. - git not a repo / git error: exit 1, stderr carries the cause.
Fallback
If this skill is unavailable, callers should spawn sub-agent
with a git diff task — same output, ~10× the latency.
Version History
- 7f72a32 Current 2026-07-05 18:38


