git-commit

Fetch remote changes, rebase, and enforce git hooks before committing.

1|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/pantheon-org/opencode-plugins --skill git-commit-pantheon-org
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit
Source: https://github.com/pantheon-org/opencode-plugins/tree/main/.opencode/skills/git-commit
Command: npx skills add https://github.com/pantheon-org/opencode-plugins --skill git-commit-pantheon-org

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill ensures safe git commits by syncing with remotes, rebasing when necessary, and enforcing all configured git hooks to run before the commit is finalized.

Core Features & Use Cases

  • Auto-fetch latest changes and rebase from the same-name remote when available, or from origin/main if not.
  • Enforce pre-commit and commit-msg hooks to validate changes and prevent broken commits.
  • Prevent diverged histories by guiding a clean rebase workflow and providing clear error handling during conflicts.
  • Use Case: Before pushing a feature branch, run this skill to guarantee hooks pass and the local history is up-to-date.

Quick Start

Use this skill before committing to ensure your branch is up-to-date, rebased, and hooks are executed automatically.

Frequently Asked Questions about git-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate git commits with rebasing and hooks?

Automate git commits by fetching remote changes, rebasing from origin/<branch> or origin/main, and enforcing pre-commit and commit-msg hooks to validate changes before finalizing. This ensures local history remains clean and up-to-date before pushing.

What is the best way to prevent diverged git histories in collaborative workflows?

Prevent diverged git histories by auto-fetching remote changes and rebasing from the same-name remote branch when available, or from origin/main otherwise, ensuring your local history stays clean and synchronized before pushing.

Can I bypass pre-commit hooks when committing to a remote branch?

No, this skill enforces no bypass of hooks. It strictly enforces pre-commit and commit-msg hooks to validate changes and prevent broken commits, ensuring all configured git hooks run before the commit is finalized.

How do I handle rebase conflicts during an automated git commit?

Handle rebase conflicts by following the guidance provided during the rebase workflow. The skill offers clear error handling and instructions to resolve conflicts when rebasing from origin/<branch> or origin/main.

Does this skill rebase from origin/main or my current branch's remote?

It rebases from origin/<branch> when a same-name remote exists, or from origin/main if not. This mechanism ensures your local history is up-to-date with the appropriate remote branch before committing.

Why do I need to sync with remotes before committing to a feature branch?

Syncing with remotes before committing fetches the latest changes and rebases when necessary, preventing diverged histories and ensuring your feature branch is up-to-date and clean before you push.