commit

Analyze Git changes, propose Conventional Commits, and commit after approval.

1|1|Updated Feb 28, 2024
One-click install
npx skills add https://github.com/jiyeol-lee/dotfiles --skill commit-jiyeol-lee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit
Source: https://github.com/jiyeol-lee/dotfiles/tree/main/.opencode/skills/commit
Command: npx skills add https://github.com/jiyeol-lee/dotfiles --skill commit-jiyeol-lee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill analyzes repository state, proposes commit messages following Conventional Commits, and applies commits after user approval. Use when asked to "commit", "commit changes", "save my work", "create a commit", or "stage and commit".

Core Features & Use Cases

  • Preflight: Check repository state with tool__git--status; if no changes exist, report and stop.
  • Analyze changes: Retrieve current branch diff with tool__git--retrieve-current-branch-diff; categorize changes (feat, fix, docs, chore, etc.).
  • Propose staging: If there are unstaged changes, ask the user which files to stage and list each file with its change type.
  • Draft commit message: Generate a lowercase Conventional Commit message; include body for complex changes and a footer for breaking changes or issue refs.
  • Ask for approval: Present the draft and ask for approval before executing.
  • Commit: Stage the selected files with tool__git--stage-files and commit with tool__git--commit; handle pre-commit hooks; offer to push after successful commit; report SHA and summary.

Quick Start

Review repository state, generate a conventional-commit plan, and approve the final commit.

Frequently Asked Questions about commit

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

FAQPage Schema
How do I generate conventional commit messages automatically from my git diff?

You can generate conventional commit messages automatically by analyzing your repository state and current branch diff. The system categorizes changes into types like feat, fix, or docs, drafts a lowercase message, and asks for your approval before executing the commit.

What is the conventional commits format and when do I need it for my git workflow?

The conventional commits format structures git commit messages with specific prefixes like feat, fix, or chore to indicate change types. You need it to standardize commit history, automate changelog generation, and clearly communicate the nature of changes to your team.

Can I stage specific files before creating a conventional commit?

Yes, you can stage specific files before committing. If unstaged changes exist, the system lists each file alongside its categorized change type and asks you to select which files to stage before drafting the commit message.

How do I handle breaking changes and issue references in an automated commit message?

To handle breaking changes and issue references, the automated commit message generator adds a structured footer to the commit body. This footer explicitly flags breaking changes or links issue references according to the conventional commits specification.

Does the automated commit process support pre-commit hooks and pushing to remote?

Yes, the automated commit process supports pre-commit hooks during execution and offers to push to the remote repository after a successful commit. It reports the final commit SHA and a summary of the applied changes.

What happens if I try to commit when there are no repository changes?

If there are no repository changes, the preflight check detects the clean state via git status, reports that no changes exist, and stops the commit process immediately without attempting to stage or commit anything.