Agent skill

git-commit-helper

Stars 0
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/cuba6112/skillfactory/tree/main/skills/git-commit-helper

SKILL.md

Git Commit Helper

Overview

Conventional Commits provide a standardized format for commit messages, enabling automated versioning and clearer project history. This skill covers formatting, managing breaking changes, and using advanced Git features like fixup for a clean history.

When to Use

  • Professional Collaboration: To make histories readable and searchable.
  • Automated Releases: To trigger Semantic Versioning bumps (PATCH/MINOR/MAJOR).
  • Clean History: To fix small mistakes in previous commits without creating "junk" commits.

Decision Tree

  1. Does the change add a new capability?
    • YES: Type feat (MINOR bump).
  2. Does it fix a bug?
    • YES: Type fix (PATCH bump).
  3. Does it break backward compatibility?
    • YES: Append ! after type/scope OR add BREAKING CHANGE: footer (MAJOR bump).
  4. Did you forget a small detail in the last commit?
    • YES: Use git commit --amend or --fixup.

Workflows

1. Formatting a Feature Commit

  1. Start the message with feat and an optional scope in parentheses (e.g., feat(auth):).
  2. Provide a concise description of the new capability.
  3. If the change breaks compatibility, append ! to the type or add a BREAKING CHANGE: footer.
  4. Run git commit -m "..." using the formatted string.

2. Using Fixup for Clean History

  1. Identify the SHA of the commit needing a minor fix.
  2. Run git commit --fixup <SHA> to stage the fix as a fixup! commit.
  3. Later, perform git rebase -i --autosquash to automatically merge the fix into the original commit.

3. Amending the Last Commit

  1. Stage any missed changes using git add.
  2. Run git commit --amend --no-edit to update the last commit with new files while keeping the same message.
  3. Alternatively, use --amend without --no-edit to refine the commit message structure.

Non-Obvious Insights

  • Case Sensitivity: Conventional Commit units are not case-sensitive, EXCEPT for BREAKING CHANGE, which MUST be uppercase.
  • Breaking Change Indicator: The ! indicator is a shorthand for marking API breaks without needing a full footer.
  • Trailers: Footers should follow the Git trailer convention (word-token: value) to be recognized by automated tools.

Evidence

  • "feat: a commit of the type feat introduces a new feature... (this correlates with MINOR in Semantic Versioning)." - Conventional Commits
  • "The units... MUST NOT be treated as case sensitive... with the exception of BREAKING CHANGE which MUST be uppercase." - Conventional Commits
  • "--fixup=reword: creates an 'amend!' commit which replaces the log message..." - Git Docs

Scripts

  • scripts/git-commit-helper_tool.py: Script to generate conventional commit messages via CLI.
  • scripts/git-commit-helper_tool.js: Shell wrapper for executing fixup and amend commands.

Dependencies

  • git (CLI tool)

References

  • references/README.md

Expand your agent's capabilities with these related and highly-rated skills.

cuba6112/skillfactory

prompt-engineering

Comprehensive prompt engineering techniques for Claude models. Use this skill when crafting, optimizing, or debugging prompts for Claude API, Claude Code, or any Claude-powered application. Covers system prompts, role prompting, multishot examples, chain of thought, XML structuring, long context handling, extended thinking, prompt chaining, Claude 4.x-specific best practices, and agentic orchestration including subagents, agent loops, skills, MCP integration, and multi-agent workflows.

0 0
Explore
cuba6112/skillfactory

adk-rag-agent

Build RAG (Retrieval-Augmented Generation) agents with Google ADK and Vertex AI RAG Engine. Use when implementing document Q&A, knowledge base search, or citation-backed responses. Covers VertexAiRagRetrieval tool, corpus setup, and citation formatting.

0 0
Explore
cuba6112/skillfactory

headless-cli-agents

Build agentic systems using Claude CLI in headless mode or the Claude Agent SDK. Use when building automation pipelines, CI/CD integrations, multi-agent orchestration, or programmatic Claude interactions. Covers CLI flags (-p, --output-format), session management (--resume, --continue), Python SDK (claude-agent-sdk), custom tools, and agent loop patterns.

0 0
Explore
cuba6112/skillfactory

notion-knowledge-capture

Capture conversations and decisions into structured Notion pages; use when turning chats/notes into wiki entries, how-tos, decisions, or FAQs with proper linking.

0 0
Explore
cuba6112/skillfactory

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

0 0
Explore
cuba6112/skillfactory

gh-fix-ci

Inspect GitHub PR checks with gh, pull failing GitHub Actions logs, summarize failure context, then create a fix plan and implement after user approval. Use when a user asks to debug or fix failing PR CI/CD checks on GitHub Actions and wants a plan + code changes; for external checks (e.g., Buildkite), only report the details URL and mark them out of scope.

0 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results