speckit-git-commit

Automatically stage and commit Spec Kit-generated repository changes after hook events based on git-config.yml settings.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/kamalsroor1/nest-scaffolding-crud-manager --skill speckit-git-commit-kamalsroor1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: speckit-git-commit
Source: https://github.com/kamalsroor1/nest-scaffolding-crud-manager/tree/main/.agent/skills/speckit-git-commit
Command: npx skills add https://github.com/kamalsroor1/nest-scaffolding-crud-manager --skill speckit-git-commit-kamalsroor1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the repetitive task of staging and committing repository changes that result from Spec Kit commands so developers don't forget to persist generated or scaffolded files and configuration changes.

Core Features & Use Cases

  • Hook-aware commits: Detects the hook event (for example after_specify or before_plan) and decides whether to commit based on configured rules.
  • Config-driven behavior: Reads .specify/extensions/git/git-config.yml to check auto_commit settings with per-event overrides and a default fallback.
  • Custom commit messages: Uses per-command message when provided and a sensible default when not.
  • Graceful degradation: Skips with warnings if Git is unavailable, if the directory is not a repository, if no config exists, or if there are no changes to commit.
  • Cross-shell support: Invokes shell-specific helper scripts for Bash and PowerShell execution contexts.

Quick Start

Run the speckit-git-commit auto-commit hook for the after_specify event to stage and commit any modified files if the project's auto_commit settings enable it.

Frequently Asked Questions about speckit-git-commit

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

FAQPage Schema
How do I automatically commit Spec Kit files after running hooks?

To automatically commit Spec Kit files, you can use an auto-commit hook that triggers after events like after_specify or before_plan. It checks your project's git-config.yml settings and runs git add and commit if enabled.

What is the best way to stage and commit Spec Kit changes without manual git commands?

The best way to stage and commit Spec Kit changes automatically is by using a hook-aware automation tool. It reads per-event messages from git-config.yml and executes git add . plus git commit when modifications exist.

Does the auto-commit hook work if my project lacks a git-config.yml file?

No, the auto-commit hook requires a .specify/extensions/git/git-config.yml file to function. If the config is missing or Git is unavailable, the hook degrades gracefully and skips the commit with a warning.

Can I customize commit messages for different Spec Kit hook events?

Yes, you can customize commit messages for different Spec Kit hook events by defining per-event messages in your git-config.yml. The hook applies these custom messages and falls back to a default if none are provided.

What happens when the auto-commit hook runs but there are no repository changes?

When the auto-commit hook runs and finds no repository changes to commit, it gracefully skips the commit process. This prevents empty commits and ensures clean git history after Spec Kit commands.

Do I need Git installed to use Spec Kit auto-commit hooks?

Yes, Git must be installed and the directory must be a repository to use Spec Kit auto-commit hooks. The hook gracefully skips execution with a warning if Git is unavailable or the directory is not initialized.