pr-artifact

pr-artifact is a command for Claude Code from ThibautBaissac/rails_ai_agents. It costs 32 tokens per session (2,944 once invoked), scanned A, original, MIT.

A command that creates one self-contained HTML report explaining a pull request or code change. A pull request is a proposed change submitted for review before it is merged into a codebase.

In plain words
What is it for?
Use it to turn a pull-request URL, number, branch comparison, local diff, or written notes into a shareable review artifact.
Why use it?
It gathers the change's purpose, affected areas, validation, risks, and open questions into a format that reviewers and non-engineering partners can read.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to turn a pull-request URL, number, branch comparison, local diff, or written notes into a shareable review artifact.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/thibautbaissac/rails_ai_agents/pr-artifact
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/ThibautBaissac/rails_ai_agents

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-artifact

README.md
[![agentmods](https://agentmods.dev/badge/commands/thibautbaissac/rails_ai_agents/pr-artifact/github.svg)](https://agentmods.dev/commands/thibautbaissac/rails_ai_agents/pr-artifact)
Your own site
<a href="https://agentmods.dev/commands/thibautbaissac/rails_ai_agents/pr-artifact"><img src="https://agentmods.dev/badge/commands/thibautbaissac/rails_ai_agents/pr-artifact/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-artifact

Your own site · 80×15
<a href="https://agentmods.dev/commands/thibautbaissac/rails_ai_agents/pr-artifact"><img src="https://agentmods.dev/badge/commands/thibautbaissac/rails_ai_agents/pr-artifact.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,944 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.00032 $0.02944
Opus 5 $0.00016 $0.01472
Sonnet 5 $0.00006 $0.00589
Haiku 4.5 $0.00003 $0.00294

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

Security

Grade A, and why

pr-artifact 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 10d 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-artifact.md · 331 lines

How it starts

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

Presenting Pull Requests

Create one unique, self-contained HTML artifact that helps the intended audience understand what changed, why it changed, how the change works, what is affected, how it was validated, and what risks or questions remain.

Input

PR or change source: $ARGUMENTS

Accept any of these input forms:

  • PR URL.
  • PR number.
  • Branch name, commit range, or comparison ref.
  • Local diff or patch file.
  • Markdown summary, release note, review notes, or implementation notes.
  • Empty input, if the current repository and branch can provide enough context.

If $ARGUMENTS is empty, first try to infer the change from the current git repository:

  • Identify the current branch.
  • Compare it against the repository's default branch when that is locally available.
  • If no reliable comparison base exists, ask the user for a PR URL, PR number, branch, commit range, or diff file and stop.

If $ARGUMENTS references network-only PR metadata and network access is unavailable, use local git information when possible and clearly mark unavailable metadata under Open questions.

Output Requirement

Create a single .html file inside the artifacts/ directory in the current working directory.

If artifacts/ does not exist, create it.

The file must be fully self-contained:

  • Include all CSS in a <style> tag.
  • Include all JavaScript in a <script> tag.
  • Do not depend on external CDNs, fonts, images, packages, analytics, or network requests.
  • Use semantic HTML and accessible markup.
  • Work by opening the file directly in a browser.

Name the file using a short slug derived from the PR title, branch, or change theme, for example:

artifacts/pr-artifact-[slug].html

If no clear title exists, use:

artifacts/pr-artifact.html

Do not overwrite an existing unrelated artifact unless the user explicitly asks. If the target filename exists, choose a clear variant such as artifacts/pr-artifact-[slug]-v2.html.

Core Principles

  • Treat the PR, diff, commits, and source notes as authoritative.
  • Explain the change at the right altitude for reviewers and stakeholders.
  • Preserve technical accuracy while translating dense implementation details into plain language.
  • Make the review surface obvious: affected areas, behavior changes, validation, risk, rollout, and open questions.
  • Separate verified facts from inferred implications.
  • Make missing details visible instead of filling gaps with confident guesses.
  • The artifact should feel intentionally designed, not templated.
  • Avoid generic dashboard filler, decorative-only graphics, excessive cards, repeated section layouts, and one-note color palettes.

Read the full file on GitHub · 331 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. 10d ago First seen · 331 lines · 32 tokens per session scan A fac5454ebb49

Subscribe to this mod's changes

pr-artifact is a command published in the GitHub repository ThibautBaissac/rails_ai_agents (661 stars, last pushed 3mo ago), licensed MIT. It adds 32 tokens to every session and 2,944 once invoked, about $0.0002 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-30.