speckit-git-initialize

Initializes a Git repository with an initial commit in spec-kit projects.

Updated May 22, 2026
One-click install
npx skills add https://github.com/WU-MAO-CHIA/AI_tset_platfrom --skill speckit-git-initialize-wu-mao-chia
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: speckit-git-initialize
Source: https://github.com/WU-MAO-CHIA/AI_tset_platfrom/tree/main/.opencode/skills/speckit-git-initialize
Command: npx skills add https://github.com/WU-MAO-CHIA/AI_tset_platfrom --skill speckit-git-initialize-wu-mao-chia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up version control is a required first step for any new project, but manually running git init, staging files, and creating the first commit is repetitive and easy to forget. This Skill automates Git repository initialization for spec-kit projects, handling edge cases like missing Git installations or existing repositories. ## Core Features & Use Cases - Automated Repository Setup: Runs git init, git add, and an initial commit through dedicated Bash or PowerShell scripts. - Graceful Degradation: Skips initialization safely when Git is unavailable or the directory is already a repository, so project work can continue. - Customizable Hooks: Supports project-specific extensions such as .gitignore templates, default branch naming, Git LFS, and commit signing. - Use Case: After scaffolding a new spec-kit project with a .specify/ directory, invoke this Skill to immediately place the project under version control with a clean initial commit. ## Quick Start Initialize a Git repository with an initial commit in my current spec-kit project directory.

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?▼

Run git init, git add ., and git commit with an initial message from the project root. This Skill automates those steps via Bash or PowerShell scripts located under .specify/extensions/git/scripts/.

What happens if Git is not installed when initializing a repository?▼

The initialization is skipped gracefully with a warning to the user. The project continues to function without Git, and specification files can still be created under the specs/ directory.

Does git init fail if the directory is already a repository?▼

The script checks whether the directory is already inside a Git repository and skips initialization if so. This makes the command safe to run multiple times without side effects.

Can I customize the initial Git setup for my project?▼

Yes, you can replace the initialization script to add custom .gitignore templates, default branch naming, Git LFS setup, Git hooks, commit signing, or Git Flow initialization.

Why does git commit fail after git init in a new project?▼

Commits fail when no user name or email is configured, or when there are no files to stage. If git init, add, or commit fails, the Skill surfaces the error and stops rather than leaving a partially initialized repository.