Agent skill

Managing Git

by CloudAI-X in CloudAI-X/opencode-workflow

Guides git workflows, branching strategies, commit conventions, and version control best practices.

MITAuto-check passedDevelopment

Install Managing Git

skills CLI
$ npx skills add CloudAI-X/opencode-workflow --skill managing-git -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install CloudAI-X/opencode-workflow managing-git --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/CloudAI-X/opencode-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/managing-git .claude/skills/managing-git && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
managing-git
GitHub stars
275
Token cost
~2.5k tokens
SKILL.md length
543 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Guides git workflows, branching strategies, commit conventions, and version control best practices.

  • Works in 4 steps: Lowercase with hyphens → Include ticket number when available → Keep short but descriptive → …
  • Managing repositories
  • SKILL.md covers When to Use This Skill, Branching Strategies, Commit Message Conventions and Branch Naming Conventions, plus 4 more sections
  • Calls git and npm

What it does

Managing Git is an agent skill from CloudAI-X/opencode-workflow. Guides git workflows, branching strategies, commit conventions, and version control best practices. Use when managing repositories, creating branches, or handling merges.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: opencode

It sits in Development, covering Git workflow and Commit messages. It works with Git. The licence is MIT.

When your agent uses it

  • Managing repositories
  • Creating branches
  • Handling merges

Example prompts

  • “Use the managing-git skill to guide git workflows, branching strategies, commit conventions, and version control best practices”
  • “/managing-git”

Requirements

  • Node.js
  • Compatibility (from SKILL.md): opencode

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Lowercase with hyphens
  2. Include ticket number when available
  3. Keep short but descriptive
  4. Delete after merge

What it can do on your machine

Read from SKILL.md and the folder at commit 0128ca6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    opencode

    From compatibility in the SKILL.md frontmatter.

Context cost

Managing Git loads about 2.5k tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 543 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from CloudAI-X/opencode-workflow at commit 0128ca6, republished under its MIT licence (© CloudAI-X). 543 words, ~2,496 tokens.

