Agent Skills › netalertx/NetAlertX › git-workflow

git-workflow

GitHub

规范Git操作,禁止擅自创建分支以防共享仓库状态冲突。默认直接提交至next_release分支而非PR流程。执行push前必须二次确认,并在任何变更命令前检查当前状态,确保协作安全。

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

Trigger Scenarios

用户请求创建新分支 用户请求推送代码到远程仓库 用户请求切换分支 涉及git checkout -b或branch命令的场景

Install

npx skills add netalertx/NetAlertX --skill git-workflow -g -y
More Options

Non-standard path

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

Use without installing

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.

Version History

  • cd1d0ed Current 2026-09-22 11:06

Same Skill Collection

.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

Metadata

Files
0
Version
fe29f5d
Hash
7d831f73
Indexed
2026-09-22 11:06

홈 - 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-28 11:27
浙ICP备14020137号-1