analyzing-options
Analyzing different approaches for a task or problem with structured comparisons, effort…
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.
/committing-changesContext 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
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.
**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.
---
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.
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*`
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.
| 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.
---
Run in parallel:
git status git diff git diff --cached git log --oneline -10
---
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?
| 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 commit when:**
**Multiple commits when:**
---
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
---
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.
---
Every commit message MUST follow:
<type>(<scope>): <subject> <body — optional>
---
**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:**
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
Analyzing different approaches for a task or problem with structured comparisons, effort…
Auditing a service's production readiness against Ring engineering standards across base…
Cleaning redundant and obvious comments following clean code principles while preserving…
Creating a handoff document that captures session state (completed work, decisions, open…
Creating an isolated git worktree for parallel branch work: selects the directory by priority…
Executing a phased plan in rolling waves where each phase runs as one multi-agent workflow…