/committing-changes
Commit changes with scope allowlist enforcement, atomic grouping, GPG-signed conventional commits, and trailer management. Detects the repo's PR-validation scope policy before proposing any message. Use when the user asks to commit or has changes ready to record. Skip when the
$ npx -y skills add LerianStudio/ring --skill committing-changes --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/committing-changes
Context preview
The summary Claude sees to decide when to auto-load this skill.
Commit changes with scope allowlist enforcement, atomic grouping, GPG-signed conventional commits, and trailer management. Detects the repo's PR-validation scope policy before proposing any message. Use when the user asks to commit or has changes ready to record. Skip when the
SKILL.md
committing-changes.SKILL.mdname: ring:committing-changes
description: >-
Commit changes with scope allowlist enforcement, atomic grouping, GPG-signed
conventional commits, and trailer management. Detects the repo's PR-validation
scope policy before proposing any message. Use when the user asks to commit or
has changes ready to record. Skip when the working tree is clean or the user
wants raw git commands without grouping.
allowed-tools:
- Bash
- Read
- Glob
- Grep
- AskUserQuestion
Analyze changes, enforce scope policy, group them into coherent atomic commits, and create signed commits following repository conventions. This skill transforms a messy working directory into a clean, logical commit history — with a scope that will actually pass PR validation.
⛔ HARD STOP — READ SCOPE POLICY BEFORE ANYTHING ELSE
**The scope is REQUIRED in every commit message. It MUST come from the repo's allowlist.**
MUST detect the allowlist in Step 0 before analyzing or drafting any commit message. A commit with an invented or omitted scope will fail PR validation and block the PR.
---
Step 0 — Detect Scope Policy
Many repos enforce an allowlist of valid `scope` values via a GitHub Actions workflow. Failing this check blocks the PR, so MUST detect it before proposing any commit message.
0.1 — Locate the policy file
Check in this order:
1. `.github/workflows/pr-validation.yml` (primary) 2. `.github/workflows/pr-title.yml` 3. `.github/workflows/commitlint.yml` 4. `.github/workflows/semantic-pull-request.yml` 5. Root configs: `commitlint.config.{js,cjs,mjs,ts}`, `.commitlintrc*`
0.2 — Extract the allowed scope list
Common forms to look for:
| Form | Example | |------|---------| | `scopes:` block (one per line) | Under `amannn/action-semantic-pull-request` | | `scopes: a,b,c` inline | Comma-separated on one line | | `scope-enum` rule | In commitlint config arrays |
Also note any **type** restrictions — some repos limit types beyond the default Conventional Commits set.
0.3 — Apply the policy
| Situation | Required Action | |-----------|-----------------| | Policy found, scope is clear | Use only scopes from the allowlist | | Policy found, scope is ambiguous | STOP and ask the user which allowed scope to use | | No policy file found | MUST still include a scope — ask the user what scope to use |
**NEVER** omit the scope. **NEVER** invent a scope not in the allowlist. A bare `type: description` is FORBIDDEN.
State the policy source and chosen scope to the user before proceeding.
---
Step 1 — Gather Context
Run in parallel:
git status
git diff
git diff --cached
git log --oneline -10
---
Step 2 — Analyze and Group Changes
For each changed file determine: 1. **Type**: `feat`, `fix`, `chore`, `docs`, `refactor`, `test`, `style`, `perf`, `ci`, `build` 2. **Scope**: from the allowlist resolved in Step 0 3. **Logical group**: what other files belong with this change?
Grouping Principles
| Principle | Description | |-----------|-------------| | **Feature + Tests** | Implementation and its tests go together | | **Config Changes** | `package.json`, `tsconfig`, etc. grouped separately | | **Documentation** | `README`, `docs/` changes grouped together | | **Refactoring** | Pure refactors (no behavior change) separate | | **Bug Fixes** | Each fix is atomic with its test |
Single vs Multiple Commits
**Single commit when:**
- All changes belong to one coherent feature/fix
- User provides a specific message via argument
- Changes are minimal and related
**Multiple commits when:**
- Changes span different concerns (feature + docs + deps)
- Mix of features, fixes, and chores
- Better git history benefits future archaeology
---
Step 3 — Determine Commit Order
Order matters for bisectability:
1. **Dependencies first** — so subsequent commits can use them 2. **Core changes** — implementation before consumers 3. **Tests with implementation** — keep them atomic 4. **Documentation last** — documents the final state
---
Step 4 — Present Plan and Confirm
MUST get user confirmation before executing.
Proposed Commit Plan:
─────────────────────
Scope policy: .github/workflows/pr-validation.yml → allowed scopes: [api, auth, docs, ci]
Chosen scope: auth
1. feat(auth): add OAuth2 refresh token support
- src/auth/oauth.ts (modified)
- src/auth/oauth.test.ts (modified)
2. chore(deps): update authentication dependencies
- package.json (modified)
- package-lock.json (modified)
3. docs(docs): update OAuth2 setup guide
- docs/auth/oauth-setup.md (modified)
Proceed with this plan? [Execute plan / Single commit / Let me review]
Use `AskUserQuestion` to confirm before proceeding.
---
Step 5 — Draft Commit Messages
Every commit message MUST follow:
<type>(<scope>): <subject>
<body — optional>
- Subject: max 50 characters, imperative mood ("add" not "added")
- Body: wrap at 72 characters, explain motivation/context
- Scope: REQUIRED, from the allowlist — NEVER omit, NEVER invent
---
Step 6 — Execute Commits
⛔ HARD STOP — TRAILER RULES
**THE MOST COMMON MISTAKE:** Putting trailer text INSIDE the `-m` quotes.
# ❌ WRONG — trailer text is INSIDE the -m quotes
git commit -m "feat(auth): add feature
X-Lerian-Ref: 0x1"
# ✅ CORRECT — --trailer is a SEPARATE argument OUTSIDE quotes
git commit -m "feat(auth): add feature" --trailer "X-Lerian-Ref: 0x1"
**Before writing ANY git commit command, verify:**
- [ ] `-m "..."` contains ONLY the commit message (no trailer text inside)
- [ ] `--trailer` flags are OUTSIDE and AFTER the `-m` parameter
- [ ] Command is structured as: `git commit -S -m "msg" --trailer "key: value"`
Required Command Structure
git commit -S \
-m "<type>(<scope>): <subject>" \
-m "<body if needed>" \
--trailer "X-Lerian-Ref: 0x1"
For each commit group, in order:
1. Stage only the files for this commit:
git add <file1> <file2> ...
2. Create si
Read more
name: ring:committing-changes description: >- Commit changes with scope allowlist enforcement, atomic grouping, GPG-signed conventional commits, and trailer management. Detects the repo's PR-validation scope policy before proposing any message. Use when the user asks to commit or has changes ready to record. Skip when the working tree is clean or the user wants raw git commands without grouping. allowed-tools: - Bash - Read - Glob - Grep - AskUserQuestion
Analyze changes, enforce scope policy, group them into coherent atomic commits, and create signed commits following repository conventions. This skill transforms a messy working directory into a clean, logical commit history — with a scope that will actually pass PR validation.
⛔ HARD STOP — READ SCOPE POLICY BEFORE ANYTHING ELSE
**The scope is REQUIRED in every commit message. It MUST come from the repo's allowlist.**
MUST detect the allowlist in Step 0 before analyzing or drafting any commit message. A commit with an invented or omitted scope will fail PR validation and block the PR.
---
Step 0 — Detect Scope Policy
Many repos enforce an allowlist of valid `scope` values via a GitHub Actions workflow. Failing this check blocks the PR, so MUST detect it before proposing any commit message.
0.1 — Locate the policy file
Check in this order:
1. `.github/workflows/pr-validation.yml` (primary) 2. `.github/workflows/pr-title.yml` 3. `.github/workflows/commitlint.yml` 4. `.github/workflows/semantic-pull-request.yml` 5. Root configs: `commitlint.config.{js,cjs,mjs,ts}`, `.commitlintrc*`
0.2 — Extract the allowed scope list
Common forms to look for:
| Form | Example | |------|---------| | `scopes:` block (one per line) | Under `amannn/action-semantic-pull-request` | | `scopes: a,b,c` inline | Comma-separated on one line | | `scope-enum` rule | In commitlint config arrays |
Also note any **type** restrictions — some repos limit types beyond the default Conventional Commits set.
0.3 — Apply the policy
| Situation | Required Action | |-----------|-----------------| | Policy found, scope is clear | Use only scopes from the allowlist | | Policy found, scope is ambiguous | STOP and ask the user which allowed scope to use | | No policy file found | MUST still include a scope — ask the user what scope to use |
**NEVER** omit the scope. **NEVER** invent a scope not in the allowlist. A bare `type: description` is FORBIDDEN.
State the policy source and chosen scope to the user before proceeding.
---
Step 1 — Gather Context
Run in parallel:
git status git diff git diff --cached git log --oneline -10
---
Step 2 — Analyze and Group Changes
For each changed file determine: 1. **Type**: `feat`, `fix`, `chore`, `docs`, `refactor`, `test`, `style`, `perf`, `ci`, `build` 2. **Scope**: from the allowlist resolved in Step 0 3. **Logical group**: what other files belong with this change?
Grouping Principles
| Principle | Description | |-----------|-------------| | **Feature + Tests** | Implementation and its tests go together | | **Config Changes** | `package.json`, `tsconfig`, etc. grouped separately | | **Documentation** | `README`, `docs/` changes grouped together | | **Refactoring** | Pure refactors (no behavior change) separate | | **Bug Fixes** | Each fix is atomic with its test |
Single vs Multiple Commits
**Single commit when:**
- All changes belong to one coherent feature/fix
- User provides a specific message via argument
- Changes are minimal and related
**Multiple commits when:**
- Changes span different concerns (feature + docs + deps)
- Mix of features, fixes, and chores
- Better git history benefits future archaeology
---
Step 3 — Determine Commit Order
Order matters for bisectability:
1. **Dependencies first** — so subsequent commits can use them 2. **Core changes** — implementation before consumers 3. **Tests with implementation** — keep them atomic 4. **Documentation last** — documents the final state
---
Step 4 — Present Plan and Confirm
MUST get user confirmation before executing.
Proposed Commit Plan: ───────────────────── Scope policy: .github/workflows/pr-validation.yml → allowed scopes: [api, auth, docs, ci] Chosen scope: auth 1. feat(auth): add OAuth2 refresh token support - src/auth/oauth.ts (modified) - src/auth/oauth.test.ts (modified) 2. chore(deps): update authentication dependencies - package.json (modified) - package-lock.json (modified) 3. docs(docs): update OAuth2 setup guide - docs/auth/oauth-setup.md (modified) Proceed with this plan? [Execute plan / Single commit / Let me review]
Use `AskUserQuestion` to confirm before proceeding.
---
Step 5 — Draft Commit Messages
Every commit message MUST follow:
<type>(<scope>): <subject> <body — optional>
- Subject: max 50 characters, imperative mood ("add" not "added")
- Body: wrap at 72 characters, explain motivation/context
- Scope: REQUIRED, from the allowlist — NEVER omit, NEVER invent
---
Step 6 — Execute Commits
⛔ HARD STOP — TRAILER RULES
**THE MOST COMMON MISTAKE:** Putting trailer text INSIDE the `-m` quotes.
# ❌ WRONG — trailer text is INSIDE the -m quotes git commit -m "feat(auth): add feature X-Lerian-Ref: 0x1" # ✅ CORRECT — --trailer is a SEPARATE argument OUTSIDE quotes git commit -m "feat(auth): add feature" --trailer "X-Lerian-Ref: 0x1"
**Before writing ANY git commit command, verify:**
- [ ] `-m "..."` contains ONLY the commit message (no trailer text inside)
- [ ] `--trailer` flags are OUTSIDE and AFTER the `-m` parameter
- [ ] Command is structured as: `git commit -S -m "msg" --trailer "key: value"`
Required Command Structure
git commit -S \ -m "<type>(<scope>): <subject>" \ -m "<body if needed>" \ --trailer "X-Lerian-Ref: 0x1"
For each commit group, in order:
1. Stage only the files for this commit:
git add <file1> <file2> ...
2. Create si
Proven engineering practices, enforced through skills. Ring is a comprehensive skills library and workflow system for AI agents that transforms how AI assistants approach software development.
Repo: LerianStudio/ring
Other skills on ring.
- /analyzing-options
Analyzing different approaches for a task or problem with structured comparisons, effort estimates, and recommendations. Use when facing strategic decisions, architecture choices, or multiple viable approaches. Skip when there's an obvious single approach or the decision is
Open skill - /auditing-production-readiness
Auditing a service's production readiness against Ring engineering standards across base dimensions plus a conditional multi-tenant dimension, then emitting a scored report and an HTML dashboard. Use before production deploy, periodic review, onboarding, or a major release. Skip
Open skill - /cleaning-comments
Cleaning redundant and obvious comments following clean code principles while preserving meaningful documentation. Supports git scope filtering (staged, unstaged, branch, commit-range). Use when code has excessive comments, during code review, or post-refactor cleanup. Skip when
Open skill - /creating-handoffs
Creating a handoff document that captures session state (completed work, decisions, open items, next steps) and delivering it via Plan Mode so the user gets the native 'clear context and continue implementing' resume option. Use when ending a session, when context grows large,
Open skill - /creating-worktrees
Creating an isolated git worktree for parallel branch work: selects the directory by priority order, verifies/adds .gitignore safety, auto-installs the detected toolchain's dependencies, runs a baseline test, and reports readiness. Use before a feature that needs isolation from
Open skill - /dispatching-workflows
Executing a phased plan in rolling waves where each phase runs as one multi-agent workflow harness: the supervisor elaborates the phase into tasks against the real landed code, launches a workflow that implements with TDD and runs mandatory in-harness review plus an adversarial
Open skill

