git-push

GitHub

在提交后推送分支,通过检查状态确保安全。拒绝保护分支和未暂存更改的推送。处理推送拒绝时请求用户确认重基或强制操作,并报告详细结果。

.agents/skills/git-push/SKILL.md Terry-Mao/AICodingFlow

Trigger Scenarios

用户要求推送或发布分支 存在已提交的更改且用户希望推送到远程

Install

npx skills add Terry-Mao/AICodingFlow --skill git-push -g -y
More Options

Non-standard path

npx skills add https://github.com/Terry-Mao/AICodingFlow/tree/main/.agents/skills/git-push -g -y

Use without installing

npx skills use Terry-Mao/AICodingFlow@git-push

指定 Agent (Claude Code)

npx skills add Terry-Mao/AICodingFlow --skill git-push -a claude-code -g -y

安装 repo 全部 skill

npx skills add Terry-Mao/AICodingFlow --all -g -y

预览 repo 内 skill

npx skills add Terry-Mao/AICodingFlow --list

SKILL.md

Frontmatter
{
    "name": "git-push",
    "description": "Push committed branch work to the correct remote branch with minimal checks and no unsafe force pushes."
}

git-push

Use after commits exist and the user asks to push or publish the branch.

Inspect

Use one tool call for push state:

git status --short
git branch --show-current
git rev-parse --abbrev-ref --symbolic-full-name @{u}
git log --oneline @{u}..HEAD

If upstream lookup fails, prepare git push -u origin <branch> and use recent local commits only when the commit set is unclear.

Push

  • Refuse protected/shared base branches (main, master, develop, release branches) unless explicitly asked.
  • Dirty worktree changes are not pushed; report them and continue only when pushing existing commits is still clearly intended.
  • Use normal push so hooks run:
git push
git push -u origin <branch>

Rejections

If push is rejected, then fetch and inspect divergence. Ask before rebasing, merging, or using git push --force-with-lease. Never use plain git push --force unless the user explicitly requests that exact behavior.

Report current branch, upstream/remote branch, pushed commit hash, push result, and dirty changes that were not pushed.

Version History

  • e53c5ac Current 2026-07-24 11:35

Same Skill Collection

.agents/skills/bootstrap-issue-config/SKILL.md
.agents/skills/create-issue/SKILL.md
.agents/skills/create-pr/SKILL.md
.agents/skills/diagnose-ci-failures/SKILL.md
.agents/skills/git-branch/SKILL.md
.agents/skills/git-commit/SKILL.md
.agents/skills/git-worktree/SKILL.md
.agents/skills/pr-walkthrough/SKILL.md
.agents/skills/resolve-merge-conflicts/SKILL.md
.agents/skills/review-pr-local/SKILL.md
.agents/skills/review-spec-local/SKILL.md
.agents/skills/spec-driven-implementation/SKILL.md
.agents/skills/write-product-spec/SKILL.md
.agents/skills/write-tech-spec/SKILL.md
.github/skills/check-impl-against-spec/SKILL.md
.github/skills/create-product-spec/SKILL.md
.github/skills/create-tech-spec/SKILL.md
.github/skills/dedupe-issue-repo/SKILL.md
.github/skills/dedupe-issue/SKILL.md
.github/skills/implement-issue/SKILL.md
.github/skills/implement-specs/SKILL.md
.github/skills/product-change-report/SKILL.md
.github/skills/product-docs-sync/SKILL.md
.github/skills/product-wiki/SKILL.md
.github/skills/review-pr-repo/SKILL.md
.github/skills/review-pr/SKILL.md
.github/skills/review-spec-repo/SKILL.md
.github/skills/review-spec/SKILL.md
.github/skills/security-review-pr/SKILL.md
.github/skills/security-review-spec/SKILL.md
.github/skills/triage-issue-repo/SKILL.md
.github/skills/triage-issue/SKILL.md
.github/skills/update-dedupe/SKILL.md
.github/skills/update-pr-review/SKILL.md
.github/skills/update-triage/SKILL.md

Metadata

Files
0
Version
e53c5ac
Hash
73613c50
Indexed
2026-07-24 11:35

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-06 19:38
浙ICP备14020137号-1 $Гость$