Agent SkillsGoogleCloudPlatform/scion › git-operations

git-operations

GitHub

提供Git操作安全指南,涵盖工作区清理、Rebase陷阱及文件删除后的引用检查,确保Agent在任意工作模式下安全执行Git命令。

resources/platform_skills/git-operations/SKILL.md GoogleCloudPlatform/scion

Trigger Scenarios

执行git clean或reset操作前 进行rebase或处理PR文件删除冲突时 需要清理未跟踪文件或管理下载目录时

Install

npx skills add GoogleCloudPlatform/scion --skill git-operations -g -y
More Options

Non-standard path

npx skills add https://github.com/GoogleCloudPlatform/scion/tree/main/resources/platform_skills/git-operations -g -y

Use without installing

npx skills use GoogleCloudPlatform/scion@git-operations

指定 Agent (Claude Code)

npx skills add GoogleCloudPlatform/scion --skill git-operations -a claude-code -g -y

安装 repo 全部 skill

npx skills add GoogleCloudPlatform/scion --all -g -y

预览 repo 内 skill

npx skills add GoogleCloudPlatform/scion --list

SKILL.md

Frontmatter
{
    "name": "git-operations",
    "description": "Git safety and operational guidance for Scion agents. Covers working tree resets, rebase pitfalls, and general git behavior that agents should know regardless of workspace mode. For workspace-mode-specific git rules, see the git-sandbox skill."
}

Git Operations

General git safety rules for Scion agents. These apply regardless of workspace sharing mode — for mode-specific guidance (worktree isolation, shared-plain index hazards, clone-per-agent remotes), see the git-sandbox skill.

Working Tree Reset Safety

When cleaning a working tree, use git clean -fd, not git clean -fdx.

  • git clean -fd removes untracked files but respects .gitignore.scion/, agent state, and ignored directories survive.
  • git clean -fdx deliberately defeats .gitignore and deletes everything not tracked by git, including .scion/, downloads/, and any local state.

The -x flag is not a stronger clean — it is a different operation. Default to -fd; use -x only with a specific reason and after verifying nothing irreplaceable is in an ignored directory.

downloads/ is an inbox, not storage. Files downloaded into your container are visible only inside it and invisible to every other agent. Move anything worth keeping to /scion-volumes/scratchpad/ (shared across all agents) promptly. A downloads/ file that has not been drained to the scratchpad is one command from gone.

Rebase After Deletion

When a PR deletes a file, a rebase will tell you about edits to that file and will not tell you about new references to it.

A concurrent edit to the deleted file raises a modify/delete conflict and halts the rebase — that case is handled, because it demands a decision. A concurrent edit that adds a reference to the deleted file from a different file produces no conflict at all: git sees two disjoint changes, reports "Successfully rebased," and leaves a dangling reference.

After rebasing a deletion, grep for the deleted name. Any inbound-reference count taken before the rebase is stale by construction.

Version History

  • 0.1.0-dev Current 2026-08-20 01:53

Same Skill Collection

.scion/templates/web-dev/skills/chrome-devtools/SKILL.md
resources/platform_skills/git-sandbox/SKILL.md
resources/platform_skills/scion-agent-manage/SKILL.md
resources/platform_skills/scion-cli-operations/SKILL.md
resources/platform_skills/scion-messaging/SKILL.md
resources/platform_skills/scion-scheduler/SKILL.md
resources/platform_skills/team-creation/SKILL.md

Metadata

Files
0
Version
0.1.0-dev
Hash
6529354c
Indexed
2026-08-20 01:53

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 05:48
浙ICP备14020137号-1 $mapa de visitantes$