git-push-secondary-merge-primary-cn

git-push-secondary-merge-primary-cn is a skill for Claude Code, Codex from YangsonHung/awesome-agent-skills. It costs 36 tokens per session (1,284 once invoked), scanned A, original, MIT.

A guided Git workflow for pushing a working branch, merging it into a primary branch such as main or master, pushing both results, and returning to the working branch.

In plain words
What is it for?
Use it for a dev-to-main or develop-to-master handoff when the user wants both branches pushed. It does not cover force-pushing, rebasing, or ordinary single-branch pushes.
Why use it?
It helps synchronize development and release branches while checking branch names, conflicts, uncommitted changes, and remote state before acting.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for a dev-to-main or develop-to-master handoff when the user wants both branches pushed. It does not cover force-pushing, rebasing, or ordinary single-branch pushes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yangsonhung/awesome-agent-skills/git-push-secondary-merge-primary-cn
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add YangsonHung/awesome-agent-skills --skill git-push-secondary-merge-primary-cn
Clone the repo
git clone --depth 1 https://github.com/YangsonHung/awesome-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-push-secondary-merge-primary-cn

README.md
[![agentmods](https://agentmods.dev/badge/skills/yangsonhung/awesome-agent-skills/git-push-secondary-merge-primary-cn/github.svg)](https://agentmods.dev/skills/yangsonhung/awesome-agent-skills/git-push-secondary-merge-primary-cn)
Your own site
<a href="https://agentmods.dev/skills/yangsonhung/awesome-agent-skills/git-push-secondary-merge-primary-cn"><img src="https://agentmods.dev/badge/skills/yangsonhung/awesome-agent-skills/git-push-secondary-merge-primary-cn/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git-push-secondary-merge-primary-cn

Your own site · 80×15
<a href="https://agentmods.dev/skills/yangsonhung/awesome-agent-skills/git-push-secondary-merge-primary-cn"><img src="https://agentmods.dev/badge/skills/yangsonhung/awesome-agent-skills/git-push-secondary-merge-primary-cn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,284 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.01284
Opus 5 $0.00018 $0.00642
Sonnet 5 $0.00007 $0.00257
Haiku 4.5 $0.00004 $0.00128

Measured 12d ago against content hash 80a7530bc080, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

git-push-secondary-merge-primary-cn scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/zh-cn/git-push-secondary-merge-primary-cn/SKILL.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git 推送副分支并合并主分支

Overview

执行标准的双分支交接流程:在副分支完成工作并推送,再合并到主分支并推送,最后切回副分支。

  • 副分支:承载当前工作的分支,如 devdevelop 或其他集成分支。
  • 主分支:受保护的发布分支,如 mainmaster

这个流程适合需要同时推送副分支和主分支的发布同步场景,并尽量保留主分支上清晰的合并结果。

何时使用

当用户要求执行以下操作时使用本技能:

  • 推送工作分支后再合并到发布分支
  • 双分支同步发布流程,例如 devmaindevelopmaster
  • 在副分支完成功能后同步到主分支
  • 保留主分支上的清晰合并提交,同时不丢失副分支的提交历史

不要使用

以下场景不要使用本技能:

  • 单分支的提交/推送(使用普通的 commit + push 流程)
  • 强制推送、改写历史或 rebase 操作
  • 从 Git 历史生成汇总报告(请使用 git-weekly-report-cn
  • 评审代码变更(请使用 code-reviewerfrontend-code-review

使用说明

先按分支识别规则确定主分支和副分支,再按工作流程顺序执行。遇到分支名不明确、合并冲突、脏工作区或推送被拒绝且无法安全处理时,停止并说明阻塞原因,不要猜测执行。

分支识别

  1. 优先采用用户显式指定的分支名。
  2. 当用户说 devmain,但仓库实际使用 developmaster 时,先核对真实分支再选择。
  3. 优先通过 git symbolic-ref refs/remotes/origin/HEAD 识别主分支。
  4. 远端 HEAD 不可用时,优先选择已存在的 main,其次 master
  5. 当前分支若不是主分支,就将其视为副分支。
  6. 若当前已在主分支且未指定副分支,优先选择已存在的 dev,其次 develop
  7. 仍无法安全确定时,向用户询问主分支和副分支名称。

使用说明

严格执行以下工作流程,保留用户改动,并在分支、合并或推送条件不安全时停止。

工作流程

  1. 检查仓库状态。

    • 运行 git status --shortgit branch --show-currentgit remote -v
    • 确认工作区属于目标仓库。
    • 不得丢弃或回滚用户改动。
    • 按分支识别规则确定 <secondary_branch><primary_branch>
  2. 将工作切换到 <secondary_branch>

    • 已经在 <secondary_branch> 上则继续。
    • 当前在其他分支且工作区有未提交改动时,只有 Git 允许干净切换才执行;否则停下来向用户说明阻塞原因。
    • 当前在其他干净分支时,执行 git checkout <secondary_branch>git pull --ff-only origin <secondary_branch>
  3. 如果 <secondary_branch> 上有本地改动,先提交。

    • 使用 git add 暂存相关变更,除非用户要求更小的范围。
    • 生成符合 Conventional Commits 的提交信息:英文 type(scope): 前缀 + 冒号后接中文摘要。
    • 不允许使用 --no-verify
    • 钩子或校验失败时,先修复问题再提交。
    • <secondary_branch> 无本地改动,跳过提交直接进入推送步骤。
  4. 推送 <secondary_branch>

    • 执行 git push origin <secondary_branch>
    • 推送因远端更新而被拒绝时,先 git fetch 并查看再重试;除非用户明确要求,否则不执行强制推送。
  5. 合并到 <primary_branch>

    • 执行 git checkout <primary_branch>
    • 执行 git pull --ff-only origin <primary_branch>
    • <primary_branch> 未包含 <secondary_branch> 时,使用 git merge --no-ff <secondary_branch> -m "chore(<primary_branch>): 合并 <secondary_branch> 到 <primary_branch>" 保留合并提交。
    • 出现合并冲突时立即停止,列出需要用户解决的文件。

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 93 lines · 36 tokens per session scan A 80a7530bc080

Subscribe to this mod's changes

git-push-secondary-merge-primary-cn is a skill published in the GitHub repository YangsonHung/awesome-agent-skills (18 stars, last pushed 1mo ago), licensed MIT. It adds 36 tokens to every session and 1,284 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

app-release

Automates the release process for Skill Lake app, including version bumping, building, packaging, and publishing to GitHub and Homebrew.

emlog/skill-lake · 31 tokens

git-workflow

A guide for handling Git repository work safely, including status checks, branches, commits, pushes, pull requests, and rebasing. Git is a version-control system that records code changes and coordinates work between developers.

laolaoshiren/claude-code-skills-zh · 73 tokens

history-portability

Import Claude Code or Codex history and move complete CCAM datasets between machines. Use when rescanning provider history, importing a copied directory, uploading JSONL or archives, exporting a backup, restoring it idempotently, or verifying that tokens, workflows, runs, rules, and pricing survived.

hoangsonww/Claude-Code-Agent-Monitor · 63 tokens

release

CONTRIBUTOR TOOL - Cut a plugin release: bump plugin.json version, finalize CHANGELOG, update README if needed, gate on make ci, commit, tag vX.Y.Z, and create the GitHub release. Use when shipping a new plugin version. NOT distributed.

oliver-kriska/claude-elixir-phoenix · 60 tokens

changelog-rules

Shared changelog conventions and formatting rules referenced by /create-changelog and /update-changelog. Not typically invoked directly.

tobihagemann/turbo · 29 tokens

reply-to-pr-threads

Draft, confirm, and post replies to GitHub PR review threads. Handles per-category reply formatting, re-fetches thread resolution state so auto-resolved threads are skipped, and posts via GraphQL. Use when the user asks to "reply to PR threads", "post PR thread replies", or "draft PR reply messages".

tobihagemann/turbo · 71 tokens