Commit the current changes. This skill has no subcommands and does not open a pull request.
Use the harness's shell, file, and search tools. When a step needs a choice, ask the user, with the harness's question tool when it has one. Do not add an AI attribution footer.
Interactive commands
When a git command would need interactive input, use a non-interactive alternative. Do not use git add -p unless the harness can drive the interaction. Otherwise stage explicit files or ask the user which files to include.
Files to leave unstaged
Do not stage or commit any of the following:
- OS artifacts:
.DS_Store,Thumbs.db,Desktop.ini,._* - Editor and IDE files:
.idea/,.vscode/settings.json,*.swp,*.swo,*~ - Build artifacts:
_build/,deps/,node_modules/,dist/,*.beam - Temp and debug files:
*.log,*.tmp,*.bak,*.orig,dump.rdb - Secrets:
.env,.env.*except.env.sampleand.env.example, andcredentials.* - Any file already covered by
.gitignore
When a file might belong on this list and the change also needs it, ask the user before staging it.
Group the commits
Review the changes and organize them into logical units before committing.
- Group related changes. The same feature, bug fix, or refactor belongs together.
- Separate unrelated changes. Different fixes or features get separate commits.
- Each commit should be independently revertible.
- Keep formatting separate from logic changes.
When changes span multiple concerns, stage specific files to create separate commits. Use partial staging only when the harness supports it safely. Otherwise ask the user how to split the changes.
Commit
- Run
git statusto see staged, unstaged, and untracked files. - Run
git diffandgit diff --cachedto review the changes. - Leave every file in the skip list unstaged. Stage the related files that remain, including new files that are part of the change.
- Group the remaining changes. When they cover more than one concern, make one commit per group, in dependency order. Migrations and schema changes go with the code that uses them. Test files go with the code they test.
- For each group, stage only that group's files with
git add <file1> <file2>and commit. - Use the message format below. When the user included a message, use it as the description.
type: concise description
Optional body for context
Types are feat, fix, chore, docs, refactor, test, and style.
- Do not add an AI attribution footer.
- Show the commits you made.
- Ask whether to push. Do not open a pull request. Opening one is the
gs-pull-requestskill.
Errors
When a command fails, say what failed, suggest a fix, and ask whether to retry or stop.