agentleFS
rommelporrasrommelporras/kiro-config/skills/commit/SKILL.md

commit

Skill13 starsChanged 7 months agoMITView on GitHub

Create a git commit following conventional commit format. Use when the user explicitly asks to commit changes.

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

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. 0 are common, 17 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 168 edited versions we read keep these.

  • 17

    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. Distinctive:

    Create a git commit following these rules exactly.

    line 6
  2. Distinctive:

    If the user provides a commit message in their request, use it as the commit message (still apply formatting rules and run all steps).

    line 10
  3. Distinctive:

    If no message is given, determine the message from the staged/modified changes.

    line 11
  4. Distinctive:

    Run these in parallel:

    line 15
  5. Distinctive:

    If there are no changes at all (nothing staged, nothing modified), stop here and say so.

    line 21
  6. Distinctive:

    Read the current branch from the git status output above.

    line 25
  7. Distinctive:

    If the branch is main or master:

    line 27
  8. Distinctive:

    Do not stage, do not commit, do not continue.

    line 30
  9. Very specific:

    Only allow commits on branches matching feature/*.

    line 32
  10. Distinctive:

    Before staging anything, scan all modified and untracked files for leaked secrets.

    line 36
  11. Distinctive:

    Use git diff and git diff --cached output — do not scan binary files.

    line 43
  12. Distinctive:

    If a secret pattern is found, stop immediately.

    line 45
  13. Very specific:

    If any changed files are in skills/, agents/, steering/, docs/, or README.md, run:

    line 49
  14. Distinctive:

    If it reports drift, stop and show the output.

    line 55
  15. Distinctive:

    If a doc references a staged file but the doc itself is NOT staged, warn:

    line 70
  16. Distinctive:

    Wait for user confirmation before proceeding.

    line 74
  17. Very specific:

    Commit message format — TICKET-ID - type: short description

    line 80
  18. Distinctive:

    Use the diff size and nature to decide — not every commit needs a body.

    line 111
  19. Distinctive:

    Only stage files that are directly part of this commit's intent.

    line 130
  20. Distinctive:

    Run git log --oneline -1 and git status.

    line 147

“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

Create a git commit following these rules exactly. Work through each step in order and stop immediately if a step reveals a problem.

Arguments

If the user provides a commit message in their request, use it as the commit message (still apply formatting rules and run all steps). If no message is given, determine the message from the staged/modified changes.

Step 1 — Understand current state

Run these in parallel:

  • git status — identify staged, unstaged, and untracked files
  • git diff — unstaged changes
  • git diff --cached — staged changes
  • git log --oneline -5 — confirm commit style convention in use

If there are no changes at all (nothing staged, nothing modified), stop here and say so. Do not create an empty commit.

Step 1.5 — Branch safety check

Read the current branch from the git status output above.

If the branch is main or master:

  • STOP immediately. Do not ask. Do not proceed.
  • Say exactly: "BLOCKED: You are on <branch>. Commits to main/master are not allowed. Switch to a feature/* branch first."
  • Do not stage, do not commit, do not continue.

Only allow commits on branches matching feature/*.

Step 2 — Secret scan

Before staging anything, scan all modified and untracked files for leaked secrets. Check for:

  • Private key headers: -----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----
  • AWS access key IDs: AKIA[0-9A-Z]{16}
  • GitHub tokens: gh[pousr]_[A-Za-z0-9]{36,}
  • Anthropic API keys: sk-ant-api
  • OpenAI project keys: sk-proj-

Use git diff and git diff --cached output — do not scan binary files.

If a secret pattern is found, stop immediately. Report the file and pattern. Do not proceed to staging.

Step 2.5 — Doc consistency check

If any changed files are in skills/, agents/, steering/, docs/, or README.md, run:

bash ~/.kiro/hooks/doc-consistency.sh

If it reports drift, stop and show the output. Tell the user which doc files need updating before the commit can proceed.

Skip this step if no changed files match those paths.

Step 2.7 — Doc reference check

For each staged file, check whether any doc references it but wasn't also staged:

# For each staged file path, grep docs/ for references to it
git diff --cached --name-only | while read -r f; do
  grep -rl "$f" docs/ 2>/dev/null
done

If a doc references a staged file but the doc itself is NOT staged, warn:

"docs/reference/skill-catalog.md references skills/codebase-audit/SKILL.md which was modified but the doc wasn't updated. Continue anyway?"

Wait for user confirmation before proceeding. If the user says no, stop and let them stage the doc update first.

Skip this step if no docs/ directory exists.

Step 3 — Draft the commit message

Commit message format — TICKET-ID - type: short description

Extract the ticket ID from the current branch name. For example:

  • Branch feature/MTOPS-5324 → ticket ID is MTOPS-5324
  • Branch feature/PROJ-123 → ticket ID is PROJ-123

Pattern: strip the prefix before the last / to get the ticket ID.

Format: <TICKET-ID> - <type>: <description>

TypeWhen to use
feat:New feature or capability
fix:Bug fix
docs:Documentation only
refactor:Code restructure, no behavior change
chore:Build, tooling, config, dependencies
infra:Infrastructure, deployment, CI/CD

Examples:

  • MTOPS-5324 - feat: add eam-ecs-bounce safe ECS rolling restart tool
  • MTOPS-5324 - docs: restructure README and add per-script docs
  • MTOPS-4450 - fix: correct NiFi pod restart timeout handling

Rules:

  • Subject line: max 72 characters, lowercase after the type colon, no trailing period
  • Wrap body lines at 72 chars
  • NEVER add AI attribution — no "Co-Authored-By" AI lines, no "Generated with" AI tool names, no AI references of any kind

When to add a commit body

Use the diff size and nature to decide — not every commit needs a body.

ConditionBody?Why
1-3 files, simple changeNoSubject line is enough
4+ files or new feature/toolYesSummarize what it does and key capabilities
Bug fix with non-obvious root causeYesExplain what was wrong and why the fix works
Refactor touching many filesYesExplain the motivation and what changed structurally
Docs-only reorganizationNoThe diff is self-explanatory

Body format — blank line after subject, then:

  • feat/refactor: 2-4 lines summarizing capabilities or structural changes
  • fix: 1-2 lines explaining root cause and fix approach
  • Stats line (optional): test count, file count, or other concrete metrics if significant

Step 4 — Stage specific files

Stage files by name. Never use git add -A or git add . — they risk including unintended files.

Only stage files that are directly part of this commit's intent. If there are unrelated changes mixed in, ask the user what to include before staging.

Step 5 — Create the commit

Pass the message via HEREDOC to preserve formatting:

git commit -m "$(cat <<'EOF'
type: subject line

Optional body explaining why.
EOF
)"

Step 6 — Verify

Run git log --oneline -1 and git status. Show both outputs so the user can confirm.

Hard stops

  • Pre-commit hook failure — do not retry with --no-verify. Report the failure and ask the user how to proceed.
  • No changes — do not create an empty commit.
  • Secret found — stop before staging. Never suppress or bypass.
  • Never push unless the user explicitly asks after the commit is created.

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.