com um clique
speckit-git-feature
Create a feature branch with sequential or timestamp numbering
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Create a feature branch with sequential or timestamp numbering
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
| name | speckit-git-feature |
| description | Create a feature branch with sequential or timestamp numbering |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"git:commands/speckit.git.feature.md"} |
Create and switch to a new git feature branch for the given specification. This command handles branch creation only — the spec directory and files are created by the core /speckit-specify workflow.
When the Graphite CLI (gt) is installed and the repo is initialized (gt init), the script creates the branch with gt create, producing a tracked, stackable branch on top of the current branch. The branch can later be submitted as a PR (with its whole stack) via /speckit-git-submit. If gt is unavailable or fails, the script silently falls back to git checkout -b. Branch naming and JSON output are identical in both paths.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
If the user explicitly provided GIT_BRANCH_NAME (e.g., via environment variable, argument, or in their request), pass it through to the script by setting the GIT_BRANCH_NAME environment variable before invoking the script. When GIT_BRANCH_NAME is set:
--short-name, --number, and --timestamp flags are ignoredFEATURE_NUM is extracted from the name if it starts with a numeric prefix, otherwise set to the full branch namegit rev-parse --is-inside-work-tree 2>/dev/nullDetermine the branch numbering strategy by checking configuration in this order:
.specify/extensions/git/git-config.yml for branch_numbering value.specify/init-options.json for branch_numbering value (backward compatibility)sequential if neither existsGenerate a concise short name (2-4 words) for the branch:
Run the appropriate script based on your platform:
.specify/extensions/git/scripts/bash/create-new-feature.sh --json --short-name "<short-name>" "<feature description>".specify/extensions/git/scripts/bash/create-new-feature.sh --json --timestamp --short-name "<short-name>" "<feature description>".specify/extensions/git/scripts/powershell/create-new-feature.ps1 -Json -ShortName "<short-name>" "<feature description>".specify/extensions/git/scripts/powershell/create-new-feature.ps1 -Json -Timestamp -ShortName "<short-name>" "<feature description>"IMPORTANT:
--number — the script determines the correct next number automatically--json for Bash, -Json for PowerShell) so the output can be parsed reliablyBRANCH_NAME and FEATURE_NUMIf Git is not installed or the current directory is not a Git repository:
[specify] Warning: Git repository not detected; skipped branch creationBRANCH_NAME and FEATURE_NUM so the caller can reference themThe script outputs JSON with:
BRANCH_NAME: The branch name (e.g., 003-user-auth or 20260319-143022-user-auth)FEATURE_NUM: The numeric or timestamp prefix usedAuto-commit changes after a Spec Kit command completes
Initialize a Git repository with an initial commit
Submit the current stack as pull requests using Graphite (gt submit)