agentleFS
modu-aimodu-ai/moai-adk/.claude/skills/moai-ref-git-workflow/SKILL.md

moai-ref-git-workflow

Skill1.2k starsChanged 3 months agoApache-2.0View on GitHub

Git workflow patterns, branch strategies, conventional commits, and PR templates reference for git operations. Agent-extending skill that amplifies manager-git expertise with production-grade git workflow patterns. NOT for: code implementation, testing, architecture design, documentation content.

  • Deletes or force-pushes
  • Commits and pushes

Trending

Quiet since September.thin dataabout the whole repository

Jan 2026: 1 mentionFeb 2026: 0 mentionsMar 2026: 1 mentionApr 2026: 5 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 3 mentionsOct 2026: 0 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the modu-ai/moai-adk repository that our weekly crawl found: only 13 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about modu-ai/moai-adk

The biggest 5 of 13 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 13

Talked about on GitHub (13 times).

On GitHub · 13

8 more on GitHub

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Delete branch after merge

    line 49
  2. Distinctive:

    Commit message does not follow conventional format (type(scope): description)

    line 180

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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 Reference

Target Agent

manager-git - Applies these patterns directly to git operations, branch management, and PR creation.

Branch Strategy Patterns

GitHub Flow (Default for Most Projects)

main ─────────────────────────────────────────
  └── feat/SPEC-XXX-description ──── PR ──→ merge

Rules:

  • main is always deployable
  • Feature branches from main
  • PR required for all merges
  • Delete branch after merge

GitFlow (Complex Release Cycles)

main ──────────────────────────────────────────
  └── develop ─────────────────────────────────
        ├── feature/SPEC-XXX ──── PR ──→ develop
        └── release/v1.2.0 ────── PR ──→ main + develop

Trunk-Based (CI/CD Heavy)

main ──────────────────────────────────────────
  └── short-lived branch (< 1 day) ──→ merge

Branch Naming Convention

PatternExampleUse Case
feat/SPEC-{ID}-{slug}feat/SPEC-AUTH-001-jwt-authNew feature
fix/SPEC-{ID}-{slug}fix/SPEC-BUG-042-null-checkBug fix
refactor/{slug}refactor/extract-auth-middlewareRefactoring
docs/{slug}docs/api-reference-updateDocumentation
chore/{slug}chore/upgrade-dependenciesMaintenance

Conventional Commits Reference

TypeWhenExample
featNew featurefeat(auth): add JWT refresh token flow
fixBug fixfix(api): handle null user in profile endpoint
refactorCode restructurerefactor(db): extract query builder
testTest changestest(auth): add login edge case tests
docsDocumentationdocs(api): update endpoint descriptions
choreMaintenancechore(deps): upgrade Go to 1.23
perfPerformanceperf(query): add index for user lookup
styleFormattingstyle: apply gofmt formatting
ciCI/CD changesci: add GitHub Actions workflow
revertRevert commitrevert: undo feat(auth) commit abc123

Commit Message Structure

<type>(<scope>): <description>    # max 72 chars

[optional body]                    # what and why, not how

[optional footer]                  # Breaking changes, issue refs
BREAKING CHANGE: <description>
Refs: #123, SPEC-AUTH-001

Pull Request Template

## Summary
- [1-3 bullet points describing what this PR does]

## Changes
- [ ] File 1: description of change
- [ ] File 2: description of change

## Test Plan
- [ ] Unit tests added/updated
- [ ] Integration tests pass
- [ ] Manual testing completed

## SPEC Reference
- SPEC-{ID}: {title}

## Checklist
- [ ] Tests pass (`go test ./...`)
- [ ] Linting pass (`golangci-lint run`)
- [ ] No secrets committed
- [ ] Documentation updated if needed

Merge Strategy Selection

StrategyWhenCommand
Squash mergeFeature branches (clean history)gh pr merge --squash
Merge commitRelease branches (preserve history)gh pr merge --merge
RebaseSmall, clean commitsgh pr merge --rebase

The active method for sync-phase PR auto-merge is governed by the git_strategy.<mode>.merge_method config value (squash | merge | rebase; default squash), not hardcoded. The sync agent resolves it from the active mode profile and renders the matching gh pr merge --<merge_method> command.

Git Safety Rules

ActionRiskRule
git push --forceOverwrites remoteNEVER on main/master, ask user first
git reset --hardLoses local changesConfirm with user first
git checkout .Discards changesConfirm with user first
git branch -DDeletes branchOnly after merge confirmed
--no-verifySkips hooksNEVER unless user explicitly requests
git rebase -iInteractive (not supported)NEVER use (requires interactive input)

Context Memory in Commits

Embed decision context in commit messages for future session continuity:

feat(auth): implement JWT refresh token rotation

Decision: Chose rotation over sliding window for security
Pattern: Middleware chain: RateLimit -> Auth -> Authz -> Handler
Gotcha: Token blacklist requires Redis, not just in-memory cache

Refs: SPEC-AUTH-001
<!-- moai:evolvable-start id="rationalizations" -->

Common Rationalizations

RationalizationReality
"I will clean up the commit messages before merging"Interactive rebase is error-prone under pressure. Write clean commits from the start.
"Force push is fine on my feature branch"Collaborators or CI may have fetched the branch. Force push destroys their reference. Use --force-with-lease.
"This commit is too small to need a conventional format"Changelog generators, bisect, and blame all depend on consistent commit formats. Every commit matters.
"I will push directly to main, it is a small fix"Direct pushes bypass code review and CI. Even small fixes can break production.
"Merge commits are messy, I always squash"Squash loses individual commit context. Merge commits preserve the development narrative for future debugging.
<!-- moai:evolvable-end --><!-- moai:evolvable-start id="red-flags" -->

Red Flags

  • Commit message does not follow conventional format (type(scope): description)
  • Force push to main or shared release branch
  • PR merged without CI passing
  • Branch name does not indicate feature, fix, or SPEC reference
  • Merge conflict markers found in committed files
<!-- moai:evolvable-end --><!-- moai:evolvable-start id="verification" -->

Verification

  • All commit messages follow conventional format (show git log --oneline)
  • Branch name follows convention (feature/, fix/, chore/ prefix)
  • No force pushes to main or protected branches (check reflog or CI)
  • PR has passing CI checks before merge
  • No merge conflict markers in committed files (grep for <<<<<<<)
  • SPEC-ID referenced in commit message or PR description when applicable
<!-- moai:evolvable-end -->

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.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.