Version check
Compares installed plugin version with the latest availableFrom its SKILL.md
npx -y skills add asysta-act/agent-flow --skill version-checkAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 12 stars12 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
9.1 KB, as published. Nobody here has run it
Version Check
Check whether the installed plugin version is up to date. Works from any directory.
Plugin Identity
| Key | Value |
|---|---|
| Plugin | agent-flow |
| Marketplace | agent-flow |
| Legacy names | CLAUDE-agents |
All steps below use {plugin} and {marketplace} from this table.
Steps
Part A: Installed Plugin Status (always runs)
-
Read
~/.claude/plugins/installed_plugins.json.- If the file does not exist → report: "Claude Code plugin registry not found at
~/.claude/plugins/installed_plugins.json. No plugins installed — run/plugin installfirst." and STOP. - If the file is empty or is not valid JSON → report: "Plugin registry at
~/.claude/plugins/installed_plugins.jsonis empty or corrupt — cannot parse." and STOP. - Search for the plugin: find any key in
pluginsthat starts with{plugin}@. If no match, also search for keys starting with any name inLegacy names(e.g.CLAUDE-agents@). Prefer{plugin}@{marketplace}if it exists; otherwise use the first match. - If no matching key found → report: "{plugin} plugin is not installed. Run:
/plugin install {plugin}@{marketplace}" and STOP. - Read
versionandinstallPathfrom the matched entry. Store asinstalled_version,install_path, and note the actual registry key asregistry_key. - If
registry_keydoes not equal{plugin}@{marketplace}→ warn: "Plugin is registered under{registry_key}instead of{plugin}@{marketplace}. Consider reinstalling:/plugin uninstall {plugin}then/plugin install {plugin}@{marketplace}"
- If the file does not exist → report: "Claude Code plugin registry not found at
-
Verify
install_pathexists on disk.- If it does not exist → warn: "Install path
{install_path}does not exist — plugin may need reinstalling. Run:/plugin uninstall {plugin}then/plugin install {plugin}@{marketplace}". Continue to step 3.
- If it does not exist → warn: "Install path
-
Determine the latest available version from remote.
- Determine the remote URL to query. Try these sources in order (first success wins):
- If CWD is a git repo AND Part B will activate (
.claude-plugin/plugin.jsonexists with matchingname) → usegit remote get-url originfrom CWD. This is the most reliable source (uses the developer's configured SSH/HTTPS auth). - Otherwise → read
{install_path}/.claude-plugin/plugin.jsonand extract therepositoryfield. - If neither source yields a URL → report: "Remote version check skipped — no remote URL available." Skip to step 4 (show installed version only).
- If CWD is a git repo AND Part B will activate (
- Before running the remote call, check whether the URL is a placeholder. This check applies to source-2 only (plugin.json
repository); source-1 (usergit remote) is trusted by definition.
The boundary anchor# RFC 2606 reserved TLD fast-fail: # source-2 only; HTTPS-only scope; SSH SCP-style deferred (no source-1 check) # Extract hostname from URL, then match (test|example|invalid|localhost) as last DNS label # or as the bare host. Path-anchored matching avoids false positives where a reserved # label appears in a path component (e.g. github.com/foo.invalid/bar). # Match alternation kept inline for harness compatibility: (test|example|invalid|localhost) host=$(echo "$remote_url" | sed -E 's|^[a-z]+://([^/]+).*|\1|' | sed -E 's|^[^@]+@||' | sed -E 's|:[0-9]+$||') host="${host%.}" # strip RFC 1034 trailing dot last_label=$(echo "$host" | awk -F. '{print $NF}') if [ "$last_label" = "test" ] || [ "$last_label" = "example" ] || [ "$last_label" = "invalid" ] || [ "$last_label" = "localhost" ] \ || [ "$host" = "test" ] || [ "$host" = "example" ] || [ "$host" = "invalid" ] || [ "$host" = "localhost" ]; then echo "Remote version check skipped — plugin.json \`repository\` field is a placeholder. Set it to a real URL." exit 0 fi(/|:|$)is implicit in the hostname-extract step — the host is delimited by/or end-of-string after the scheme, so the URL parser handles boundary detection. - Run:
Iftimeout 10 git ls-remote --tags {remote_url} 'refs/tags/v*' 2>/dev/null | grep -v '\^{}' | sort -t/ -k3 -V | tail -1timeoutis not available, omit it and rungit ls-remotedirectly. - If the command fails (network error, SSL error, auth failure, timeout) → report: "Cannot reach remote repository. Showing installed version only." Skip to step 4.
- If the output is empty (no tags, or no tags matching
v*) → report: "No version tags found on remote repository. Showing installed version only." Skip to step 4. - Extract the version string from the tag reference (e.g.,
refs/tags/v5.5.1→5.5.1). Store asremote_version.
- Determine the remote URL to query. Try these sources in order (first success wins):
-
Compare and display.
- If
remote_versionis not available (skipped in step 3) → display: "{plugin} {installed_version} (installed) — remote version unknown" and proceed to Part B. - Compare
installed_versionandremote_versionas semantic versions: split each on.and compare each component (major, minor, patch) as integers — NOT as strings. To determine which version is smaller, use:
If the result equalsprintf '%s\n' "$installed_version" "$remote_version" | sort -V | head -1$installed_versionand$installed_version!=$remote_version, thenremote_versionis newer. - Up to date:
installed_version==remote_version→ "{plugin} {installed_version} — up to date" - Update available:
installed_version<remote_version→ "{plugin} {installed_version} → {remote_version} — update available. Run:/plugin uninstall {plugin}then/plugin install {plugin}@{marketplace}" - Locally newer:
installed_version>remote_version→ "{plugin} {installed_version} > {remote_version} — installed version is newer than remote"
- If
Part B: Repo Comparison (conditional — only when CWD is the plugin's own repo)
-
Check if
.claude-plugin/plugin.jsonexists in the current working directory.- If not present → skip Part B silently (not in any plugin repo).
- If present → read the
namefield from it. - If
namedoes not equal{plugin}→ skip Part B silently (CWD is a different plugin's repo). - If
nameequals{plugin}→ readversionfrom the same file. Store asrepo_version.
-
If
remote_versionis available andrepo_version<remote_version: auto-pull.- Run
git pullto update the repo to the latest remote version. - If
git pullfails (merge conflict, dirty working tree, etc.) → warn: "git pull failed — repo stays at {repo_version}." and continue with the currentrepo_version. - If
git pullsucceeds → re-readversionfrom.claude-plugin/plugin.jsonand updaterepo_version.
- Run
-
Compare
repo_versionwithinstalled_version.- Use the same semantic version comparison as step 4.
- Match: "Repo version matches installed plugin ({repo_version})" → skip Part C.
- Repo is newer: "Repo is {repo_version} but installed plugin is {installed_version}" → proceed to Part C (auto-update).
- Repo is older: "Repo is {repo_version} but installed plugin is {installed_version} — repo is behind installed version" → skip Part C.
Part C: Auto-Update Cache (conditional — only when Part B detects repo is newer)
- Update the installed plugin cache via CLI commands.
- Extract the marketplace name from
{registry_key}— it is the part after the@(e.g.agent-flow@CLAUDE-agents→ marketplace isCLAUDE-agents). Store as{actual_marketplace}. - Run the marketplace update followed by the plugin update:
claude plugin marketplace update {actual_marketplace} claude plugin update "{registry_key}" --scope user - If update succeeds → report: "Plugin cache updated: {installed_version} → {repo_version}. Run
/reload-pluginsto apply, or changes take effect on the next Claude Code session." - If update fails with EBUSY/locked file error → report: "IDE has files locked. Close Visual Studio (or other IDE), then re-run this command."
- If update fails for other reasons → report the error and fall back to: "Auto-update failed. Run manually:
/plugin uninstall {plugin}then/plugin install {plugin}@{marketplace}"
- Extract the marketplace name from
Rules
- Part A (steps 1-4) works from ANY directory — no repo or project dependency
- Part B (steps 5-7) only activates when CWD contains
.claude-plugin/plugin.jsonwhosenamefield matches the Plugin Identity. Step 6 auto-pulls if repo is behind remote. - Part C (step 8) only activates when Part B detects repo is newer than installed — auto-syncs the plugin cache
- Part A is read-only. Parts B-C may update the plugin cache when the repo version is ahead
- The authoritative source for the installed version is
~/.claude/plugins/installed_plugins.json, NOT the cache directory structure - The authoritative source for the remote URL is the
repositoryfield in{install_path}/.claude-plugin/plugin.json— never use a hardcoded URL - When any step fails or data is unavailable, report clearly what was skipped and why, then continue with what is available — never halt silently