返回技能列表

utility-update-pm-skills

product-on-purpose
更新于 2 days ago
5 次查看
238
33
238
在 GitHub 上查看
aitesting

关于

This skill updates a local pm-skills installation by fetching the latest public release and performing a conflict-aware file sync with user-controlled overwrite-or-skip options. It validates internet access, compares versions, and generates a detailed report of changes. Use it to easily bring a local development environment up to date with the official repository.

快速安装

Claude Code

推荐
主要方式
npx skills add product-on-purpose/pm-skills -a claude-code
插件命令备选方式
/plugin add https://github.com/product-on-purpose/pm-skills
Git 克隆备选方式
git clone https://github.com/product-on-purpose/pm-skills.git ~/.claude/skills/utility-update-pm-skills

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

<!-- PM-Skills | https://github.com/product-on-purpose/pm-skills | Apache 2.0 -->

PM Skills Updater

This skill updates a local pm-skills installation to the latest public release. It validates connectivity, compares versions, detects local modifications, gives the user control over conflict resolution, and produces a structured update report documenting every change.

The updater operates in three phases:

  • Pre-flight -- validate internet access and determine version delta.
  • Update -- fetch the latest release and apply changes with conflict-aware overwrite-or-skip logic.
  • Report -- generate a markdown report summarizing what changed, what was skipped, and what new capabilities are available.

When to Use

  • When you want to update your local pm-skills to the latest release
  • After a new pm-skills version is announced and you want to pull it in
  • When you're unsure whether your local copy is current
  • When onboarding to a team that uses pm-skills and you want the latest version
  • When you want a structured summary of what changed between your version and the latest

When NOT to Use

  • To create or edit individual skills -> use /pm-skill-builder or /pm-skill-iterate
  • To validate skills against conventions -> use /pm-skill-validate
  • If you are a maintainer working directly on the pm-skills repo (use git instead)
  • If you need to pin a specific older version (this skill always targets the latest release)

Instructions

When asked to update pm-skills, follow these steps:

Step 1: Validate Internet Access

Before attempting any remote operations, confirm connectivity to GitHub.

How to validate:

  1. Attempt to reach the GitHub API or the public repository URL: https://github.com/product-on-purpose/pm-skills
  2. Use any available method: curl, wget, fetch, GitHub CLI (gh), or the GitHub MCP tools.

If connectivity fails:

  • Report the failure clearly with the error details.
  • Suggest troubleshooting steps: check network, proxy settings, VPN, or firewall rules.
  • Stop execution. Do not proceed to Step 2.

If connectivity succeeds:

  • Report: "Internet access validated. Connected to GitHub."
  • Proceed to Step 2.

Step 2: Determine Local Version

Read the local version from these sources (in priority order):

  1. .claude-plugin/plugin.json -- version field
  2. marketplace.json -- plugins[0].version field
  3. CHANGELOG.md -- most recent version header
  4. Git tags -- most recent v* tag

Record:

  • Local version: the version string (e.g., 2.8.2)
  • Local version source: which file provided the version

If no version can be determined, warn the user and default to 0.0.0 (treat as a fresh install requiring full update).

Step 3: Fetch Latest Public Release

Query the public repository for the latest release:

Methods (try in order):

  1. GitHub API: GET /repos/product-on-purpose/pm-skills/releases/latest
  2. GitHub CLI: gh release list --repo product-on-purpose/pm-skills --limit 1
  3. Git: git ls-remote --tags https://github.com/product-on-purpose/pm-skills.git

Record:

  • Latest version: the version string from the latest release
  • Release date: when the release was published
  • Release notes URL: link to the release page
  • Release notes body: the release description (for capability diff in Step 8)

Step 4: Compare Versions

Compare the local version against the latest public version.

If local version >= latest version:

  • Report: "Your pm-skills installation is up to date (v{local})."
  • Offer to generate a version report anyway (skip to Step 8 with no changes to report).
  • Stop execution unless the user requests a forced update.

If local version < latest version:

  • Report the version delta:
    Local version:  v{local}
    Latest version: v{latest}
    Update type:    {major | minor | patch}
    
  • If the update is a major version bump, warn: "This is a major version update. It may include breaking changes to skill contracts. Review the release notes before proceeding."
  • Ask: "Proceed with update? [yes / no]"
  • If no, stop execution.

Step 5: Scan for Local Modifications

Before fetching new files, scan the local installation for user modifications. This protects customizations from being silently overwritten.

How to detect modifications:

  1. If the local install is a git repo (preferred):

    • Run git status --porcelain to find uncommitted changes.
    • Run git diff HEAD to see the actual modifications.
    • Any file with local changes is flagged as "locally modified."
  2. If the local install is NOT a git repo (downloaded release):

    • Compare file checksums (SHA-256) against a manifest if available.
    • If no manifest is available, skip modification detection and note this limitation in the report.

Record a list of locally modified files with their modification type:

  • modified -- content differs from the installed version
  • added -- file exists locally but not in the original release
  • deleted -- file was removed locally

Present the findings:

Locally modified files detected: {n}
- {status} | {file-path}
- {status} | {file-path}
...

If no modifications are detected, report: "No local modifications detected. Safe to update all files."

Step 6: Fetch and Apply Updates

Fetch the latest release content and apply updates file by file.

Update method (try in order):

  1. Git pull/merge (if local is a git repo):

    • git fetch origin
    • git merge origin/main (or the tagged release)
    • If merge conflicts arise, handle per the conflict resolution rules below.
  2. Release archive download (if not a git repo):

    • Download the release archive (.tar.gz or .zip).
    • Extract to a temporary directory.
    • Copy files to the local installation per the rules below.

File-by-file application rules:

For each file in the update:

