git-commit
Interactive git commit flow with branch selection and contextual commit messages.
- License 许可
- AGPL-3.0
- 最近更新
- 2026-08-15
- Stars
- ★ 30
- Forks
- 7
01 前言 Front Matter
- name
- git-commit
- description
- Interactive git commit flow with branch selection and contextual commit messages.
- allowed-tools
- Bash, Question
- argument-hint
- [--branch current|new] [--name <branch-name>]
- disable-model-invocation
- true
02 资源文件 3
- 参考文档commands/git-commit.md2.9 KB
- 参考文档manifest.yaml652 B
- 脚本scripts/git-commit.js16.9 KB
03 SKILL.md 正文
Git Commit
Purpose
Create a local git commit through a guided branch-selection flow that always shows the current branch, optionally creates or switches to a new branch, generates a contextual commit message, and commits all repository changes safely.
Inputs
-
Optional flags:
--branch current|new,--name <branch-name> -
Template paths are resolved from
${AGENTS_SKILLS_ROOT}/git-commit/.
Steps
- Follow the command specification in
${AGENTS_SKILLS_ROOT}/git-commit/commands/git-commit.mdexactly. - Use
${AGENTS_SKILLS_ROOT}/git-commit/scripts/git-commit.js inspectbefore asking any questions.- Read the current branch, detached-head state, protected-branch status, change counts, and suggested branch name from the JSON output.
- If the user did not explicitly choose a branch mode with arguments, ask a single branch-selection question.
- Show the current branch in the option label.
- Recommended option: keep the current branch when it is not protected.
- Recommended option: create a new branch when the current branch is
mainordev.
- If the user chooses a new branch and did not already provide
--name, ask for the new branch name.- Show the script-provided
suggestedBranchNameas the recommended default. - Require a valid git branch name; if invalid, stop and explain the expected format.
- Show the script-provided
- Before committing, protect against obvious secret commits.
- If any staged or unstaged path matches
.env,.env.*,*.pem,*.key,credentials.json, orsecrets.*, stop and warn instead of committing automatically.
- If any staged or unstaged path matches
- Use
${AGENTS_SKILLS_ROOT}/git-commit/scripts/git-commit.js commitas the deterministic executor.- It must switch or create the selected branch, run
git add -A, generate the commit subject/body from staged changes, and create the commit. - It must return structured JSON with the selected branch, generated message, commit hash, and whether a branch was created.
- It must switch or create the selected branch, run
- If the commit fails because a hook changes files, re-run
${AGENTS_SKILLS_ROOT}/git-commit/scripts/git-commit.js committo create a new commit with the updated staged state.- Do not amend unless the user explicitly asks.
- Return a concise summary with the selected branch, whether it was current/new, the generated commit message, and final git status.
Output
- Selected branch and whether the skill stayed on the current branch or created/switched to another branch.
- Generated commit subject and body summary grounded in the actual staged changes.
- Commit hash and final working-tree status, or a plain-language reason the commit was blocked.
04 同仓库更多 Skills
wiki-research
Autonomous research orchestrator for Jarvis Wiki domains. Spawns a Claude agent with web tools to find new sources, drops them into raw/, runs the compile pipeline, and emits autoresearch traces for the autoflow ratchet.
tmux-agent-launcher
Launch Claude, OpenCode, or Codex in a named tmux session from the command line or agent workflows.
test-quality-validator
Validate generated or hand-written tests for coverage completeness, correctness, and false-green risks using the canonical QA runtime, regression artifacts, and optional delivery-profile rules.
tech-spec
Generate production-ready technical specifications from product specs.
tech-spec-review
Seven-lens engineering review for technical_spec.md files, including an explicit simplicity and architectural fitness gate.
spec-to-regression
Generate browser and API regression scenarios from approved product and technical specs using the Harnessy delivery profile and regression artifact contract.