Skip to content
Back to skills

Update

ASecurity

Update a standalone sandbox-pal-dispatch installation from the upstream repository. Shows what changed, handles merges intelligently.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 20, 2026
ai-agentsgobashgit

Security analysis

A100/100

Scanned November 20, 2026

npx -y skills add jnurre64/sandbox-pal-action --skill update --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Update?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Update
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jnurre64-update/badge)](https://www.skillsdirectory.com/skills/jnurre64-update)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: update
description: Update a standalone sandbox-pal-dispatch installation from the upstream repository. Shows what changed, handles merges intelligently.
user-invocable: true
argument-hint: "[path-to-.sandbox-pal-dispatch]"
---

# Update: Sync Standalone Installation with Upstream

Update a standalone sandbox-pal-dispatch installation by comparing against the latest upstream version and helping the user selectively apply changes.

**This skill is for standalone mode only.** Reference mode users get updates automatically via `@v1` tags and `git pull`.

## Prerequisites

The standalone installation must have a `.sandbox-pal-dispatch/.upstream` file (created by the setup process). This file tracks which upstream version was last synced and checksums of each file at that time.

## Step 1: Locate the Installation

If the user provided a path argument, use that. Otherwise, look for `.sandbox-pal-dispatch/` in the current working directory or ask the user where it is.

Read `.sandbox-pal-dispatch/.upstream` to get:
- `repo` — the upstream repo URL
- `version` — the commit SHA or tag last synced from
- `checksums` — SHA256 of each file at last sync time

If `.upstream` doesn't exist, tell the user this installation predates the update mechanism and offer to create the tracking file based on the current state (treating all current files as the baseline).

## Step 2: Fetch Latest Upstream

Clone or fetch the upstream repo to a temporary location:

```bash
UPSTREAM_DIR=$(mktemp -d)
git clone --depth=1 https://github.com/jnurre64/sandbox-pal-action.git "$UPSTREAM_DIR"
```

Read the latest commit SHA:
```bash
LATEST_SHA=$(git -C "$UPSTREAM_DIR" rev-parse HEAD)
```

Compare against the stored version. If they match, tell the user they're already up to date.

## Step 3: Categorize Files

For each file in the upstream installation (scripts, lib, prompts, labels.txt):

1. **Compute current checksum** of the user's local file
2. **Compare against stored checksum** from `.upstream` to detect local modifications
3. **Compare against upstream file** to detect upstream changes

Classify each file into one of these categories:

| Category | Local modified? | Upstream changed? | Action |
|----------|:-:|:-:|--------|
| **Up to date** | No | No | Skip |
| **Auto-update** | No | Yes | Safe to overwrite — user hasn't modified |
| **Needs review** | Yes | Yes | Both sides changed — show diff, user decides |
| **Local only** | Yes | No | User modified, upstream hasn't — skip |
| **New upstream** | (doesn't exist) | Yes | New file from upstream — offer to add |

## Step 4: Present Summary

Show the user a table of all files and their categories. Example:

```
Update Summary (v1.0.0 → v1.2.0):

  Auto-update (safe to overwrite):
    scripts/sandbox-pal-dispatch.sh
    scripts/lib/common.sh

  Needs review (both sides changed):
    prompts/implement.md

  New from upstream:
    scripts/lib/new-module.sh

  Up to date:
    scripts/lib/worktree.sh
    prompts/triage.md

  Local only (your changes, upstream unchanged):
    prompts/review.md
    config.env
```

## Step 5: Apply Updates

### Auto-update files
Ask the user: "Apply all auto-updates? These files haven't been modified locally." If yes, copy each file from the upstream temp directory to the installation.

### Needs-review files
For each file that both sides modified:
1. Show the upstream diff (what changed in the upstream version since last sync)
2. Show the user's local diff (what they changed from the original)
3. **Use your judgment as Claude** to analyze both changes:
   - If they're in different parts of the file: suggest applying both (no conflict)
   - If they touch the same area: explain the conflict and ask the user what to do
   - Options: accept upstream, keep local, or merge (you write the merged version)
4. Apply the user's choice

### New files
For each new upstream file, show its contents and ask if the user wants to add it.

## Step 6: Detect New Workflow Templates

Step 5 handles new files within `.sandbox-pal-dispatch/`. This step handles workflow templates that need to be installed to `.github/workflows/` with bot username substitution — a separate concern.

Check whether upstream has added any new workflow templates that the user's repo doesn't have yet.

### Scan for new templates

1. List all `.yml` files in the upstream clone's `.claude/skills/setup/templates/standalone/` directory.
2. For each template file (e.g., `sandbox-pal-direct-implement.yml`), check if `.github/workflows/<same-filename>` exists in the user's repo.
3. Collect any templates that don't have a matching installed workflow — these are new.

### If no new templates found

Report: "No new workflow templates detected." and proceed to the next step.

### If new templates found

For each new template:

1. **Describe it:** Read the template's `name:` field and `on:` trigger to give the user a one-line summary. Example:
   ```
   New workflow template available:
     sandbox-pal-direct-implement.yml — "Claude Agent: Direct Implement" (triggers on issues labeled)
   ```

2. **Confirm bot username (first template only):** Read `AGENT_BOT_USER` from `.sandbox-pal-dispatch/config.defaults.env`. If it is empty or not set, also check `.sandbox-pal-dispatch/config.env` (if it exists). If still not found, ask the user to provide the bot username. Ask the user to confirm: "I'll substitute `<bot-username>` for the bot user in the workflow — does that look right?" Reuse the confirmed value for all subsequent templates without re-asking.

3. **Show the generated workflow:** Read the template, replace all `{{BOT_USER}}` occurrences with the confirmed bot username, and show the result to the user.

4. **Ask to install:** "Install this workflow to `.github/workflows/<template-filename>`?"
   - If yes: write the file (create `.github/workflows/` if it doesn't exist).
   - If no: skip it.

5. Repeat for each new template.

## Step 7: Update Tracking

After applying changes, update `.sandbox-pal-dispatch/.upstream`:
- Set `version` to the latest upstream commit SHA
- Recompute checksums for all files (both updated and unchanged)

Write the updated `.upstream` file.

## Step 8: Summary

Tell the user:
- How many files were updated, skipped, and merged
- How many new workflow templates were installed (if any)
- If any manual review items remain
- Remind them to commit the changes: `git add .sandbox-pal-dispatch/ .github/workflows/ && git commit -m "Update sandbox-pal-dispatch from upstream"`

## File Format: .sandbox-pal-dispatch/.upstream

```yaml
# Upstream tracking for standalone sandbox-pal-dispatch installation
# Do not edit manually — managed by /update skill and setup.sh
repo: https://github.com/jnurre64/sandbox-pal-action.git
version: abc123def456  # commit SHA of last sync
synced_at: "2026-03-21T01:00:00Z"
checksums:
  scripts/sandbox-pal-dispatch.sh: "sha256:abc..."
  scripts/lib/common.sh: "sha256:def..."
  scripts/lib/worktree.sh: "sha256:ghi..."
  scripts/lib/data-fetch.sh: "sha256:jkl..."
  scripts/lib/defaults.sh: "sha256:mno..."
  scripts/cleanup.sh: "sha256:pqr..."
  scripts/check-prereqs.sh: "sha256:stu..."
  scripts/create-labels.sh: "sha256:vwx..."
  prompts/triage.md: "sha256:..."
  prompts/implement.md: "sha256:..."
  prompts/reply.md: "sha256:..."
  prompts/review.md: "sha256:..."
  labels.txt: "sha256:..."
```

## Named dispatch profile assets

The shared installation inventory delivers and checksums
`agent-profiles.example.json`, `scripts/agent-profile.sh` and its library modules.
Do not copy the example over an active `agent-profiles.json`, replace saved
`.agent-profile` selection, or enable `AGENT_ENGINE_PROFILES` during setup/update.
Preserve existing project configuration on repeated setup. Add `.agent-profile`
(or the configured selection path) and the catalog capture lock directory to
the consuming project's ignore rules. For explicit adoption, follow
`docs/configuration.md` → “Named dispatch profiles”: migrate legacy Codex
settings, capture actual legacy routing, preview, then select a profile.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.