rails-cto-commit
The commit skill. Stages and commits all outstanding changes with a clear, human-friendly message.
What it does
When you're ready to save your work, this skill:
- Runs
git statusandgit diffto understand what changed - Runs
git logto match the repo's existing commit message style - Drafts a concise, human-friendly commit message — one or two sentences focused on why, not what
- Stages the relevant files (no blind
git add -A— explicit files only) - Creates the commit
- Optionally pushes to the remote — only after the user confirms
- Runs
git statusto verify success
Rules the skill follows:
- Never amends existing commits unless explicitly asked
- Never uses
--no-verifyto skip hooks - Never force-pushes without explicit permission
- Never commits files that might contain secrets (
.env, credentials, keys) - Warns if pre-commit hooks fail and fixes the underlying issue instead of bypassing
When it triggers
- When you say commit this, save my progress, push this up, ship it, commit all, commit and push
- When you invoke
/commit-all
Does not handle cherry-picking, rebasing, merging, or any advanced git operations.
Example
You: commit this and push
Agent: [invokes /rails-cto-commit]
[runs git status, git diff, git log]
[drafts the message]
Commit message:
Add cursor-based pagination to the bookmarks API
Lets clients page through large result sets without the
offset-based N+1 that was slowing down the mobile app.
Ready to commit 3 files:
M app/controllers/api/v1/bookmarks_controller.rb
M app/serializers/bookmark_serializer.rb
A test/controllers/api/v1/bookmarks_controller_test.rb
Push to origin/matt/cursor-pagination after commit? (y/n)
You: y
Agent: [creates commit]
[git push origin matt/cursor-pagination]
[verifies git status → clean]