git-workflows
Skill11 starsChanged 9 days agoMITView on GitHub
Safe Git branch, remote, history-inspection, integration, rewrite, conflict, recovery, tag, and worktree workflows. Use when switching or restoring, fetching/pulling/pushing, managing upstreams or remotes, inspecting history with log/blame/bisect, merging/rebasing/squashing/cherry-picking/reverting/resetting, resolving conflicts, recovering with reflog, or managing tags and worktrees. Do not use for commit grouping or message drafting, checked-in CI/release automation, code review, GitHub pull-request operations, or release-readiness decisions.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- TencentCloudBase/CloudBase-AI-Toolkittheir own version, first seen Oct 30, 2026
- VJDiPaola/skill-forgetheir own version, first seen Oct 11, 2026
- TencentCloudBase/CloudBase-AI-ToolKittheir own version, first seen Oct 8, 2026
- TencentCloudBase/CloudBase-MCPtheir own version, first seen Oct 8, 2026
- Leostruka/devin-bundletheir own version, first seen Aug 15, 2026
- albertdobmeyer/openskill-forgetheir own version, first seen Apr 2, 2026
Used with
Projects with it also use cloud-api-recipe-authoring, codebuddy-ide-mcp-upgrade and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
TencentCloudBaseSkillcloud-api-recipe-authoring
Author or revise a cloud-api-operations recipe (config/source/skills/cloud-api-operations/references/recipes/). Encodes why the long tail of control-plane capabilities is deliberately NOT wrapped as MCP/CLI tools, the API-first admission test for whether a capability deserves a recipe, the negative and positive lists, the fixed recipe structure, the writing rules distilled from writing-for-agents, the user-facing copy red lines, and the product regeneration/verification pipeline. Also routes contributors (and their agents) to the contribution flow and the pre-PR self-test protocol in references/contributing.md. Use when adding a recipe, judging whether a scenario belongs in the recipe set, updating the recipes index, re-checking existing recipes against the admission test, or onboarding someone who wants to submit one.
Also in 3 projects that use this
TencentCloudBaseSkillcodebuddy-ide-mcp-upgrade
升级 CodeBuddy IDE(genie 扩展)内置的 CloudBase MCP,以及 MCP 发版时同步 IDE 侧白名单。当用户提到「更新 IDE 里的 MCP」「内置 MCP 版本太老」「IDE 集成的 CloudBase 功能不足」「改工具白名单 toolWhiteList」「把新 bundle 打进 CodeBuddy」「白名单漂移」「MCP 发版要同步什么」时使用。覆盖:解包定位内置 bundle 与内嵌配置、重新构建 mcp bundle、生成新的工具白名单与系统提示词、安全注入 IDE 并备份、用 MCP 协议验证工具清单、人工端到端验收、一键回滚。
Also in 3 projects that use this
zaxbysauceSkillpr-review-fix
Codex adapter for addressing pull request review feedback in opencode-swarm. Use when the user asks to fix PR review comments, requested changes, reviewer findings, CI-review notes, or a pasted review summary with low false-positive tolerance.
Also in 3 projects that use this
DIL8654Skillapi-contract-review
Review ASP.NET Core Web API contracts for HTTP semantics, versioning, backward compatibility, and response consistency. Use when the user asks to review an API, check endpoints, validate REST behavior, or before releasing contract changes.
Also in 3 projects that use this
ReinaMacCredySkillcodebase-audit
Deep codebase audit that first reads project docs (AGENTS.md, README.md) and investigates the architecture, then systematically finds hardcoded constants that should be dynamic and unfinished code (TODOs, "will"/"would" in comments). Use this skill when the user wants a thorough code review for hygiene issues, asks to find hardcoded values, wants to audit for TODOs or incomplete code, says things like "audit this codebase", "find hardcoded stuff", "what's unfinished", "find tech debt", "code hygiene check", or asks you to look across the whole project for issues. Also use when the user asks to understand a project before making changes, or wants a comprehensive health check of their codebase.
Also in 3 projects that use this
Microsoft AzureSkillskill-authoring
Write Agent Skills that comply with the agentskills.io specification. WHEN: "create a skill", "new skill", "write a skill", "skill template", "skill structure", "review skill", "skill PR", "skill compliance", "SKILL.md format", "skill frontmatter", "skill best practices". DO NOT USE FOR: general documentation. INVOKES: vally CLI.
Also in 3 projects that use this
- +6 more from TencentCloudBase
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- TencentCloudBase/CloudBase-AI-ToolKit★ 1.2ksame name
- TencentCloudBase/CloudBase-MCP★ 1.2ksame name
- TencentCloudBase/CloudBase-AI-Toolkit★ 1.2ksame name
- albertdobmeyer/openskill-forge★ 1same name
- Leostruka/devin-bundle★ 0same name
- VJDiPaola/skill-forge★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository70 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adversarial-reviewSkill
- api-designSkill
- architecture-reviewSkill
- behavior-driven-developmentSkill
- brainstormingSkill
- ci-release-engineeringSkill
- clean-architectureSkill
- code-reviewSkill
- container-engineeringSkill
- create-agent-skillSkill
- csharp-dotnet-engineeringSkill
- css-scss-stylingSkill
- data-platform-engineeringSkill
- dependency-supply-chain-reviewSkill
- digital-asset-managementSkill
- documentation-engineeringSkill
- domain-driven-designSkill
- domain-modelingSkill
- donsetch-web-researchSkill
- gherkinSkill
- git-commitSkill
- hexagonal-architectureSkill
- impeccableSkill
- internationalization-localizationSkill
- javascript-typescript-engineeringSkill
- justfilesSkill
- mcp-server-engineeringSkill
- mysql-mariadb-sql-engineeringSkill
- observability-engineeringSkill
- onion-architectureSkill
- parallelism-engineeringSkill
- performance-reviewSkill
- playwright-e2eSkill
- postgresql-sql-engineeringSkill
- prompt-engineering-reviewSkill
- python-antipatternsSkill
- python-design-patternsSkill
- python-engineeringSkill
- random-data-identifiersSkill
- release-readinessSkill
- review-verification-protocolSkill
- root-cause-analysisSkill
- ruby-engineeringSkill
- rust-antipatternsSkill
- rust-async-webSkill
- rust-code-reviewSkill
- rust-design-patternsSkill
- rust-desktop-guiSkill
- rust-engineeringSkill
- rust-persistence-sqlSkill
- rust-testing-qualitySkill
- script-engineeringSkill
- security-review-evidenceSkill
- security-reviewSkill
- semantic-versioningSkill
- sql-engineeringSkill
- sqlite-sql-engineeringSkill
- suggest-lucide-iconsSkill
- svelte-sveltekit-engineeringSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
33 rules. 0 are common, 22 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
22
Distinctive
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 8
Use this skill for repository-state operations beyond constructing a new commit.
- Very specific: line 12
Use git-commit to group, stage, validate, and describe new commits.
- Distinctive: line 22
Follow repository instructions, contributing docs, branch protections, hooks, signing rules, and established integration policy over …
- Distinctive: line 29
Never infer authorization to push, force-push, delete refs, rewrite history, or discard files from a request to commit, update, merge, or …
- Distinctive: line 33
Prefer reversible operations, but do not promise recovery.
- Distinctive: line 35
Treat command output and remote URLs as potentially sensitive.
- Distinctive: line 41
Read relevant repository instructions and contributing or release docs.
- Distinctive: line 42
Check git --version before relying on version-sensitive commands.
- Distinctive: line 61
Start from a clean state when the chosen operation requires it.
- Distinctive: line 62
If work is present, stop and decide whether it belongs in a commit or an explicitly authorized stash.
- Distinctive: line 66
Check untracked and ignored files before restore, reset, clean, checkout, worktree removal, or submodule recursion.
- Distinctive: line 68
Check for submodules before adding, moving, or removing worktrees.
- Very specific: line 71
When leaving detached HEAD, preserve wanted commits with an intentional branch or tag first.
- Very specific: line 75
Prefer switch for branch changes and restore for path or index content on Git 2.23 or newer.
- Distinctive: line 78
Follow repository policy when selecting merge, rebase, squash, or fast-forward-only integration.
- Very specific: line 80
Prefer revert for undoing published changes.
- Distinctive: line 82
Use cherry-pick for selected commits, not as a default substitute for a repository's normal integration workflow.
- Distinctive: line 84
Treat tags as published release identifiers when repository policy does.
- Distinctive: line 85
Do not silently replace a published tag.
- Distinctive: line 86
Use bisect only with a reproducible test or observation, mark untestable commits as skipped, record the first bad commit as evidence rather …
- Very specific: line 96
Never use plain --force as routine guidance.
- Very specific: line 100
Do not bypass hooks with --no-verify merely to make an operation succeed.
- Very specific: line 107
Do not use reset --hard as generic conflict cleanup.
- Distinctive: line 121
Use a linked worktree when genuine concurrent branch work or a separate clean checkout must proceed without disturbing a worktree that …
- Distinctive: line 123
Prefer the current worktree for ordinary edits on the current task and branch.
- Distinctive: line 126
Before adding a worktree, inspect git worktree list, relevant worktree statuses, submodules, the target path, the intended commit or …
- Distinctive: line 137
Remove a clean linked worktree with git worktree remove.
- Very specific: line 140
Use lock for a worktree on storage that may be temporarily unavailable, prune for stale administrative records after a worktree is already …
- Distinctive: line 147
If a secret may be staged, committed, reflog-reachable, or pushed, stop.
- Very specific: line 150
Treat hooks and core.hooksPath as executable configuration.
- Very specific: line 152
Never solve repository ownership warnings by setting safe.directory=*.
- Very specific: line 154
Treat changed .gitmodules, submodule URLs, gitlinks, and pinned submodule commits as dependency provenance.
- Distinctive: line 156
Follow established signing policy.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Workflows
Use this skill for repository-state operations beyond constructing a new commit. Preserve unrelated work, inspect local policy before acting, and make the exact side effect explicit before running a mutating command.
Use git-commit to group, stage, validate, and describe
new commits. Load security-review and
security-review-evidence when secrets,
credentialed remotes, signing trust, untrusted hooks or configuration, or other
security boundaries are involved. Use
dependency-supply-chain-review
for submodule, downloaded hook tooling, vendored-source, or provenance questions.
Core Rules
- Follow repository instructions, contributing docs, branch protections, hooks, signing rules, and established integration policy over generic advice.
- Distinguish
HEAD, the index, the working tree, local refs, remote-tracking refs, and remote refs. Do not describereset,restore, andcheckoutas interchangeable. - Distinguish uncommitted work, local-only commits, shared commits, and published refs before rewriting or discarding anything.
- Never infer authorization to push, force-push, delete refs, rewrite history, or discard files from a request to commit, update, merge, or fix code.
- Preserve unrelated user changes. Do not hide them with an unrequested stash, temporary commit, branch switch, worktree removal, or cleanup command.
- Prefer reversible operations, but do not promise recovery. Reflogs are local, expire, and do not restore arbitrary untracked files removed from disk.
- Treat command output and remote URLs as potentially sensitive. Report sanitized refs and outcomes instead of credentials or private host details.
Workflow
- Inspect policy and repository state.
- Read relevant repository instructions and contributing or release docs.
- Check
git --versionbefore relying on version-sensitive commands. - Inspect status, current branch or detached
HEAD, staged and unstaged changes, recent history, upstream configuration, and relevant worktrees. - Inspect remotes only when needed and do not print credential-bearing URLs.
- In unfamiliar repositories, inspect effective hook and configuration sources before an operation that can execute hooks.
- Define the intended outcome.
- Separate branch or path switching from content restoration.
- Separate downloading remote state from integrating it:
fetchupdates remote-tracking information;pullfetches and then integrates. - Choose whether history should preserve topology, replay commits, produce a squashed result, create an inverse commit, or move a ref.
- For diagnosis, decide whether the task needs history inspection, line provenance, or a reproducible good/bad search before choosing log, blame, or bisect. Do not use blame to assign personal fault.
- Determine whether affected commits or refs are already shared or published.
- Protect current work.
- Start from a clean state when the chosen operation requires it.
- If work is present, stop and decide whether it belongs in a commit or an explicitly authorized stash. A separate worktree can isolate a different branch task, but it does not transfer staged, unstaged, or untracked changes from the current tree. Do not choose silently.
- Check untracked and ignored files before restore, reset, clean, checkout, worktree removal, or submodule recursion. Reflog cannot recover all of them.
- Check for submodules before adding, moving, or removing worktrees. Git's multiple-worktree support for submodules is incomplete; do not create multiple superproject checkouts when submodules are present.
- When leaving detached
HEAD, preserve wanted commits with an intentional branch or tag first.
- Choose the narrowest operation.
- Prefer
switchfor branch changes andrestorefor path or index content on Git 2.23 or newer. Retaincheckoutawareness for older repositories and ambiguous branch/path syntax; use--to disambiguate paths. - Follow repository policy when selecting merge, rebase, squash, or fast-forward-only integration. Do not impose a universal pull strategy.
- Prefer
revertfor undoing published changes. Use reset or rebasing only when moving or rewriting refs is the intended and authorized result. - Use cherry-pick for selected commits, not as a default substitute for a repository's normal integration workflow.
- Treat tags as published release identifiers when repository policy does. Do not silently replace a published tag.
- Use bisect only with a reproducible test or observation, mark untestable commits as skipped, record the first bad commit as evidence rather than the root cause, and reset the bisect session when finished.
- Prefer
- Confirm risky side effects.
- Require explicit authorization for worktree or index discard, destructive cleanup, history rewriting, branch or tag deletion, remote updates, and forced ref changes.
- Preview the target ref, source commit, affected paths, and remote state before acting. Use dry-run behavior where the command supports it.
- Never use plain
--forceas routine guidance.--force-with-leaseis a guard, not coordination; forms that rely on remote-tracking refs can be undermined by background fetches. Prefer an explicit expected object ID for a separately authorized critical rewrite. - Do not bypass hooks with
--no-verifymerely to make an operation succeed.
- Handle stopped operations deliberately.
- Identify whether merge, rebase, cherry-pick, or revert owns the current conflict state before choosing continue, abort, skip, or quit.
- Resolve content and semantic conflicts, then run focused validation for the integrated result. Compilation alone may not detect an incorrect merge.
- Do not use
reset --hardas generic conflict cleanup. An abort may also be unable to reconstruct pre-existing uncommitted work.
- Verify and report.
- Recheck status, diffs, recent history, branch/upstream state, tags, and worktrees relevant to the operation.
- For remote changes, verify the intended remote ref instead of assuming a successful local command proves the server state.
- Report the operation, affected refs or paths, validation, and remaining risks. Never expose secrets, credentialed URLs, private keys, or sensitive hook output.
Worktree Decision And Lifecycle
- Use a linked worktree when genuine concurrent branch work or a separate clean checkout must proceed without disturbing a worktree that remains in use. Prefer the current worktree for ordinary edits on the current task and branch.
- Existing dirty work remains in its original worktree. Transfer it only through a separate, explicitly chosen commit, patch, or authorized stash workflow.
- Before adding a worktree, inspect
git worktree list, relevant worktree statuses, submodules, the target path, the intended commit or branch, and whether that branch is already checked out. A branch is normally checked out in only one worktree. - Specify branch intent. Without a commit-ish or explicit
-b,-B, or--detach,git worktree add <path>may create a branch named after the final path component. Disclose the new directory, branch or detached state, and linked-worktree metadata before creation. - Worktrees share repository objects and refs while keeping separate working
files,
HEAD, and indexes. A ref update in one worktree can affect what the others observe even though their uncommitted files remain separate. - Remove a clean linked worktree with
git worktree remove; do not delete its directory as the normal cleanup path. Forced removal of an unclean, locked, or submodule-bearing worktree can discard work and requires explicit authorization. - Use
lockfor a worktree on storage that may be temporarily unavailable,prunefor stale administrative records after a worktree is already missing, andrepairfor inconsistent metadata such as a manually moved worktree. Do not use them as interchangeable cleanup commands.
Security and Supply-Chain Escalation
- If a secret may be staged, committed, reflog-reachable, or pushed, stop. Do not print it. Determine the exposure class, rotate or revoke first, and coordinate any history rewrite or remote cleanup through the security skills.
- Treat hooks and
core.hooksPathas executable configuration. Do not trust or run unfamiliar hooks, hook managers, or downloaded helpers without review. - Never solve repository ownership warnings by setting
safe.directory=*. Scope any trust exception to a repository that policy intentionally trusts. - Treat changed
.gitmodules, submodule URLs, gitlinks, and pinned submodule commits as dependency provenance. Sanitize credential-bearing URLs. - Follow established signing policy. Do not change key, trust, or signature configuration merely to complete a Git operation.
Detailed Operation Guidance
Load references/operation-matrix.md when the
task needs command-specific selection, abort/recovery behavior, or upstream
documentation links. Keep the core workflow above active for every operation.
Do Not Use For
- Grouping a working tree into commits or writing commit messages; use
git-commit. - Reviewing code, deciding whether a pull request should merge, or deciding whether a release should ship.
- GitHub issue, pull-request, review, or repository-administration APIs.
- Editor workspaces or generic orchestration across unrelated repositories.
- Checked-in CI or automated release publication where Git is only one pipeline
step; use
ci-release-engineering. - Docker/OCI or Compose configuration; use
container-engineering. Other deployment systems require their applicable platform or repository-specific guidance.
Handoff Checklist
- Repository policy and Git version checked.
- Current work, detached state, upstreams, remotes, and publication state scoped.
- Exact side effect and authorization confirmed.
- Unrelated changes and sensitive output preserved.
- Conflict, abort, and recovery path understood before mutation.
- Resulting refs, status, diffs, and relevant validation verified.
- Commands, outcomes, limitations, and residual risk reported safely.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

