claude-code-interactive-mode: Command for Claude Code

.claude/commands/pr-end.md

pr-end is a command for Claude Code from inadarei/claude-code-interactive-mode. It costs 0 tokens per session (579 once invoked), scanned A, original, MIT.

A command that ends chat tracking for a specified pull request ticket. Pull requests are proposed code changes that are reviewed before being merged.

In plain words
What is it for?
Use it to stop tracking a ticket, capture the current session transcript, and save the resulting pull-request discussion for later reference.
Why use it?
It captures the tracked conversation into a detailed Markdown file and checks that messages were actually recorded, reducing the risk of losing review context.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths.

This is inadarei/claude-code-interactive-mode's own configuration. It tells Claude Code how to work on claude-code-interactive-mode 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 claude-code-interactive-mode configures →

Reuse

Borrowing it

Nothing to install: this file belongs to inadarei/claude-code-interactive-mode. 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/inadarei/claude-code-interactive-mode/main/.claude/commands/pr-end.md
Clone the repo
git clone --depth 1 https://github.com/inadarei/claude-code-interactive-mode

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 pr-end

README.md
[![agentmods](https://agentmods.dev/badge/commands/inadarei/claude-code-interactive-mode/pr-end/github.svg)](https://agentmods.dev/commands/inadarei/claude-code-interactive-mode/pr-end)
Your own site
<a href="https://agentmods.dev/commands/inadarei/claude-code-interactive-mode/pr-end"><img src="https://agentmods.dev/badge/commands/inadarei/claude-code-interactive-mode/pr-end/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 pr-end

Your own site · 80×15
<a href="https://agentmods.dev/commands/inadarei/claude-code-interactive-mode/pr-end"><img src="https://agentmods.dev/badge/commands/inadarei/claude-code-interactive-mode/pr-end.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 579 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.00000 $0.00579
Opus 5.5 $0.00000 $0.00232
Sonnet 5.5 $0.00000 $0.00116
Haiku 4.5 $0.00000 $0.00058

Measured 2mo ago against content hash 37825b6a410d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pr-end 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 2mo 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/pr-end.md · 25 lines

What it actually says

End PR chat tracking for ticket: $ARGUMENTS

Follow these steps to end PR chat tracking for the specified ticket:

  1. Read pr-chats/.pr-tracking.json. If it doesn't exist or doesn't contain ticket "$ARGUMENTS", tell me and stop.

  2. Get the start timestamp for ticket "$ARGUMENTS". If it doesn't exist, tell me and stop.

  3. Run the capture script to produce the detailed version:

    bash ~/.claude/scripts/pr-capture.sh "$ARGUMENTS"
    

    If the script doesn't exist, or is not executable, or fails in any other way - provide appropriate error message and abort the rest of the process. DO NOT try to recover, since it can damage the source files and destroy data.

    The script will find the current session's JSONL transcript, extract all entries from the start timestamp to now, format them as readable Markdown (human messages, assistant responses, and summarized tool calls), and save to pr-chats/YY-MM-DD-HH-MM-<ticket-id>-detailed.md.

    Validation: After the script runs, check its output for the number of messages captured. If it reports 0 messages or the detailed file is empty/missing, STOP and report the error to the user. Do NOT proceed to create full or summary files — the capture failed and needs debugging. Common causes: the start timestamp in .pr-tracking.json is in the future (was it recorded correctly via date -u?), or the session JSONL file wasn't found.

  4. Read the detailed file the script produced. Using it as source, create two additional files:

    • Full version (pr-chats/YY-MM-DD-HH-MM-<ticket-id>-brief.md): A mechanical filter of the detailed file — copy it verbatim but remove all tool call sections (lines starting with ### 🔧 Tool: through to the next ## heading or end of file). Do NOT rephrase, summarize, or rewrite any content. The brief must contain the exact same human and assistant text as the detailed file.
    • Summary version (pr-chats/YY-MM-DD-HH-MM-<ticket-id>-summary.md): A concise, LLM-generated summary containing:
      • A short paragraph summarizing the conversation (what was discussed, what was the goal)
      • A bullet list of key decisions made and actions taken (files created/modified, architectural choices, etc.)
  5. Remove the "$ARGUMENTS" entry from pr-chats/.pr-tracking.json.

  6. Tell me the output file paths and a brief summary (number of messages captured).

Important: if "$ARGUMENTS" is empty, ask me to provide a ticket ID.

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. 2mo ago First seen · 25 lines · 0 tokens per session scan A 37825b6a410d

Subscribe to this mod's changes

pr-end is a command published in the GitHub repository inadarei/claude-code-interactive-mode (11 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 579 tokens. 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-30.

Related

pr-end compared with commands from other repositories

pr-end next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pr-endinadarei/claude-code-interactive-modeCommand116mo agoMITA0Claude Code
merge-conflict-analysisrjmurillo/ai-agentsCommand49yesterdayMITA0GitHub Copilot
release-notesOpenHands/extensionsCommand176yesterdayMITA44Claude Code
commitechoVic/blade-codeCommand18124d agoMITA8Claude Code
repo-audittractorjuice/arc-kitCommand2.3k2d agononeA29Claude Code
propsmill/infrahub-mcpCommand10yesterdayApache-2.0A18Claude Code
codex-reviewoalders/kitchen-sinkCommand54d agoMITA41Claude Code