Local statusActionUser prompt
UnmodifiedOverwrite silentlyNone
Locally modifiedPrompt user"File {path} has local changes. [overwrite / skip / diff]"
New file (not in local)Add silentlyNone
Deleted locallyPrompt user"File {path} was deleted locally but exists in the update. [restore / skip]"

Conflict resolution options:

  • overwrite: Replace the local file with the upstream version. The original is backed up to {path}.local-backup before overwriting.
  • skip: Keep the local version. Record as skipped in the report.
  • diff: Show a side-by-side or unified diff of the local vs. upstream version, then re-prompt with [overwrite / skip].
  • restore: Add the file back from the upstream version.
  • overwrite-all: Apply overwrite to all remaining conflicts without further prompting.
  • skip-all: Apply skip to all remaining conflicts without further prompting.

Step 7: Post-Update Validation

After applying updates, run a quick health check:

  1. Version consistency: Verify that .claude-plugin/plugin.json, marketplace.json, and CHANGELOG.md all reflect the new version.
  2. File integrity: Confirm that key files exist:
    • AGENTS.md
    • skills/ directory with expected skill count
    • commands/ directory
    • _workflows/ directory
  3. Skill count delta: Compare the number of skills before and after the update. Report any additions or removals.

If validation fails, warn the user with specific details about what looks wrong. Do not roll back automatically -- the user may want to investigate.

Step 8: Generate Update Report

Produce the update report using the template in references/TEMPLATE.md. This is the primary output artifact.

The report includes:

  1. Version summary: local (before) -> latest (after), update type.
  2. Files changed: every file that was updated, with a one-line summary of what changed.
  3. Files skipped: files the user chose to skip due to local modifications, with the reason.
  4. Files added: new files not present in the previous version.
  5. Files removed: files present in the old version but not in the new one.
  6. New capabilities: skills added, skills updated (with version deltas), workflows added, and any breaking changes -- derived from release notes and file diff analysis.
  7. Skipped file recovery: instructions for how to manually update any files that were skipped.

Report delivery:

  • Display the report in the conversation.
  • Offer to save it as a file: updates/update-{from}-to-{to}-{date}.md (e.g., updates/update-v2.8.2-to-v2.9.0-2026-04-09.md).

Step 9: Present Next Steps

After the update completes, suggest next steps:

## Next Steps

- Review the update report for any skipped files
- Run `/pm-skill-validate --all` to verify skill integrity
- Run local CI: `bash scripts/lint-skills-frontmatter.sh`
- Check the release notes for any migration steps: {release-url}
- If you skipped files with local changes, consider merging manually

Degraded Mode

If running in an environment without direct file system or network access (e.g., MCP or embedded environment):

  1. No network access: Cannot perform the update. Report the limitation and provide the user with manual update instructions:
    • Link to the latest release page
    • List the steps to download and extract manually
  2. No file system access: Cannot scan for local modifications or write updated files. Provide:
    • Version comparison (if the user pastes their local version info)
    • Capability diff from release notes
    • A checklist of files the user should update manually
  3. Partial access: Do what you can. Clearly note which steps were skipped and why in the report.

Output Contract

The updater MUST produce an update report following the format in references/TEMPLATE.md.

The report:

  • Uses the exact section headings defined in the template
  • Includes version information for both local and upstream
  • Lists every file with its disposition (updated, skipped, added, removed)
  • Describes new capabilities derived from the version delta
  • Provides recovery instructions for any skipped files

The updater MUST:

  • Validate internet access before attempting any remote operations
  • Determine the local version before comparing against upstream
  • Never silently overwrite a locally modified file
  • Back up locally modified files before overwriting (if user chooses overwrite)
  • Present a clear prompt for each conflict with diff capability
  • Support batch conflict resolution (overwrite-all / skip-all)
  • Run post-update validation to confirm a healthy state

The updater MUST NOT:

  • Proceed without internet access confirmation
  • Overwrite locally modified files without user consent
  • Delete local files that don't exist in the upstream release
  • Auto-rollback on validation failure (inform the user instead)
  • Modify files outside the pm-skills directory

Quality Checklist

Before delivering the update report, verify:

  • Internet access was validated before any remote operations
  • Local version was correctly identified from available sources
  • Latest public version was fetched and compared
  • User was warned about major version updates (if applicable)
  • All locally modified files were detected and presented
  • User was prompted for each file conflict (or batch mode was used)
  • Backups were created for overwritten locally modified files
  • Post-update validation passed (or failures were reported)
  • Update report follows the template format exactly
  • New capabilities section accurately reflects the version delta
  • Skipped file recovery instructions are provided
  • Next steps are presented

Examples

See references/EXAMPLE.md for a completed update report demonstrating a minor version update with local modifications, conflict resolution, and new capability discovery.

GitHub 仓库

product-on-purpose/pm-skills
路径: docs/internal/efforts/F-24-update-pm-skills/_discovery/2026-04-09_claude-web-session/skills/utility-update-pm-skills
0
agent-skillsai-skillsclaude-codeclaude-desktopdesign-sprintfoundation-sprint

相关推荐技能

content-collections

Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。

查看技能

polymarket

这个Claude Skill为开发者提供完整的Polymarket预测市场开发支持,涵盖API调用、交易执行和市场数据分析。关键特性包括实时WebSocket数据流,可监控实时交易、订单和市场动态。开发者可用它构建预测市场应用、实施交易策略并集成实时市场预测功能。

查看技能

creating-opencode-plugins

该Skill帮助开发者创建OpenCode插件,用于接入命令、文件、LSP等25+种事件。它提供了插件结构、事件API规范和JavaScript/TypeScript实现模式,适合需要拦截操作、扩展功能或自定义事件处理的场景。开发者可通过它快速构建响应式模块来增强OpenCode AI助手的能力。

查看技能

sglang

SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。

查看技能