speckit-git-initialize

Initialize a Git repository with an initial commit for spec-kit projects.

Updated May 3, 2026
One-click install
npx skills add https://github.com/tykhoncode/dicekit --skill speckit-git-initialize-tykhoncode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: speckit-git-initialize
Source: https://github.com/tykhoncode/dicekit/tree/main/.claude/skills/speckit-git-initialize
Command: npx skills add https://github.com/tykhoncode/dicekit --skill speckit-git-initialize-tykhoncode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of bootstrapping version control for a new project by creating a Git repository and an initial commit without manual setup.

Core Features & Use Cases

  • Detects whether Git is usable and needed: skips initialization when Git is unavailable or when the project is already inside a Git repository.
  • Runs a consistent initialization workflow: performs repository setup, stages files, and creates an initial commit using the template’s expected commit message.
  • Uses extension-provided scripts when available: prefers Bash or PowerShell initializer scripts for spec-kit compatible project structures, then falls back to a generic Git sequence.

Use Case: Start tracking changes for a freshly generated spec-kit project so you can immediately open PRs, run CI, and maintain a clean history from day one.

Quick Start

Run the speckit-git-initialize skill from the project root to initialize Git and create the first commit.

Frequently Asked Questions about speckit-git-initialize

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

FAQPage Schema
How do I initialize a Git repository with an initial commit for a new project?

To initialize a Git repository with a safe initial commit, you can run a bootstrap process that stages all changes and commits them. This detects existing repository state to avoid double-initialization and fails fast on errors.

Why does Git initialization fail or duplicate history in fresh template directories?

Git initialization duplicates history when repository state detection is skipped. A safe initialization sequence checks Git availability and existing repository status before running, ensuring it skips when already inside a Git repository.

What's the best way to bootstrap version control in a spec-kit project?

The best way to bootstrap version control in a spec-kit project is to run extension-provided Bash or PowerShell initializer scripts. If unavailable, the system falls back to a generic Git sequence to stage and commit files.

Do I need Git installed to create an initial commit for repository bootstrapping?

Yes, Git must be available to create an initial commit for repository bootstrapping. The initialization workflow checks Git availability first and skips the setup process entirely if Git is not installed on the system.

Can I run repository initialization scripts inside an existing Git repository?

Repository initialization scripts skip the setup process when run inside an existing Git repository. The workflow detects the current repository state to avoid double-initialization and only stages changes and commits in fresh template directories.

When should I avoid running a Git initialization script?

You should avoid running a Git initialization script when your project is already inside a Git repository or when Git is unavailable. The script fails fast on git init, add, or commit errors to prevent partial repository states.