$npx -y skills add product-on-purpose/pm-skills --skill utility-update-pm-skillsValidates internet access, compares the locally installed pm-skills version against the latest public release, and updates local files with conflict-aware overwrite-or-skip options. Produces an update report listing changed files, skipped files, and new capabilities. Use when you
| 1 | <!-- PM-Skills | https://github.com/product-on-purpose/pm-skills | Apache 2.0 --> |
| 2 | |
| 3 | # PM Skills Updater |
| 4 | |
| 5 | This skill updates a local pm-skills installation to the latest public |
| 6 | release. It validates connectivity, compares versions, detects local |
| 7 | modifications, gives the user control over conflict resolution, and |
| 8 | produces a structured update report documenting every change. |
| 9 | |
| 10 | The updater operates in three phases: |
| 11 | - **Pre-flight** -- validate internet access and determine version delta. |
| 12 | - **Update** -- fetch the latest release and apply changes with |
| 13 | conflict-aware overwrite-or-skip logic. |
| 14 | - **Report** -- generate a markdown report summarizing what changed, |
| 15 | what was skipped, and what new capabilities are available. |
| 16 | |
| 17 | ## When to Use |
| 18 | |
| 19 | - When you want to update your local pm-skills to the latest release |
| 20 | - After a new pm-skills version is announced and you want to pull it in |
| 21 | - When you're unsure whether your local copy is current |
| 22 | - When onboarding to a team that uses pm-skills and you want the latest version |
| 23 | - When you want a structured summary of what changed between your version and the latest |
| 24 | |
| 25 | ## When NOT to Use |
| 26 | |
| 27 | - To create or edit individual skills -> use `/pm-skill-builder` or `/pm-skill-iterate` |
| 28 | - To validate skills against conventions -> use `/pm-skill-validate` |
| 29 | - If you are a maintainer working directly on the pm-skills repo (use git instead) |
| 30 | - If you need to pin a specific older version (this skill always targets the latest release) |
| 31 | |
| 32 | ## Instructions |
| 33 | |
| 34 | When asked to update pm-skills, follow these steps: |
| 35 | |
| 36 | ### Step 1: Validate Internet Access |
| 37 | |
| 38 | Before attempting any remote operations, confirm connectivity to GitHub. |
| 39 | |
| 40 | **How to validate:** |
| 41 | 1. Attempt to reach the GitHub API or the public repository URL: |
| 42 | `https://github.com/product-on-purpose/pm-skills` |
| 43 | 2. Use any available method: `curl`, `wget`, `fetch`, GitHub CLI (`gh`), |
| 44 | or the GitHub MCP tools. |
| 45 | |
| 46 | **If connectivity fails:** |
| 47 | - Report the failure clearly with the error details. |
| 48 | - Suggest troubleshooting steps: check network, proxy settings, VPN, |
| 49 | or firewall rules. |
| 50 | - Stop execution. Do not proceed to Step 2. |
| 51 | |
| 52 | **If connectivity succeeds:** |
| 53 | - Report: "Internet access validated. Connected to GitHub." |
| 54 | - Proceed to Step 2. |
| 55 | |
| 56 | ### Step 2: Determine Local Version |
| 57 | |
| 58 | Read the local version from these sources (in priority order): |
| 59 | |
| 60 | 1. `.claude-plugin/plugin.json` -- `version` field |
| 61 | 2. `marketplace.json` -- `plugins[0].version` field |
| 62 | 3. `CHANGELOG.md` -- most recent version header |
| 63 | 4. Git tags -- most recent `v*` tag |
| 64 | |
| 65 | Record: |
| 66 | - **Local version**: the version string (e.g., `2.8.2`) |
| 67 | - **Local version source**: which file provided the version |
| 68 | |
| 69 | If no version can be determined, warn the user and default to `0.0.0` |
| 70 | (treat as a fresh install requiring full update). |
| 71 | |
| 72 | ### Step 3: Fetch Latest Public Release |
| 73 | |
| 74 | Query the public repository for the latest release: |
| 75 | |
| 76 | **Methods (try in order):** |
| 77 | 1. GitHub API: `GET /repos/product-on-purpose/pm-skills/releases/latest` |
| 78 | 2. GitHub CLI: `gh release list --repo product-on-purpose/pm-skills --limit 1` |
| 79 | 3. Git: `git ls-remote --tags https://github.com/product-on-purpose/pm-skills.git` |
| 80 | |
| 81 | Record: |
| 82 | - **Latest version**: the version string from the latest release |
| 83 | - **Release date**: when the release was published |
| 84 | - **Release notes URL**: link to the release page |
| 85 | - **Release notes body**: the release description (for capability diff in Step 8) |
| 86 | |
| 87 | ### Step 4: Compare Versions |
| 88 | |
| 89 | Compare the local version against the latest public version. |
| 90 | |
| 91 | **If local version >= latest version:** |
| 92 | - Report: "Your pm-skills installation is up to date (v{local})." |
| 93 | - Offer to generate a version report anyway (skip to Step 8 with |
| 94 | no changes to report). |
| 95 | - Stop execution unless the user requests a forced update. |
| 96 | |
| 97 | **If local version < latest version:** |
| 98 | - Report the version delta: |
| 99 | ``` |
| 100 | Local version: v{local} |
| 101 | Latest version: v{latest} |
| 102 | Update type: {major | minor | patch} |
| 103 | ``` |
| 104 | - If the update is a **major** version bump, warn: |
| 105 | "This is a major version update. It may include breaking changes to |
| 106 | skill contracts. Review the release notes before proceeding." |
| 107 | - Ask: "Proceed with update? [yes / no]" |
| 108 | - If no, stop execution. |
| 109 | |
| 110 | ### Step 5: Scan for Local Modifications |
| 111 | |
| 112 | Before fetching new files, scan the local installation for user |
| 113 | modifications. This protects customizations from being silently |
| 114 | overwritten. |
| 115 | |
| 116 | **How to detect modifications:** |
| 117 | |
| 118 | 1. **If the local install is a git repo** (preferred): |
| 119 | - Run `git status --p |