Skip to content

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:

  1. Runs git status and git diff to understand what changed
  2. Runs git log to match the repo's existing commit message style
  3. Drafts a concise, human-friendly commit message — one or two sentences focused on why, not what
  4. Stages the relevant files (no blind git add -A — explicit files only)
  5. Creates the commit
  6. Optionally pushes to the remote — only after the user confirms
  7. Runs git status to verify success

Rules the skill follows:

  • Never amends existing commits unless explicitly asked
  • Never uses --no-verify to 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]

View source

skills/rails-cto-commit/SKILL.md on GitHub →

Released under the MIT License.