Download SKILL.mdSave it as .claude/skills/managing-git/SKILL.md (or your agent's skills folder).
name
managing-git
description
Guides git workflows, branching strategies, commit conventions, and version control best practices. Use when managing repositories, creating branches, or handling merges.
compatibility
opencode
license
MIT
metadata.category
workflow
metadata.audience
developers

Managing Git

Best practices for version control, branching strategies, and collaborative development.

When to Use This Skill

  • Setting up branching strategies
  • Writing commit messages
  • Handling merges and conflicts
  • Managing releases
  • Code review workflows
  • Maintaining clean history

Branching Strategies

Git Flow
main ─────●─────────────────────●─────────────────●────▶
           \                   /                 /
release     \───────●─────────●                 /
              \                                /
develop ───────●───────●───────●──────●───────●────────▶
                \       \       \      \
feature          \───────●───────●      \───●───●
                          \              \
hotfix                     \              \───●────▶ main
BranchPurposeBranches FromMerges Into
mainProduction code--
developIntegrationmainrelease
feature/*New featuresdevelopdevelop
release/*Release prepdevelopmain, develop
hotfix/*Production fixesmainmain, develop

Use when: Scheduled releases, multiple versions supported

GitHub Flow
main ─────●─────●─────●─────●─────●────▶
           \   /       \   /       \   /
feature     ●─●         ●─●         ●─●
            PR          PR          PR
BranchPurpose
mainAlways deployable
feature/*All changes (features, fixes)

Use when: Continuous deployment, simple workflow

Trunk-Based Development
main ─────●──●──●──●──●──●──●──●──●──●────▶
           │  │  │  │  │  │  │  │  │  │
          ●   ●  ●  ●  ●  ●  ●  ●  ●  ●
          Small, frequent commits (often direct to main)

Use when: High trust teams, strong CI/CD, frequent deploys


Commit Message Conventions

Conventional Commits
<type>(<scope>): <subject>

<body>

<footer>
Types
TypeDescriptionExample
featNew featurefeat(auth): add OAuth2 login
fixBug fixfix(api): handle null response
docsDocumentationdocs(readme): update setup steps
styleFormattingstyle: fix indentation
refactorCode restructuringrefactor(db): simplify query builder
testAdding teststest(user): add registration tests
choreMaintenancechore(deps): update lodash
perfPerformanceperf(search): add index on email
ciCI/CD changesci: add Node 18 to matrix
Good vs Bad Commits
BAD:
  - "fix"
  - "update code"
  - "WIP"
  - "changes"
  - "asdfasdf"

GOOD:
  - "fix(auth): prevent session timeout on idle"
  - "feat(cart): add quantity validation"
  - "refactor(api): extract common error handling"
Commit Body Guidelines
fix(payment): prevent double charge on retry

The payment gateway timeout was causing the retry logic to submit
duplicate charges. Added idempotency key to prevent double-processing.

Closes #1234
  • First line: 50 chars max, imperative mood
  • Body: Wrap at 72 chars, explain why, not what
  • Footer: Reference issues, breaking changes

Branch Naming Conventions

Pattern
<type>/<ticket>-<short-description>
Examples
TypeExample
Featurefeature/AUTH-123-add-oauth-login
Bugfixfix/CART-456-quantity-validation
Hotfixhotfix/PROD-789-memory-leak
Chorechore/update-dependencies
Docsdocs/api-documentation
Branch Rules
  1. Lowercase with hyphens
  2. Include ticket number when available
  3. Keep short but descriptive
  4. Delete after merge

Git Workflow Commands

Daily Workflow
bash
# Start new feature
git checkout main
git pull origin main
git checkout -b feature/AUTH-123-add-login

# Work on feature
git add -p                    # Stage hunks interactively
git commit -m "feat(auth): add login form"

# Keep up to date
git fetch origin
git rebase origin/main        # Preferred: clean history
# OR
git merge origin/main         # Alternative: preserves context

# Push and create PR
git push -u origin feature/AUTH-123-add-login
Useful Commands
CommandPurpose
git stashSave uncommitted changes temporarily
git stash popRestore stashed changes
git commit --amendModify last commit
git rebase -i HEAD~3Interactive rebase (squash, reorder)
git cherry-pick <sha>Apply specific commit
git bisectBinary search for bug introduction
git reflogView all HEAD movements (recovery)
Cleanup Commands
bash
# Delete merged branches locally
git branch --merged | grep -v main | xargs git branch -d

# Prune remote tracking branches
git fetch --prune

# Clean untracked files (careful!)
git clean -fd

Handling Conflicts

Conflict Resolution Flow
1. Identify conflicts
   git status

2. Open conflicted files
   <<<<<<< HEAD
   your changes
   =======
   their changes
   >>>>>>> feature-branch

3. Resolve (keep one, combine, or rewrite)

4. Mark resolved
   git add <resolved-file>

5. Continue
   git rebase --continue   # if rebasing
   git commit              # if merging
Prevention Strategies
  1. Small, frequent merges - Reduce conflict scope
  2. Communication - Coordinate on shared files
  3. Feature flags - Reduce long-lived branches
  4. Clear ownership - Minimize overlapping work

Show full SKILL.md (213 more words)Show less

Pull Request Best Practices

PR Checklist
  • Branch is up to date with main
  • Tests pass locally
  • Linting passes
  • Self-review completed
  • Documentation updated
  • Ticket/issue linked
  • Screenshots for UI changes
PR Size Guidelines
SizeLines ChangedReview TimeRecommendation
Small1-10015 minIdeal
Medium100-40030-60 minAcceptable
Large400+1+ hourSplit if possible
PR Description Template
markdown
## Summary
Brief description of changes

## Changes
- Added X
- Modified Y
- Removed Z

## Testing
- [ ] Unit tests added
- [ ] Manual testing done

## Screenshots (if applicable)
[Before/After images]

## Related Issues
Closes #123

Release Management

Semantic Versioning
MAJOR.MINOR.PATCH
  │     │     │
  │     │     └── Bug fixes (backward compatible)
  │     └── New features (backward compatible)
  └── Breaking changes
Release Process
bash
# Create release branch
git checkout -b release/v1.2.0 develop

# Bump version, update changelog
# ... make changes ...

# Merge to main and tag
git checkout main
git merge release/v1.2.0
git tag -a v1.2.0 -m "Release v1.2.0"
git push origin main --tags

# Merge back to develop
git checkout develop
git merge release/v1.2.0
Changelog Format
markdown
# Changelog

## [1.2.0] - 2024-01-15
### Added
- OAuth2 authentication support

### Changed
- Improved error messages

### Fixed
- Memory leak in cache handler

### Deprecated
- Old authentication method (use OAuth2)

### Removed
- Legacy API v1 endpoints

Git Hooks

Common Hooks
HookTimingUse Case
pre-commitBefore commitLinting, formatting
commit-msgAfter messageValidate message format
pre-pushBefore pushRun tests
post-mergeAfter mergeInstall dependencies
Example pre-commit
bash
#!/bin/sh
# .git/hooks/pre-commit

# Run linter
npm run lint
if [ $? -ne 0 ]; then
  echo "Linting failed. Please fix errors."
  exit 1
fi

# Run tests
npm test
if [ $? -ne 0 ]; then
  echo "Tests failed. Please fix before committing."
  exit 1
fi
Using Husky (Node.js)
json
// package.json
{
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged",
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
  }
}

Troubleshooting

Common Issues
ProblemSolution
Accidental commit to maingit reset HEAD~1 (before push)
Wrong branchgit stash, switch, git stash pop
Need to undo mergegit revert -m 1 <merge-commit>
Lost commitsgit reflog to find, git cherry-pick
Large file committedgit filter-branch or BFG Repo-Cleaner
Recovery Commands
bash
# Undo last commit (keep changes)
git reset --soft HEAD~1

# Undo last commit (discard changes)
git reset --hard HEAD~1

# Recover deleted branch
git reflog
git checkout -b recovered-branch <sha>

# Undo a pushed commit (safe)
git revert <sha>

Anti-Patterns to Avoid

  1. Force pushing to shared branches - Breaks others' history
  2. Giant commits - Hard to review, hard to bisect
  3. Vague commit messages - "fix" tells nothing
  4. Long-lived branches - Merge conflict hell
  5. Committing generated files - Bloats repo, causes conflicts
  6. Committing secrets - Security risk (even after removal)
  7. Rebasing public history - Breaks collaborators
  8. Ignoring CI failures - Broken windows effect

Quick Reference

BRANCHES:
  main       → Production (protected)
  develop    → Integration (Git Flow)
  feature/*  → New work
  fix/*      → Bug fixes
  hotfix/*   → Production emergencies

COMMITS:
  feat(scope): add feature
  fix(scope): fix bug
  docs(scope): update docs
  refactor(scope): restructure code

DAILY FLOW:
  git checkout -b feature/ticket-desc
  git add -p && git commit
  git rebase origin/main
  git push -u origin feature/ticket-desc

VERSIONING:
  MAJOR.MINOR.PATCH
  Breaking.Feature.Bugfix

© CloudAI-X, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/managing-git of CloudAI-X/opencode-workflow.

Open the folder on GitHubat commit 0128ca6

Compare with similar skills

Managing Git next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Managing Git compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Managing Git this skillCloudAI-X/opencode-workflow275—~2.5kAutomated safety check: PassMIT
ToolJet Multi-Repo CommitToolJet/ToolJet41k—~1.3kAutomated safety check: PassAGPL-3.0
Git Workflow and Versioningaddyosmani/agent-skills103k2 repos~3.5kAutomated safety check: NotesMIT
React Router Pull Request Creatorremix-run/react-router57k—~2.5kAutomated safety check: PassMIT
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause
Emoji Commit ConventionsbaptisteArno/typebot.io11k—~424Automated safety check: PassCustom licence

Similar skills

  • Commits changes across ToolJet's root repo and its server/ee and frontend/ee submodules, writing messages from the diffs and updating submodule pointers in order.

    41k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Workflow and Versioning

    addyosmani/agent-skills

    Sets git habits for every change: short-lived branches, atomic commits with descriptive messages, clean pull requests, plus versioning, tagging and changelogs for releases.

    103k GitHub starsUsed in 2 repos~3.5k tokens
    DevelopmentAuto-check: notes
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Emoji Commit Conventions

    baptisteArno/typebot.io

    Sets the repository's convention for commit messages and pull request titles: one emoji prefix for the main intent, a concise title and clean follow-up commits.

    11k GitHub stars~424 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Draft Pull Request Creator

    wordpress-mobile/WordPress-Android

    Commits and pushes current changes, writes a pull request title and body from the branch history and template, and opens a draft PR on GitHub after you approve it.

    3.2k GitHub stars~881 tokensUpdated today
    DevelopmentAuto-check: notes

More from CloudAI-X/opencode-workflow

  • Analyzing Projects

    CloudAI-X/opencode-workflow

    Guides systematic project analysis, codebase exploration, and architecture pattern recognition.

    275 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Designing APIs

    CloudAI-X/opencode-workflow

    Guides REST and GraphQL API design, endpoint patterns, request/response schemas, versioning, and API best practices.

    275 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Designing Architecture

    CloudAI-X/opencode-workflow

    Guides software architecture decisions, design patterns, and system design principles.

    275 GitHub stars~2.6k tokensUpdated 9 mo ago
    Auto-check passed
  • Designing Tests

    CloudAI-X/opencode-workflow

    Guides test strategy, TDD/BDD approaches, test coverage planning, and testing best practices.

    275 GitHub stars~2.9k tokensUpdated 9 mo ago
    Auto-check passed
  • Optimizing Performance

    CloudAI-X/opencode-workflow

    Guides performance optimization, profiling techniques, and bottleneck identification.

    275 GitHub stars~2.6k tokensUpdated 9 mo ago
    Auto-check passed
  • Parallel Execution

    CloudAI-X/opencode-workflow

    CRITICAL skill for executing multiple Task tool calls in a SINGLE message for true parallelism.

    275 GitHub stars~2.1k tokensUpdated 9 mo ago
    Auto-check passed

Works with

Categories

Questions about Managing Git

What does Managing Git do?

Guides git workflows, branching strategies, commit conventions, and version control best practices. Managing Git is an agent skill from CloudAI-X/opencode-workflow. Guides git workflows, branching strategies, commit conventions, and version control best practices.

When should I use Managing Git?

Managing Git fits situations like: managing repositories; creating branches; handling merges.

How do I install Managing Git in Claude Code?

Run `npx skills add CloudAI-X/opencode-workflow --skill managing-git -a claude-code`. Or copy the skill folder (skills/managing-git in CloudAI-X/opencode-workflow) into .claude/skills/managing-git in your project. Claude Code loads it when a task matches its description.

How do I install Managing Git in Codex?

Run `npx skills add CloudAI-X/opencode-workflow --skill managing-git -a codex`. Or copy the skill folder (skills/managing-git in CloudAI-X/opencode-workflow) into .agents/skills/managing-git in your project. Codex loads it when a task matches its description.

Can I use Managing Git in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add CloudAI-X/opencode-workflow --skill managing-git -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/managing-git, .gemini/skills/managing-git, .github/skills/managing-git and .opencode/skills/managing-git in your project.

What does Managing Git need to run?

Going by SKILL.md and its folder, Managing Git needs the command-line tools its instructions call (git and npm). Our summary lists: Node.js. Compatibility (from SKILL.md): opencode.

Does Managing Git access the network?

SKILL.md contains no URLs. Its commands use git and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Managing Git safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Managing Git use?

Managing Git is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Managing Git use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Managing Git?

Skills that share tags, products or a category with Managing Git: ToolJet Multi-Repo Commit (ToolJet/ToolJet, 41k stars), Git Workflow and Versioning (addyosmani/agent-skills, 103k stars), React Router Pull Request Creator (remix-run/react-router, 57k stars) and Saleor Commit Workflow (saleor/saleor, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Managing Git?

CloudAI-X (a GitHub user) maintains it in CloudAI-X/opencode-workflow, which has 275 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on January 10, 2026.

Source: CloudAI-X/opencode-workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.