/test-pr-docker
Test PR with Docker image build workflow
$ npx -y skills add bybren-llc/safe-agentic-workflow --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/test-pr-docker
Context preview
What this command does when you run it.
Test PR with Docker image build workflow
Command definition
test-pr-docker.mddescription: Test PR with Docker image build workflow
argument-hint: [PR-number]
allowed-tools: [Read, Write, Edit, Bash, Grep, Glob]
> **๐ 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 labels3. 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://{{GITHUB_ORG}}/{{PROJECT_NAME}}/actions`
Provide link to PR:
gh pr view {PR-number} --web4. 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 {{PROJECT_NAME}}
# {{TICKET_PREFIX}}-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}}/{{PROJECT_NAME}}/dev:${{PROJECT}_IMAGE_TAG:-latest}
# To: image: {{REGISTRY}}/{{PROJECT_NAME}}/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/health5. 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
Output
Report each step's status:
- PR number and URL
- Label addition confirmation
- Build status (link to Actions)
- Verification instructions
- Expected next steps
This validates the entire PR Docker workflow before relying on it for future PRs.
Customization Guide
To adapt this command for your infrastructure, replace these placeholders:
| Placeholder | Description | Example | | ----------------- | ------------------------- | --------------------- | | `{{TICKET_PREFIX}}` | Your Linear ticket prefix | `WOR`, `PROJ`, `TASK` |
Read more
description: Test PR with Docker image build workflow argument-hint: [PR-number] allowed-tools: [Read, Write, Edit, Bash, Grep, Glob]
> **๐ 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 labels3. 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://{{GITHUB_ORG}}/{{PROJECT_NAME}}/actions`
Provide link to PR:
gh pr view {PR-number} --web4. 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 {{PROJECT_NAME}}
# {{TICKET_PREFIX}}-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}}/{{PROJECT_NAME}}/dev:${{PROJECT}_IMAGE_TAG:-latest}
# To: image: {{REGISTRY}}/{{PROJECT_NAME}}/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/health5. 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
Output
Report each step's status:
- PR number and URL
- Label addition confirmation
- Build status (link to Actions)
- Verification instructions
- Expected next steps
This validates the entire PR Docker workflow before relying on it for future PRs.
Customization Guide
To adapt this command for your infrastructure, replace these placeholders:
| Placeholder | Description | Example | | ----------------- | ------------------------- | --------------------- | | `{{TICKET_PREFIX}}` | Your Linear ticket prefix | `WOR`, `PROJ`, `TASK` |
SAW โ SAFe Agentic Workflow AI Agent Harness for Multi-Agent Team Workflows Built on SAFe methodology (Scaled Agile Framework), adapted for AI agent teams (Now With AI-DLC!) Works for any team with repeatable processes: Software, Marketing, Research, Legal, Operations.
Other commands on safe-agentic-workflow.
- /audit-deps
Run comprehensive dependency audit
Open command - /check-docker-status
Check if {{DEV_MACHINE}} Docker environment needs updating
Open command - /check-workflow
Quick status check of current workflow state
Open command - /deploy-dev
Deploy latest Docker image to {{DEV_MACHINE}} dev environment
Open command - /dev-health
Check {{DEV_MACHINE}} dev environment health dashboard
Open command - /dev-logs
View {{DEV_MACHINE}} dev container logs
Open command

