Agent Skills › netalertx/NetAlertX › git-workflow

git-workflow

GitHub

规范Git操作行为,禁止擅自创建分支,默认直接提交至next_release分支。执行任何改变共享状态的Git命令前需确认当前状态,推送前必须获得用户明确许可,防止因多终端并发导致的状态冲突与失败。

.gemini/skills/git-workflow/SKILL.md netalertx/NetAlertX

触发场景

需要创建新Git分支时 准备执行git push命令时 执行可能改变仓库状态的Git命令前

安装

npx skills add netalertx/NetAlertX --skill git-workflow -g -y
更多选项

非标准路径

npx skills add https://github.com/netalertx/NetAlertX/tree/main/.gemini/skills/git-workflow -g -y

不安装直接使用

npx skills use netalertx/NetAlertX@git-workflow

指定 Agent (Claude Code)

npx skills add netalertx/NetAlertX --skill git-workflow -a claude-code -g -y

安装 repo 全部 skill

npx skills add netalertx/NetAlertX --all -g -y

预览 repo 内 skill

npx skills add netalertx/NetAlertX --list

SKILL.md

Frontmatter
{
    "name": "git-workflow",
    "description": "Read before running any git command that changes branch state (checkout -b, branch, push) in this repo. The default workflow is commit-and-push directly to next_release, not a feature-branch\/PR flow - never create a branch without asking first."
}

Git Workflow

Never create a branch without asking first

Don't run git checkout -b <new-branch>, git branch <new-branch>, or anything else that creates a new branch, unless the user has explicitly said to. This applies even when a task sounds like it implies a branch-and-PR flow (e.g. "prep a PR") — ask first rather than assuming that's the intended workflow here.

Why: this repo's working tree is not necessarily an isolated checkout. The user may have their own terminal open on the exact same repo (e.g. a NAS/server shell alongside this session's working directory) at the same time. Switching branches changes shared repository state — a git checkout -b run from one place silently changes what git push/git status does from every other place touching the same repo, which has caused real, confusing failures (a git push from the user's own terminal failing with "no upstream branch" because this assistant had switched branches without saying so).

Default: commit and push directly to next_release

Absent other instructions, work lands on next_release directly — commit there, git push targets origin next_release. Don't invent a feature-branch/PR workflow unless asked for one.

Confirm before every push

Ask for explicit confirmation immediately before running git push, even to the default next_release target. Don't fold a push into a larger task silently — surface it as its own step and wait for a go-ahead.

Before any git command that changes shared state

Run git status and git branch --show-current first, and don't assume the branch you last left the repo on is still checked out — another process/terminal may have changed it.

版本历史

  • cd1d0ed 当前 2026-09-22 11:06

同 Skill 集合

.claude/skills/database-patterns/SKILL.md
.claude/skills/git-workflow/SKILL.md
.claude/skills/install-scripts/SKILL.md
.claude/skills/plugin-development/SKILL.md
.claude/skills/plugin-readme/SKILL.md
.claude/skills/plugin-review/SKILL.md
.claude/skills/pr-analysis/SKILL.md
.claude/skills/prd-writing/SKILL.md
.claude/skills/scan-pipeline/SKILL.md
.claude/skills/skill-hygiene/SKILL.md
.claude/skills/testing-workflow/SKILL.md
.claude/skills/ux-design-patterns/SKILL.md
.gemini/skills/database-patterns/SKILL.md
.gemini/skills/devcontainer-management/SKILL.md
.gemini/skills/install-scripts/SKILL.md
.gemini/skills/logging-standards/SKILL.md
.gemini/skills/mcp-activation/SKILL.md
.gemini/skills/plugin-review/SKILL.md
.gemini/skills/pr-analysis/SKILL.md
.gemini/skills/prd-writing/SKILL.md
.gemini/skills/project-navigation/SKILL.md
.gemini/skills/scan-pipeline/SKILL.md
.gemini/skills/settings/SKILL.md
.gemini/skills/skill-hygiene/SKILL.md
.gemini/skills/skills-index/SKILL.md
.gemini/skills/testing-workflow/SKILL.md
.gemini/skills/ux-design-patterns/SKILL.md
.github/skills/api-development/SKILL.md
.github/skills/authentication/SKILL.md
.github/skills/code-standards/SKILL.md
.github/skills/database-patterns/SKILL.md
.github/skills/database-reset/SKILL.md
.github/skills/devcontainer-configs/SKILL.md
.github/skills/devcontainer-services/SKILL.md
.github/skills/devcontainer-setup/SKILL.md
.github/skills/docker-build/SKILL.md
.github/skills/docker-prune/SKILL.md
.github/skills/git-workflow/SKILL.md
.github/skills/install-scripts/SKILL.md
.github/skills/logging-standards/SKILL.md
.github/skills/mcp-activation/SKILL.md
.github/skills/plugin-readme/SKILL.md
.github/skills/plugin-review/SKILL.md
.github/skills/plugin-run-development/SKILL.md
.github/skills/pr-analysis/SKILL.md
.github/skills/prd-writing/SKILL.md
.github/skills/project-navigation/SKILL.md
.github/skills/sample-data/SKILL.md
.github/skills/scan-pipeline/SKILL.md

元信息

文件数
0
版本
9ad51ce
Hash
7d831f73
收录时间
2026-09-22 11:06

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-03 22:36
浙ICP备14020137号-1