Commit

From tam159/next-role · View interactive version

Commit is an AI agent skill from the GitHub repository tam159/next-role. Stage current changes and create a Conventional Commits-style commit matching this repo's history. Use when the user says "commit", "commit this", or asks for a commit message. Pre-commit hooks will run automatically.

How to use this skill

Skill file

Create a single commit using Conventional Commits format, matching the style in git log.

Workflow

  1. Run these in parallel:
  1. Review the changes and group them into ONE commit. If the diff spans clearly unrelated changes, ask the user whether to split.
  1. Stage explicitly (avoid git add -A / git add .):
  1. Compose the commit message:
  1. Commit with a HEREDOC so formatting survives:

```bash

git commit -m "$(cat <<'EOF'

feat: <subject>

<optional body>

EOF

)"

```

  1. Pre-commit will run automatically. If it modifies files (auto-fix), re-stage and create a NEW commit — do not amend unless the user asks. If hooks fail with errors, fix the underlying issue and create a new commit; never bypass with --no-verify.
  1. After the commit succeeds, run git status to confirm a clean tree and report the commit SHA + subject.

Do not

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.