agentleFS
mike22890mike22890/opencode-skills-cn/skills/git-workflow/SKILL.md

git-workflow

Skill1 starsChanged 59 days agoMITView on GitHub

Git 工作流的自动化与最佳实践。当需要写 commit message、创建 PR、解决合并冲突、分支管理(Git Flow/GitHub Flow/Trunk-based)、git rebase、cherry-pick、tag 管理、版本发布、git hook 配置、多分支协作、代码审查流程时使用。

  • Reads credentials

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use squad-commands, ci-cd-pipelines 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.
  • Microsoft AzureSkill

    squad-commands

    Categorized catalog of common Squad operations. Coordinator reads this file and presents it as an interactive menu when the user asks for available commands or help.

    Also in 5 projects that use this

  • harrissohail6Skill

    ci-cd-pipelines

    CI/CD pipeline design and implementation. Auto-activates when discussing deployment, automation, or pipelines.

    Also in 6 projects that use this

  • Microsoft AzureSkill

    architectural-proposals

    How to write comprehensive architectural proposals that drive alignment before code is written

    Also in 4 projects that use this

  • GitHubSkill

    e2e-template-testing

    End-to-end validation of coordinator and agent template changes

    Also in 3 projects that use this

  • GitHubSkill

    notification-routing

    Route agent notifications to specific channels by type — prevent alert fatigue from single-channel flooding

    Also in 3 projects that use this

  • frostneySkill

    native-nostalgia-stack

    Applies the user's FreePascal toolchain and its build, formatting, hook, and test contracts while leaving project-specific mechanics local. Use when scaffolding or working in a FreePascal project that follows this toolchain.

    Also in 3 projects that use this

  • +5 more from Azure
  • +1 more from github

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 164 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 3

    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
  1. Distinctive:

    Before staging or committing any changes:

    line 16
  2. Distinctive:

    Run git status -s to inspect untracked and modified files.

    line 18
  3. Distinctive:

    Run git diff (and git diff --cached) to verify exact changes line-by-line.

    line 19
  4. Very specific:

    NEVER commit .env, .pem, credentials, API tokens, or hardcoded secrets.

    line 21
  5. Very specific:

    Ensure build artifacts (node_modules/, dist/, .turbo/, target/) are ignored via .gitignore.

    line 22
  6. Very specific:

    Ensure linter and tests pass before committing (npm test, cargo test, pytest, etc.).

    line 24
  7. Distinctive:

    Follow the Conventional Commits format:

    line 30
  8. Distinctive:

    When preparing a PR:

    line 58
  9. Distinctive:

    Run git status to identify all unmerged paths.

    line 68
  10. Distinctive:

    Keep the correct logic, remove conflict markers, and run the test suite to verify zero regressions.

    line 71

“Common” is measured: kept by at least 6 in 10 of the 164 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Git Workflow & Release Guidelines

This skill guides atomic, safe, and standardized Git version control workflows.

何时触发

关键词命中即触发:git、commit、PR、MR、分支、合并、冲突、rebase、cherry-pick、tag、发布、hook、协作、代码审查、回退、撤销、版本管理。

1. Pre-Commit Verification Checklist

Before staging or committing any changes:

  1. Check Status & Diffs:
    • Run git status -s to inspect untracked and modified files.
    • Run git diff (and git diff --cached) to verify exact changes line-by-line.
  2. Security & Secret Screening:
    • NEVER commit .env, .pem, credentials, API tokens, or hardcoded secrets.
    • Ensure build artifacts (node_modules/, dist/, .turbo/, target/) are ignored via .gitignore.
  3. Verification:
    • Ensure linter and tests pass before committing (npm test, cargo test, pytest, etc.).

2. Conventional Commit Standards

Follow the Conventional Commits format:

<type>(<optional scope>): <short summary in imperative present tense>

[optional body explaining WHY and WHAT changed, not HOW]

[optional footer(s), e.g., BREAKING CHANGE: ..., Closes #123]

Commit Types:

  • feat: A new user-facing feature or capability
  • fix: A bug fix
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Performance improvements
  • test: Adding or correcting tests
  • docs: Documentation changes only
  • chore: Build system, CI/CD, dependency updates, internal tooling
  • style: Formatting, whitespace (no code behavior change)

Good Examples:

  • feat(auth): add OAuth2 refresh token rotation mechanism
  • fix(parser): handle empty markdown frontmatter without crashing
  • refactor(db): extract connection pool singleton to separate module

3. Pull Request (PR) Preparation

When preparing a PR:

  1. Title: Concise Conventional Commit style summary.
  2. Summary of Changes: Bullet points of key architectural/logic modifications.
  3. Testing Plan: Exact commands executed and tests verified.
  4. Breaking Changes & Risk Assessment: Detail any backward-incompatible changes or deployment risks.

4. Conflict Resolution Protocol

  1. Run git status to identify all unmerged paths.
  2. Open conflicting files, locate <<<<<<<, =======, and >>>>>>> markers.
  3. Understand the intent of both branches before resolving.
  4. Keep the correct logic, remove conflict markers, and run the test suite to verify zero regressions.

加载 reference

用户说加载
commit message / 提交信息/ 提交规范/ 怎么写commit/ 提交格式reference/commits.md
分支管理 / 分支模型 / PR / 代码审查 / 合并/ 工作流/ Git Flowreference/branching.md
回退 / 撤销 / 恢复 / reflog / 冲突解决 / 救援/ 撤销提交/ 回滚reference/recovery.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

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.