agentleFS
thanvish21thanvish21/hcc-bundle/git-workflow/SKILL.md

git-workflow

Skill0 starsChanged 4 months agoMITView on GitHub

Git workflow patterns for Hermes Agent — branching strategy, commit conventions, worktree coordination, and automation using Hermes tooling.

  • Deletes or force-pushes
  • Commits and pushes

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

Files
SKILL.md

Git Workflow for Hermes

Git patterns optimized for Hermes Agent multi-agent development.

Prerequisites

  • Hermes with terminal, file, delegation toolsets
  • Git 2.30+
  • Optional: gh CLI for GitHub integration

Branching Strategy

Trunk-Based Development (Recommended)

main ────────────────────────────────────────►
  │    │    │    │    │    │
  ▼    ▼    ▼    ▼    ▼    ▼
feat feat feat fix  feat feat  (short-lived branches, <1 day)
# Create feature branch
terminal(command="git checkout -b feat/user-auth main")

# Work in worktree (isolated)
terminal(command="git worktree add ../worktree-auth feat/user-auth")
hermes -w  # In worktree directory

Release Branches (For Versioned Releases)

main ──┬── release/v1.0 ──┬── release/v1.1 ──►
       │                 │
       ▼                 ▼
    hotfix/1.0.1      hotfix/1.1.1

Commit Convention

Conventional Commits

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Types: feat, fix, docs, style, refactor, perf, test, chore, build, ci, revert

Examples

# Feature
git commit -m "feat(auth): add JWT refresh token rotation"

# Fix
git commit -m "fix(api): handle rate limit 429 response"

# Refactor
git commit -m "refactor(db): extract query builder to separate module"

# Breaking change
git commit -m "feat(api)!: change auth header format

BREAKING CHANGE: Authorization header now uses 'Bearer' prefix"

Hermes Worktree Coordination

Multi-Agent Setup

# Terminal 1: Backend agent
git worktree add ../wt-backend feat/backend-api
cd ../wt-backend
hermes -w

# Terminal 2: Frontend agent  
git worktree add ../wt-frontend feat/frontend-ui
cd ../wt-frontend
hermes -w

# Terminal 3: Integration agent
git worktree add ../wt-integration main
cd ../wt-integration
hermes -w

Shared Configuration

# Global git config (run once per machine)
terminal(command="git config --global init.defaultBranch main")
terminal(command="git config --global pull.rebase true")
terminal(command="git config --global push.default current")
terminal(command="git config --global merge.conflictstyle zdiff3")

# Per-repo hooks
terminal(command="cat > .git/hooks/pre-commit << 'EOF'
#!/bin/bash
# Run Hermes security scan
hermes skills run security-scan --staged
EOF
chmod +x .git/hooks/pre-commit")

Automation with Hermes

Pre-Push Hook

# .git/hooks/pre-push
#!/bin/bash
branch=$(git rev-parse --abbrev-ref HEAD)

# Run tests
echo "Running tests..."
terminal(command="pytest -x --tb=short")

# Check for secrets
echo "Scanning for secrets..."
terminal(command="gitleaks protect --staged -v")

# Validate commit messages
echo "Validating commits..."
terminal(command="commitlint --from=main --to=HEAD")

Auto-Sync with Main

# Cron job via Hermes
hermes cron create "every 30m" "
  git fetch origin main
  git rebase origin/main
  git push --force-with-lease
"

PR Creation

# Via Hermes delegation
delegate_task(
    goal="Create PR for current branch",
    context="Branch: feat/user-auth. Run tests, generate changelog, create PR with description."
)

Conflict Resolution

Hermes-Assisted Merge

/hermes
> Resolve merge conflicts in src/auth/middleware.py:
> 1. Show conflict markers
> 2. Explain both sides
> 3. Suggest resolution preserving both features
> 4. Run tests after merge

Rebase Workflow

# Interactive rebase for clean history
terminal(command="git rebase -i main")

# Squash fixup commits
# pick abc123 feat: add login
# fixup def456 fix: typo in login
# fixup ghi789 fix: add test

Release Process

Semantic Versioning

# Major: breaking changes
# Minor: new features (backward compatible)
# Patch: bug fixes (backward compatible)

# Tag release
terminal(command="git tag -a v1.2.0 -m 'Release v1.2.0'")
terminal(command="git push origin v1.2.0")

Changelog Generation

# Auto-generate from conventional commits
terminal(command="git cliff --output CHANGELOG.md")

Useful Aliases

# Add to ~/.gitconfig
[alias]
  co = checkout
  cb = checkout -b
  st = status -sb
  lg = log --oneline --graph --decorate -20
  amend = commit --amend --no-edit
  wip = commit -m "WIP"
  unwip = reset HEAD~1
  sync = !git fetch origin && git rebase origin/main
  clean = !git branch --merged | grep -v main | xargs -r git branch -d

Skill Composition

  • agentic-engineering — Multi-agent git coordination
  • deployment-patterns — GitOps deployment
  • codebase-onboarding — Repo exploration for new agents

Adapted from ECC git-workflow for Hermes Agent. Original: affaan-m/ECC

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.