agentleFS
allieraysallierays/agentic-loop/.claude/skills/commit/SKILL.md

commit

Skill38 starsChanged 9 months agoMITView on GitHub

Commit code with conventional commit messages tied to task context. Never skips hooks.

  • Reads credentials

193 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use create-branch, review-r and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    create-branch

    Create a git branch following Sentry naming conventions. Use when asked to "create a branch", "new branch", "start a branch", "make a branch", "switch to a new branch", or when starting new work on the default branch.

    Also in 4 projects that use this

  • luischanciSkill

    review-r

    Run the R code review protocol on R scripts. Checks code quality, reproducibility, domain correctness, and professional standards. Produces a report without editing files.

    Also in 3 projects that use this

  • MicrosoftSkill

    act-on-feedback

    Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.

    Also in 3 projects that use this

  • MicrosoftSkill

    generate-run-commands

    Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.

    Also in 3 projects that use this

  • AWSSkill

    issue

    Implement a GitHub issue end-to-end — branch, code, test, docs, and commit.

    Also in 9 projects that use this

  • luischanciSkill

    validate-bib

    Validate bibliography entries against citations in all manuscript files. Find missing entries and unused references.

    Also in 3 projects that use this

  • +2 more from luischanci

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 11 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 174 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a well-structured git commit with a conventional commit message derived from the current task context.

    line 7
  2. Distinctive:

    Run these in parallel:

    line 17
  3. Distinctive:

    Look for task context to derive the commit message from.

    line 31
  4. Distinctive:

    Use conventional commits format matching this repo's style:

    line 39
  5. Very specific:

    If working on a Ralph story: use the story ID — e.g., feat(story-3): add user auth

    line 58
  6. Very specific:

    If working on a specific module: use the module name — e.g., fix(loop): handle empty config

    line 59
  7. Very specific:

    If broad/cross-cutting: omit scope — e.g., chore: bump version to 3.28.0

    line 60
  8. Distinctive:

    Start with lowercase after the colon

    line 63
  9. Distinctive:

    Keep the first line under 72 characters

    line 65
  10. Distinctive:

    If more detail is needed, add a blank line and a body paragraph

    line 66
  11. Distinctive:

    Run git status: after to confirm it succeeded

    line 94
  12. Distinctive:

    If pre-commit hooks fail:

    line 98
  13. Very specific:

    If hooks auto-fix files (e.g., prettier, eslint --fix):

    line 105
  14. Distinctive:

    If the user says "just commit it" or similar, still follow the process — just skip the AskUserQuestion confirmation

    line 114
  15. Distinctive:

    If there are no changes to commit, say so and stop

    line 115
  16. Very specific:

    When in doubt about the type, feat for new things, fix for broken things, chore for everything else

    line 117

“Common” is measured: kept by at least 6 in 10 of the 174 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Commit Changes

Create a well-structured git commit with a conventional commit message derived from the current task context.

Rules

  • NEVER use --no-verify. Pre-commit hooks exist for a reason. If hooks fail, fix the issues and retry.
  • NEVER use git add -A or git add . unless every changed file is relevant. Stage files by name.
  • NEVER amend a previous commit unless the user explicitly asks for it.

Step 1: Understand What Changed

Run these in parallel:

  1. git status — see all changed, staged, and untracked files
  2. git diff — see unstaged changes
  3. git diff --cached — see already-staged changes
  4. git log --oneline -5 — see recent commit style for this repo

Review the changes and identify:

  • Which files are related to the current task
  • Which files are unrelated noise (editor configs, lock files from unrelated installs, etc.)
  • Whether any files contain secrets, .env content, or credentials — never commit those

Step 2: Find the Task Context

Look for task context to derive the commit message from. Check in order:

  1. Ralph PRD story — if there's an active story, check .ralph/progress.txt for the current story ID and title. The commit message should reference this.
  2. Recent conversation — what did the user ask you to do? Use that as the commit description.
  3. The diff itself — if no other context, derive the purpose from the actual code changes.

Step 3: Craft the Commit Message

Use conventional commits format matching this repo's style:

type(scope): concise description of WHY

Types (pick the right one)

TypeWhen to use
featNew feature or capability
fixBug fix
choreMaintenance, deps, config, version bumps
testAdding or fixing tests
docsDocumentation only
refactorCode restructuring, no behavior change
styleFormatting, whitespace, naming
ciCI/CD pipeline changes

Scope

  • If working on a Ralph story: use the story ID — e.g., feat(story-3): add user auth
  • If working on a specific module: use the module name — e.g., fix(loop): handle empty config
  • If broad/cross-cutting: omit scope — e.g., chore: bump version to 3.28.0

Message rules

  • Start with lowercase after the colon
  • Focus on why, not what — the diff shows what
  • Keep the first line under 72 characters
  • If more detail is needed, add a blank line and a body paragraph

Examples from this repo

feat: add Working Principles to CLAUDE.md and plansDirectory to settings
feat(story-3): add user authentication with JWT
fix: bash 3.2 unbound variable when run_loop called with no args
chore: bump version to 3.27.1
test(api): add integration tests for /users endpoint
refactor: extract verification into separate modules

Step 4: Stage and Commit

  1. Stage only the relevant files by name — do NOT use git add -A or git add .
  2. Show the user the proposed commit message and list of staged files before committing
  3. Ask if the message looks right using AskUserQuestion with options:
    • "Looks good, commit it"
    • "Let me edit the message" (then ask for their preferred message)
  4. Run the commit — use a HEREDOC for the message:
git commit -m "$(cat <<'EOF'
type(scope): message here
EOF
)"
  1. Run git status after to confirm it succeeded

Step 5: Handle Hook Failures

If pre-commit hooks fail:

  1. Read the hook output carefully
  2. Fix the issues the hooks identified (lint errors, secrets detected, etc.)
  3. Re-stage the fixed files
  4. Commit again — same message, same process, NO --no-verify

If hooks auto-fix files (e.g., prettier, eslint --fix):

  1. Review the auto-fixes
  2. Stage the auto-fixed files
  3. Retry the commit

If you cannot resolve hook failures after 5 attempts, stop and explain the issue to the user. Do NOT bypass hooks.

Notes

  • If the user says "just commit it" or similar, still follow the process — just skip the AskUserQuestion confirmation
  • If there are no changes to commit, say so and stop
  • Group related changes into one commit; suggest splitting if changes are unrelated
  • When in doubt about the type, feat for new things, fix for broken things, chore for everything else

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.