agentleFS
Moriarty33Moriarty33/jb-kaizen/skills/commit/SKILL.md

commit

Skill1 starsChanged 5 days agoMITView on GitHub

Create git commits with proper ticket formatting. Project-agnostic - reads ticket pattern, lint command, and commit format from .claude/dev.config.json or package.json. Auto-stages changes, runs project linter, extracts ticket ID from branch name. Invoke with /kaizen:commit (or /commit on a clone install).

  • Reads credentials

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use validate-plan, act-on-feedback 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.
  • shawn-dumasSkill

    validate-plan

    Validate an orchestration plan after pre-flight certification. Runs adversarial review, deep review (verify prompt data against codebase), and PoC gate for risky approaches. Auto-invoked by orchestrate-* skills at Step 8.

    Also in 5 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

  • decocmsSkill

    add-mcp-tools

    Guide for adding new MCP tools with consistent patterns for schemas, tool definitions, registry updates, and Better Auth integration

    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

  • mitsuhikoSkill

    oebb-scotty

    Austrian rail travel planner (ÖBB Scotty). Use when planning train journeys in Austria, checking departures/arrivals at stations, or looking for service disruptions. Covers ÖBB trains, S-Bahn, regional trains, and connections to neighboring countries.

    Also in 3 projects that use this

  • mitsuhikoSkill

    pi-share

    Load and parse session transcripts from shittycodingagent.ai/buildwithpi.ai/buildwithpi.com/pi.dev (pi-share) URLs. Fetches gists, decodes embedded session data, and extracts conversation history.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 168 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    .claude/dev.config.json: - read ticketPattern, commit.messageFormat, commit.maxLength, commit.skipBranches, and per-repo …

    line 17
  2. Distinctive:

    If no changes, inform user and stop.

    line 36
  3. Very specific:

    If branch matches any pattern in config.commit.skipBranches, skip ticket prefix - use plain description.

    line 44
  4. Distinctive:

    If pattern doesn't match, ask the user whether to commit without a ticket prefix.

    line 51
  5. Very specific:

    If sensitive files (.env, credentials) appear in git status, warn and exclude them.

    line 59
  6. Distinctive:

    STOP - do not commit broken code

    line 66
  7. Distinctive:

    If no linter found, skip silently.

    line 69
  8. Distinctive:

    If the linter ran and modified files (lint-fix), re-stage them so the fixes are included in this commit: git add -u (plus any newly created …

    line 71
  9. Distinctive:

    If linter fails, STOP and show errors

    line 161
  10. Distinctive:

    If no changes exist, inform user and stop

    line 162
  11. Distinctive:

    If ticket pattern unclear, ask user

    line 163

“Common” is measured: kept by at least 6 in 10 of the 168 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

Shipped with JB Kaizen. Create git commits with consistent ticket formatting. Reads project configuration to stay project-agnostic.

Git conventions (git -C, branch naming, commit format, safety) follow the github skill shipped alongside. This skill keeps its own staging/lint flow and message-guideline examples below.

Configuration Discovery

Resolve in order. .claude/dev.config.json is searched from the current directory upward to $HOME (or the filesystem root); the first one found wins.

  1. .claude/dev.config.json - read ticketPattern, commit.messageFormat, commit.maxLength, commit.skipBranches, and per-repo commands[repo].lintFix
  2. <cwd>/CLAUDE.md section ## Commit Format (e.g. Ticket pattern: TICKET-\d+)
  3. <cwd>/package.json scripts: lint:fix -> lint --fix -> lint
  4. Defaults:
    • ticketPattern: [A-Z]+-\d+
    • messageFormat: {ticket}: {message} when ticket present, otherwise just {message}
    • maxLength: 72
    • skipBranches: develop, master, main, release/*, hotfix/*

Instructions

Step 1: Check Git Status

git status
git diff
git log --oneline -5

If no changes, inform user and stop.

Step 2: Get Branch Name & Extract Ticket

git branch --show-current

If branch matches any pattern in config.commit.skipBranches, skip ticket prefix - use plain description.

Otherwise apply config.ticketPattern to the branch name. Examples:

  • feature/TICKET-1234-add-login -> TICKET-1234
  • PROJ-567/fix-bug -> PROJ-567

If pattern doesn't match, ask the user whether to commit without a ticket prefix.

Step 3: Stage Changes

git add .

If sensitive files (.env, credentials) appear in git status, warn and exclude them.

Step 4: Run Linter (if configured)

Resolve lint-fix command from config / package.json. Run it. If lint fails with errors:

  1. Show errors
  2. STOP - do not commit broken code
  3. User must fix first

If no linter found, skip silently.

If the linter ran and modified files (lint-fix), re-stage them so the fixes are included in this commit: git add -u (plus any newly created files). Do NOT re-stage if the linter only reported errors and you stopped.

Step 5: Analyze Changes & Generate Message

git diff --staged

Analyze:

  • Files modified/added/deleted
  • Nature of change (feature, fix, refactor, docs, test)
  • The "why" - high-level intent

Step 6: Create Commit

Apply config.commit.messageFormat with {ticket} and {message} placeholders. Default examples:

  • With ticket: TICKET-1234: Add user authentication endpoint
  • Without ticket: Add user authentication endpoint

Pass via HEREDOC if multi-line is needed. Keep within config.commit.maxLength.

git commit -m "<formatted message>"
git status

Commit Message Guidelines

Keep it short - one sentence, max config.commit.maxLength chars.

  • One sentence in English
  • Describe essence at high level (abstract)
  • Present tense ("Add feature", not "Added feature")
  • Focus on WHAT was achieved, not HOW

Good:

  • TICKET-1234: Add user authentication endpoint
  • TICKET-5678: Fix login validation error
  • TICKET-9999: Update user profile API response format

Bad:

  • TICKET-1234: Added new endpoint for user authentication with JWT tokens and session management (too long, too detailed)
  • TICKET-5678: Fix bug (too vague)
  • Fixed the login (no ticket, past tense)

Project Configuration Examples

Via dev.config.json

{
  "ticketPattern": "[A-Z]+-\\d+",
  "commit": {
    "messageFormat": "{ticket}: {message}",
    "maxLength": 72,
    "skipBranches": ["develop", "main", "release/*"]
  },
  "commands": {
    "<repo>": { "lintFix": "yarn lint:fix" }
  }
}

Via CLAUDE.md

## Dev Pipeline Config

Ticket pattern: TICKET-\d+
Lint command: yarn lint:fix

Via package.json

{
  "scripts": {
    "lint:fix": "eslint . --fix"
  }
}

Important Notes

  • Safety (no auto-push, no --no-verify, no amend of pushed commits, no --force) follows the github skill.
  • Append the Claude co-author + session trailers to every commit (Co-Authored-By: Claude ... and Claude-Session: ..., exactly as the session harness specifies); no OTHER trailers. See the github skill §3.
  • If linter fails, STOP and show errors
  • If no changes exist, inform user and stop
  • If ticket pattern unclear, ask user

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.