git-diff

GitHub

通过直接调用 shell 执行 git diff 命令获取仓库差异文本,替代原有的 LLM 子代理模式,显著提升性能。支持多种模式如暂存区、工作树及文件列表,并处理空差异与错误情况。

src/opensquilla/skills/bundled/git-diff/SKILL.md opensquilla/opensquilla

Trigger Scenarios

需要快速获取当前代码变更内容 在自动化流程中检查提交或工作区状态

Install

npx skills add opensquilla/opensquilla --skill git-diff -g -y
More Options

Non-standard path

npx skills add https://github.com/opensquilla/opensquilla/tree/main/src/opensquilla/skills/bundled/git-diff -g -y

Use without installing

npx skills use opensquilla/opensquilla@git-diff

指定 Agent (Claude Code)

npx skills add opensquilla/opensquilla --skill git-diff -a claude-code -g -y

安装 repo 全部 skill

npx skills add opensquilla/opensquilla --all -g -y

预览 repo 内 skill

npx skills add opensquilla/opensquilla --list

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.",
    "description_zh": "将当前git diff(暂存区、工作树或暂存文件列表)捕获为文本。为无需LLM代理循环即可获取仓库diff的工作流提供直接的shell调用。"
}

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_DIFF on 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

  • f662be3 Current 2026-07-31 11:47
  • 7f72a32 2026-07-05 18:38

Same Skill Collection

src/opensquilla/skills/bundled/advanced-dubbing-studio/SKILL.md
src/opensquilla/skills/bundled/ai-video-script/SKILL.md
src/opensquilla/skills/bundled/audio-cog/SKILL.md
src/opensquilla/skills/bundled/awesome-webpage-image-download/SKILL.md
src/opensquilla/skills/bundled/awesome-webpage-research/SKILL.md
src/opensquilla/skills/bundled/AwesomeWebpageMetaSkill/SKILL.md
src/opensquilla/skills/bundled/cron/SKILL.md
src/opensquilla/skills/bundled/docx/SKILL.md
src/opensquilla/skills/bundled/filesystem/SKILL.md
src/opensquilla/skills/bundled/github/SKILL.md
src/opensquilla/skills/bundled/history-explorer/SKILL.md
src/opensquilla/skills/bundled/html-coder/SKILL.md
src/opensquilla/skills/bundled/html-to-pdf/SKILL.md
src/opensquilla/skills/bundled/http-fetch/SKILL.md
src/opensquilla/skills/bundled/latex-compile/SKILL.md
src/opensquilla/skills/bundled/memory/SKILL.md
src/opensquilla/skills/bundled/music-and-singing-studio/SKILL.md
src/opensquilla/skills/bundled/nano-banana-pro-openrouter/SKILL.md
src/opensquilla/skills/bundled/nano-banana-pro/SKILL.md
src/opensquilla/skills/bundled/nano-pdf/SKILL.md
src/opensquilla/skills/bundled/openrouter-video-generator/SKILL.md
src/opensquilla/skills/bundled/paper-abstract-author/SKILL.md
src/opensquilla/skills/bundled/paper-citation-planner/SKILL.md
src/opensquilla/skills/bundled/paper-experiment-stub/SKILL.md
src/opensquilla/skills/bundled/paper-outline-author/SKILL.md
src/opensquilla/skills/bundled/paper-preference-planner/SKILL.md
src/opensquilla/skills/bundled/paper-refbib-stub/SKILL.md
src/opensquilla/skills/bundled/paper-revision-author/SKILL.md
src/opensquilla/skills/bundled/paper-section-author/SKILL.md
src/opensquilla/skills/bundled/paper-source-curator/SKILL.md
src/opensquilla/skills/bundled/pptx/SKILL.md
src/opensquilla/skills/bundled/seedance-2-prompt/SKILL.md
src/opensquilla/skills/bundled/skill-creator-linter/SKILL.md
src/opensquilla/skills/bundled/skill-creator-proposals/SKILL.md
src/opensquilla/skills/bundled/skill-creator-smoke-test/SKILL.md
src/opensquilla/skills/bundled/srt-from-script/SKILL.md
src/opensquilla/skills/bundled/stack-trace-generic-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-go-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-js-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-python-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-rust-probe/SKILL.md
src/opensquilla/skills/bundled/subtitle-burner/SKILL.md
src/opensquilla/skills/bundled/swe-bench/SKILL.md
src/opensquilla/skills/bundled/text-file-read/SKILL.md
src/opensquilla/skills/bundled/title-card-image/SKILL.md
src/opensquilla/skills/bundled/video-merger/SKILL.md
src/opensquilla/skills/bundled/video-still-animator/SKILL.md
src/opensquilla/skills/bundled/voice-clone-lab/SKILL.md
src/opensquilla/skills/bundled/voice-conversion-studio/SKILL.md

Metadata

Files
0
Version
186b3c1
Hash
4d008f00
Indexed
2026-07-05 18:38

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-03 21:15
浙ICP备14020137号-1 $방문자$