git-workflows skill
✓ DoğrulandıConventional commits, PR yönetimi, release note oluşturma ve GitHub Actions hata ayıklama dahil olmak üzere git teslimat görevlerini otomatikleştirir.
- GitHub yıldızları
- 1.164
- Dosyalar
- 3
- Son commit
- 11 Kas 2026
- Lisans
- MIT
- İzin verilen araçlar
- —
git-workflows skill ne işe yarar?
Conventional commits, PR yönetimi, release note oluşturma ve GitHub Actions hata ayıklama dahil olmak üzere git teslimat görevlerini otomatikleştirir.
Özet, skill'in SKILL.md dosyasından oluşturuldu.
git-workflows skilli hakkında
Bu SKILL, karmaşık ortamlarda çalışan geliştiriciler için git teslimat görevlerini otomatikleştirmeyi ve depo iş akışlarını yönetmeyi sağlar. Yerel komut şablonlarını; conventional commits, güvenli branching ve pull request yönetimi için yeniden kullanılabilir iş akışlarına dönüştürür. Bir agent bu SKILL'i yüklediğinde, git geçmişinden release note oluşturma, main üzerinden versiyon yayınlama ve GitHub Actions hatalarını izole worktree'lerde düzeltmeye çalışarak ele alma gibi yapılandırılmış adımları yürütebilir.
SKILL, tutarlı bir yürütme sağlamak için references/source-commands.md dosyasındaki tek doğruluk kaynağına (source of truth) dayanır. gh api ve git log kullanarak halka açık pull request'lerden dahili referansları temizlemek veya squash merge'ler nedeniyle çakışan stacked pull request'leri kurtarmak gibi yaygın depo zorluklarını yönetmek için özelleşmiş mantık içerir. Ayrıca, stash yerine patch ve git worktree kullanarak kişisel commit'lenmemiş değişiklikleri paylaşılan, kirli bir workspace'ten izole etme yöntemi sunar. Bu, geliştiricilerin birden fazla commit'lenmemiş düzenleme içeren ortamlarda çalışırken bile temiz branch'ler sürdürmesini sağlar.
Bir agent bununla neler yapabilir
- 1Conventional commit iş akışlarını otomatikleştirmekBir agent, conventional-changelog stillerini takip eden standartlaştırılmış bir commit süreci yürütebilir.
- 2Hatalı CI build'lerini incelemek ve düzeltmekSKILL, en son başarısız olan GitHub Actions workflow'unu analiz edebilir ve izole bir worktree içinde düzeltme yapmaya çalışabilir.
- 3Paylaşılan workspace'lerde değişiklikleri izole etmekMevcut workspace başka kişilerin düzenlemelerini içerdiğinde, commit'lenmemiş çalışmaları temiz bir branch'e taşıyabilirsiniz.
Skill'in SKILL.md dosyasından yazılmıştır. Her kullanım durumu oradaki bir alıntı ile kontrol edilir.
git-workflows skill nasıl kurulur
Her komut, skill klasörünü istemcinin skills dizinine kopyalar. Yüklemek için istemciyi yeniden başlatın veya yeni bir oturum başlatın.git-workflows skill'ini Claude Code uygulamasına kur
~/.claude/skills/git-workflows/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/git-workflows ~/.claude/skills/git-workflowsgit-workflows skill'ini Claude Code (project) uygulamasına kur
.claude/skills/git-workflows/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/git-workflows .claude/skills/git-workflowsgit-workflows skill'ini Codex uygulamasına kur
~/.agents/skills/git-workflows/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/git-workflows ~/.agents/skills/git-workflowsgit-workflows skill'ini Gemini CLI uygulamasına kur
~/.gemini/skills/git-workflows/SKILL.md
$ npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/git-workflows ~/.gemini/skills/git-workflowsgit-workflows skill'ini Claude.ai uygulamasına kur
npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/git-workflows git-workflows && zip -r git-workflows.zip git-workflows # claude.ai → Customize → Skills → + → Create skill → Upload a skill → git-workflows.zip
Otomatik kontroller
Çalıştırıldı 15 Kas 2026Tam rapor →Otomatik kontrollerimizi geçti. Bu bir güvenlik denetimi değil: bir ajanın çalıştırmasına izin vermeden önce betikleri okuyun. Kontroller nasıl çalışır · Daha fazla puan için nelerin düzeltileceği
- Kaynak deposu bağlantılı ve erişilebilirtencentcloudbase/cloudbase-ai-toolkit/skills/git-workflows is public and reachablegithub.com/tencentcloudbase/cloudbase-ai-toolkit/tree/HEAD/s ↗Geçti
- Açık kaynak lisansı (OSI)MITspdx.org/licenses/MIT.html ↗Geçti
- Son bir yıl içinde commit veya sürüm mevcutLast commit 2026-11-11github.com/tencentcloudbase/cloudbase-ai-toolkit/commits ↗Geçti
- Betiklerde indir-çalıştır veya kimlik bilgisi hırsızlığı yokNo scripts in the skill folderGeçti
- SKILL.md içinde gizli talimat yokNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/tencentcloudbase/cloudbase-ai-toolkit/blob/HEAD/s ↗Geçti
- Önceden izin verilen araçlar sınırlıNo pre-approved tools; the agent asks before using onegithub.com/tencentcloudbase/cloudbase-ai-toolkit/blob/HEAD/s ↗Geçti
- SKILL.md, Agent Skills biçimine uyuyorthe description does not say when to use the skillgithub.com/tencentcloudbase/cloudbase-ai-toolkit/blob/HEAD/s ↗Bulgu
SKILL.md
GitHub'da görüntüleGit Workflows (from local commands)
This skill turns the repo's former local command templates into reusable git delivery workflows.
When to use this skill
Use this skill when the user asks to:
- run a commit workflow (conventional-changelog style)
- push changes with safe branching and open a PR
- generate release notes from git history / GitHub context
- publish a version from
main(including bilingual README Recent updates on minor bumps) - analyze the latest failed GitHub Actions workflow, attempt a fix in an isolated worktree, and submit a PR
- move your own uncommitted changes onto a clean branch when the current workspace also holds someone else's edits
- check IDE icon configuration consistency across document components and source files
Source of truth
All detailed steps and constraints live in:
references/source-commands.md
This skill describes how to apply them consistently across agents/editors without duplicating implementation details.
Execution rules
- Read the requested command template from
references/source-commands.md. - Follow it as workflow steps, not as a loose summary.
- Keep actions safe by default:
- avoid destructive git operations unless explicitly requested
- avoid committing secrets
- keep changes minimal and localized
- If a workflow implies external side effects (push/PR/release), request explicit confirmation right before performing the side effect.
Repo-specific gotchas (CloudBase-MCP)
- Sync dependencies before building on
main. A stalenode_modulesshows up as a type error in code that is actually correct (seen:@cloudbase/manager-node5.8.6 installed vs 5.8.8 locked →Property 'ExternalStorage' does not exist on type 'CreateEnvParams'). Verify withnpm pack <pkg>@<locked-version>and read the.d.tsbefore touching code. pnpm installfails inside the sandbox withERR_PNPM_CODEBUDDY_BROKER_DENY(symlink ENOENT), and the failed run deletes the package directory that was previously there. Re-run the same command with sandbox disabled before concluding anything about the build.npm run buildsucceeds even when the last step is blocked. The build'srm -rf dist/typesis refused by the safe-delete hook (325 files > threshold), so the log ends with aSAFE_DELETE_BULK_CONFIRM_REQUIREDline anddist/types/is left behind. Judge the build by whether webpack printedERROR in, not by that trailing message.- Release-note scope is
git log <previous-tag>..HEAD, including merge commits. A PR number lower than the current version does not mean it already shipped — PRs often merge after the tag that "should" have contained them. CHANGELOG.md's## Unreleasedis not rotated on release in this repo; publish a GitHub Release and leave the changelog alone unless asked.- Version bump surface:
mcp/package.json+config/source/**skill versions (node scripts/sync-skill-versions.mjs --version X.Y.Z) +config/.claude/skillsmirror (npm run sync:claude-skills-mirror) + optional README bullets (patch: only for clearly user-visible capability, and bothREADME.mdandREADME.zh-CN.md, verified withnpm run check:readme-sync).
Redacting internal references from a pushed PR
Public-repo PR metadata — the title, the body, each commit headline, each commit message — is as public as the diff, yet it never appears in the diff, so no file-layer guard covers it. npm run check:internal-refs enforces this in CI (see internal-docs-guard.yml). When a reference has already been pushed, fix it in place:
- Enumerate every source before editing anything.
gh pr view <n> --json commitstruncates headlines — read messages from git instead (git log --format='%s%n%b' origin/main..<branch>) and the body viagh api repos/<owner>/<repo>/pulls/<n> --jq .body. Body and commit messages are separate fixes; doing only one is the usual miss. - Amend the message, then prove nothing else moved:
git commit --amend -F -, followed bygit diff --stat <old-sha> HEAD— it must be empty. - Force-push with
--force-with-lease. The repo rule says "no--force", but rewriting an already-pushed message has no alternative; the lease form still refuses to clobber a concurrent update. - Rewrite the body with
gh pr edit <n> --body-file -. - Clear local-only commits carrying the same problem: back up first (
git diff > /tmp/residual.patch), thengit reset --hard origin/main. The content is normally already in the PR it was split out of, so nothing is lost — verify each file is covered by a branch before resetting.
A --force-with-lease push re-triggers CI, and this repo's Publish MCP Package to pkg.pr.new job runs live cloud integration tests that flake on timeouts (seen: cloud-function create/call at 60s). Read the failed test name before assuming the rewrite broke something — a message-only amend cannot.
Recovering a stacked PR whose base was squash-merged
When PR B is stacked on branch A (base = A's branch) and A is squash-merged into main, A's commits on main get new shas. A's branch is no longer an ancestor of main, but B's base pointer still points at it — so B turns CONFLICTING even though nothing in it changed. Any PR merged into A's branch in the meantime (a deeper stack) makes the collision certain.
- Pre-flight the conflict set before touching anything:
git merge-tree --write-tree <A's-branch> <B's-branch>lists the conflicting paths directly. Cheap, and it tells you which files need a decision. - Rebase onto
main, dropping the already-merged commit:git rebase --onto origin/main <A's-original-commit>. Dropping it is the point — its content is onmain, and replaying it would re-apply an already-merged change. Do not rebase onto A's stale branch. - Resolve by file type (these three recur):
CHANGELOG.md— keep both sides; bullet order is irrelevant. Re-align blank-line spacing if the merge changed it.package.json— take the union; the addedscriptsentries come from different PRs and almost never truly conflict.config/source/editor-config/compat-baseline.json— takemain's side (git checkout --oursduring rebase), then recompute after the rebase finishes withnode scripts/update-compat-baseline.mjs. Sanity check: the recomputed diff should match the original commit's line count (a version bump touching 3 skills produced 23±, i.e. the same 46 lines).
- Fold the recomputed baseline into the commit that caused it —
git commit --fixup=<sha>thenGIT_SEQUENCE_EDITOR=true git rebase -i --autosquash <main-sha>. It belongs to the version bump, not a standalone commit.git commit --fixupsometimes printsnothing to commitand still squashes correctly afterwards — judge bygit log, not that message. - Retarget the base and rewrite the description:
gh pr edit <n> --base main; the PR now carries the whole stack, so its title and body must cover every commit in it, not just the top one. - Verify on the rebased content, not just by "no conflict markers": run the version check, the compat diff, and the unit tests. If the PR adds a CI gate, running that gate against
origin/mainon this branch is the strongest available check — it exercises the gate against real input.
Trap: a paths-filtered workflow can silently not run at all
After a force-push (synchronize) while the base was still the stale stacked branch, the workflows that carry a paths: filter (compat-check.yml, check-prompts-sync.yml) did not trigger at all — only the unfiltered internal-docs-guard.yml and the push-triggered Sync to CNB ran. gh pr checks does not list checks that never ran, so the PR looked clean while two checks had simply been skipped.
- Judge with the API, not the UI:
gh api "repos/<owner>/<repo>/actions/runs?branch=<branch>" --jq '.workflow_runs[] | "\(.name) \(.event) \(.conclusion)"'. A workflow missing from that list was skipped, not passed. - Fix:
gh pr close <n>thengh pr reopen <n>. Thereopenedevent recomputes against the new base and triggers the filtered workflows normally.
When the PR is not stacked and main simply moved
A plain PR turns CONFLICTING the same way — usually on config/source/editor-config/compat-baseline.json alone, since every branch that regenerates it rewrites the same lines. git merge origin/main is fine here: the squash on merge erases the extra merge commit, and there is no already-merged commit to drop. Watch the direction — during a merge main is --theirs (git checkout --theirs …); during a rebase it is --ours.
Then regenerate the whole chain on top of the merge rather than hand-resolving the generated side:
node scripts/generate-prompts-data.mjs, thennode scripts/generate-prompts.mjsnode scripts/sync-claude-skills-mirror.mjsnode scripts/build-compat-config.mjsnode scripts/update-compat-baseline.mjs
Merging main typically brings changes under config/source/skills/** as well, and those propagate into every IDE mirror and every generated surface — recomputing only the baseline leaves compat-diff or prompts-sync red. Close with node scripts/diff-compat-config.mjs (Has blocking diff: NO), node scripts/check-prompts-sync.mjs, and node scripts/sync-claude-skills-mirror.mjs --check.
Isolating your own changes from a shared dirty workspace
A workspace can hold several people's uncommitted work at once, sometimes on a branch whose PR already merged. Committing there means either shipping their work or fighting the index. Move your files onto a clean branch instead.
- Split by ownership before anything else.
git status --porcelainlists the whole workspace;git diff --stat -- <your paths>againstgit diff --stat -- . ':(exclude)<your paths>'separates yours from theirs. Trace each of your files back to the edit that produced it — a workspace is not yours just because you were the last one in it. - Snapshot your files as a patch, not a stash.
git diff -- <your paths> > /tmp/<name>.patch, then confirm the set withgrep -E '^diff --git' /tmp/<name>.patch. A patch travels between worktrees; a stash is per-worktree and easy to strand. - Base the new branch on the fetched
origin/main.git fetch originthengit worktree add -b <new-branch> .worktrees/<dir> origin/main. Never base it on the current branch — if that branch's PR was squash-merged, its commits are already onmainunder new shas. - Give the new worktree
node_modules. A fresh worktree has none. Check scripts that import only node builtins still run, butsync-skill-versions.mjsand vitest die withMODULE_NOT_FOUND:ln -sfn <main-worktree>/node_modules node_modules. - Apply, then check what is staged.
git apply --check <patch>beforegit apply <patch>;git addonly your paths;git status --porcelain | grep -v '^M 'must come back empty, because anything left unstaged or untracked silently misses the PR. - Clean the original workspace with
git restore <your paths>only. Notgit checkout -- ., notgit stash— either takes the other person's work with it. Their files must stay modified exactly as they were. - Rule out a duplicate before starting.
git worktree listcan show aprunableentry whose branch overlaps yours;gh pr list --head <branch> --state allsays whether it already merged. An overlapping branch is more often the precedent to extend than parallel work.
Run the repo's gates in the new worktree, not the original one — the new tree is the only one being pushed.
Command mapping
See references/command-catalog.md.
Bu becerideki dosyalar
3git-workflows skill soruları
git-workflows skill'ini Claude Code uygulamasına nasıl kurarım?
npx degit TencentCloudBase/CloudBase-AI-Toolkit/skills/git-workflows ~/.claude/skills/git-workflows komutunu çalıştırın. Claude Code, skill'leri ~/.claude/skills (tüm projeler) veya .claude/skills (tek proje) konumundan yükler ve açıklaması görevle eşleştiğinde skill'i kullanır.
git-workflows skill'ini hangi istemciler kullanabilir?
Agent Skills biçimini okuyan her istemci: Claude Code, Codex, Gemini CLI ve claude.ai (ZIP olarak yükleyin). Skill içindeki betikler yalnızca istemcinin kod çalıştırmaya izin verdiği yerlerde çalışır.
Base branch squash-merge edildiğinde stacked PR'ı nasıl yönetirim?
git rebase --onto origin/main <A's-original-commit> komutunu kullanarak, halihazırda merge edilmiş commit'i atlayıp main üzerine rebase yapmalısınız. Bu, main üzerinde yeni sha'lar ile zaten mevcut olan değişikliklerin tekrar uygulanmasını önler.
Değişikliklerimi paylaşılan kirli bir workspace'den çıkarmak için en güvenli yol nedir?
Belirli dosyalarınızı git diff -- <your paths> > /tmp/<name>.patch komutuyla bir patch olarak snapshot alın, ardından origin/main tabanlı yeni bir worktree içinde yeni bir branch oluşturup patch'i oraya uygulayın.
Bir GitHub Actions workflow'unun path filtreleri nedeniyle atlanıp atlanmadığını nasıl anlayabilirim?
GitHub UI'ına güvenmeyin; bunun yerine, workflow'un listede görünüp görünmediğini kontrol etmek için ilgili branch'e ait run'ları GitHub CLI API kullanarak kontrol edin.
Push edilen bir PR'daki dahili referansları nasıl temizlerim?
Git ve GitHub API kullanarak tüm kaynakları (commit mesajları ve PR gövdesi) listeleyin, mesajları git commit --amend ile düzenleyin ve gövdeyi yeniden yazmak için gh pr edit komutunu kullanın.