kiro-rails: Command for Claude Code

.claude/commands/review-commit-pr-discipline.md

review-commit-pr-discipline is a command for Claude Code from sourjya/kiro-rails. It costs 28 tokens per session (859 once invoked), scanned A, original, MIT.

A release-engineering review of a coding branch, its commits, changed files, and pull-request description.

In plain words
What is it for?
Use it to assess branch names, commit messages, working-tree changes, commit scope, and the structure of a pull-request description.
Why use it?
It makes changes easier to review, understand, revert, and maintain by checking that the work is packaged as one clear task with appropriate history.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is sourjya/kiro-rails's own configuration. It tells Claude Code how to work on kiro-rails itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kiro-rails configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sourjya/kiro-rails. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sourjya/kiro-rails/main/.claude/commands/review-commit-pr-discipline.md
Clone the repo
git clone --depth 1 https://github.com/sourjya/kiro-rails

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for review-commit-pr-discipline

README.md
[![agentmods](https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-commit-pr-discipline/github.svg)](https://agentmods.dev/commands/sourjya/kiro-rails/review-commit-pr-discipline)
Your own site
<a href="https://agentmods.dev/commands/sourjya/kiro-rails/review-commit-pr-discipline"><img src="https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-commit-pr-discipline/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for review-commit-pr-discipline

Your own site · 80×15
<a href="https://agentmods.dev/commands/sourjya/kiro-rails/review-commit-pr-discipline"><img src="https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-commit-pr-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 859 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.00859
Opus 5 $0.00014 $0.00430
Sonnet 5 $0.00006 $0.00172
Haiku 4.5 $0.00003 $0.00086

Measured 9d ago against content hash 02bc97802fa3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

review-commit-pr-discipline scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/review-commit-pr-discipline.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Review the current branch's commits and working tree for commit and pull-request discipline, then produce well-structured commits and a high-quality PR description. Read git-and-focus-discipline.md and agent-boundaries.md first; this prompt operationalizes those rules.

Act as a release engineer and code historian who has to make every change reviewable, revertable, and self-explaining six months from now.

You are not reviewing the correctness of the code (other review prompts do that). You are reviewing how the change is packaged: branch, commits, and PR narrative.


Inputs

Gather these before judging:

git branch --show-current                 # branch name + type
git log main..HEAD --oneline              # commits on this branch
git status --porcelain                    # uncommitted work
git diff --stat main...HEAD               # files + churn

If a commit message or diff is supplied directly, review that instead.


What to check

1. Branch

  • Is the branch named by type and scope (feat/, fix/, ui/, chore/, docs/, test/, refactor/), kebab-case, 3-5 words? Bug branches carry bug-###.
  • Does the branch hold one logical task? Flag unrelated changes that belong on a separate branch.
  • Is it branched from a fresh main (not from another feature branch)?

2. Commit granularity

  • One logical change per commit. When files changed for different reasons are bundled together, recommend splitting (git add -p / per-file staging) and give the exact split.
  • Were meaningful checkpoints committed as work progressed (compiles + affected tests pass + lint clean), rather than one giant end-of-task dump?
  • Are checkpoint: commits present where a multi-file or multi-session task warranted a defensive rollback point? (Their absence on a large change is a smell, not an error.)
  • Is there any uncommitted work sitting in the tree? That must be committed or stashed before the task is "done."

3. Commit messages

  • Conventional Commits: <type>(<scope>): <description>, imperative mood, no trailing period in the subject.
  • The body states what changed and why - not a restatement of the diff. Non-obvious decisions and trade-offs belong here.
  • No secrets, file paths, or noise. Co-authorship trailer present where required.

Read the full file on GitHub · 68 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 68 lines · 28 tokens per session scan A 02bc97802fa3

Subscribe to this mod's changes

review-commit-pr-discipline is a command published in the GitHub repository sourjya/kiro-rails (9 stars, last pushed 1mo ago), licensed MIT. It adds 28 tokens to every session and 859 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.