test-pr-docker

test-pr-docker is a command for Claude Code from bybren-llc/a-safe-pulse. It costs 7 tokens per session (700 once invoked), scanned A, a copy of test-pr-docker, MIT.

A command template for testing a pull request's Docker image build through GitHub Actions. A pull request is a proposed code change, Docker packages software into a runnable image, and GitHub Actions runs checks automatically.

In plain words
What is it for?
Use it to label a pull request, watch the image build, and pull and inspect the image on a Linux machine.
Why use it?
It provides a repeatable way to start the build, monitor its status, and verify the resulting image.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/dev-docker.sh pull-pr {PR-number}.

Good fit Use it to label a pull request, watch the image build, and pull and inspect the image on a Linux machine.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/bybren-llc/a-safe-pulse
agentmods
npx agentmods add commands/bybren-llc/a-safe-pulse/test-pr-docker

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 test-pr-docker

README.md
[![agentmods](https://agentmods.dev/badge/commands/bybren-llc/a-safe-pulse/test-pr-docker/github.svg)](https://agentmods.dev/commands/bybren-llc/a-safe-pulse/test-pr-docker)
Your own site
<a href="https://agentmods.dev/commands/bybren-llc/a-safe-pulse/test-pr-docker"><img src="https://agentmods.dev/badge/commands/bybren-llc/a-safe-pulse/test-pr-docker/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 test-pr-docker

Your own site · 80×15
<a href="https://agentmods.dev/commands/bybren-llc/a-safe-pulse/test-pr-docker"><img src="https://agentmods.dev/badge/commands/bybren-llc/a-safe-pulse/test-pr-docker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 700 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 92% copy Near-identical to another mod 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.00007 $0.00700
Opus 5 $0.00003 $0.00350
Sonnet 5 $0.00001 $0.00140
Haiku 4.5 $0.00001 $0.00070

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

Security

Grade A, and why

test-pr-docker scanned grade A with 1 finding 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 7d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:3000/api/health
Origin

This is a copy

92% identical to test-pr-docker — 12 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/test-pr-docker.md · 124 lines

How it starts

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

📋 TEMPLATE: This command is a template. See "Customization Guide" below to adapt for your infrastructure.

Test the Docker registry PR workflow by adding the build-docker-image label to a PR and verifying the build.

Workflow

1. Get PR Number

If argument provided ($1):

  • Use as PR number
  • Fetch PR details: gh pr view $1

If no argument:

  • Check if current branch has open PR
  • Extract PR number from branch

2. Add Label to PR

Add build-docker-image label:

gh pr edit {PR-number} --add-label "build-docker-image"

Confirm label added:

gh pr view {PR-number} --json labels

3. Monitor Build

Explain to user:

  • GitHub Actions will build Docker image (~5-10 min)
  • Image will be tagged as pr-{number}
  • Build status visible in PR checks
  • Can monitor at: https://bybren-llc/a-safe-pulse/actions

Provide link to PR:

gh pr view {PR-number} --web

4. Verification Steps

Once build completes, guide user through verification:

On Linux machine:

# Pull PR-specific image
./scripts/dev-docker.sh pull-pr {PR-number}

# Verify image exists
docker images | grep a-safe-pulse

# ASP-400: Use {{PROJECT}}_IMAGE_TAG environment variable instead of editing compose file
# Set the tag before running docker compose:
export {{PROJECT}}_IMAGE_TAG=pr-{PR-number}

# Or update docker-compose.staging.yml image tag temporarily:
# Change: image: {{REGISTRY}}/a-safe-pulse/dev:${{PROJECT}_IMAGE_TAG:-latest}
# To:     image: {{REGISTRY}}/a-safe-pulse/dev:pr-{PR-number}

# Restart with PR image
./scripts/dev-docker.sh restart

# Verify services running
./scripts/dev-docker.sh status

# Check health
curl http://localhost:3000/api/health

5. Testing Complete

After verification:

# Revert docker-compose.dev.yml
# Remove label to stop builds
gh pr edit {PR-number} --remove-label "build-docker-image"

Success Criteria

  • ✅ Label added successfully
  • ✅ GitHub Actions build triggered
  • ✅ Image built with pr-{number} tag
  • ✅ Image pullable on Linux machine
  • ✅ Services start correctly
  • ✅ Hot-reload verified
  • ✅ Health check passes

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

Subscribe to this mod's changes

test-pr-docker is a command published in the GitHub repository bybren-llc/a-safe-pulse (9 stars, last pushed 5mo ago), licensed MIT. It adds 7 tokens to every session and 700 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 92% identical to test-pr-docker, differing in 12 lines, and is treated as a copy.