squad-version-check

Inspects squad-cli version stamping, upgrade behavior, and npm registry version probes.

5.1k|530|Updated Aug 12, 2025
One-click install
npx skills add https://github.com/github/gh-aw --skill squad-version-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: squad-version-check
Source: https://github.com/github/gh-aw/tree/main/.squad/templates/skills/squad-version-check
Command: npx skills add https://github.com/github/gh-aw --skill squad-version-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When working with the @bradygaster/squad-cli, it is hard to know exactly how versions are stamped into squad.agent.md, what squad upgrade overwrites versus preserves, and how to check the npm registry for the latest release without breaking user data. This Skill documents those internals so an agent can perform version checks and upgrades safely.

Core Features & Use Cases

  • Version Stamping Internals: Explains how getPackageVersion, stampVersion, and readInstalledVersion mutate and read squad.agent.md.
  • Upgrade Behavior Reference: Details which files squad upgrade overwrites (templates, workflows) and which it preserves (team.md, decisions.md, .squad/config.json, agent history).
  • Registry & Cache Probing: Provides the npm dist-tags one-liner with a 5-second timeout, plus the OS-specific update-check cache paths and the repo-local .squad/.cache/version-check.json schema with 24h TTL.
  • Use Case: A coordinator agent needs to greet users with an update notice only when a newer insider build exists; it reads the cache, falls back to npm view @bradygaster/squad-cli dist-tags --json, and degrades gracefully on network errors.

Quick Start

Ask the agent to check whether a newer version of @bradygaster/squad-cli is available on the insider channel using the npm registry probe with a 5-second timeout.

Frequently Asked Questions about squad-version-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check the latest version of squad-cli from npm?

Run `npm view @bradygaster/squad-cli dist-tags --json` to fetch dist-tags such as latest or insider. Apply a 5-second timeout, and on any network or parse error fall back to the normal greeting without showing update information.

What does squad upgrade overwrite and preserve?

squad upgrade overwrites squad.agent.md, manifest files flagged overwriteOnUpgrade, and GitHub Actions workflows, then runs migrations. It preserves team.md, routing.md, decisions.md, ceremonies.md, agents/*/history.md, and .squad/config.json.

How is the version stamped into squad.agent.md?

The stampVersion function writes an HTML comment `<!-- version: X.Y.Z -->` after the frontmatter, updates the `- **Version:**` identity line, and sets the backtick-quoted greeting `Squad vX.Y.Z`. Both init and upgrade call it after copying the template.

Where is the squad-cli update-check cache stored?

The CLI writes update-check.json under an OS-specific path: %APPDATA%\squad-cli on Windows, ~/.config/squad-cli on Linux, and ~/Library/Application Support/squad-cli on macOS. Entries older than 24 hours are treated as stale.

Does squad upgrade ever modify .squad/config.json?

No. The upgrade path never touches .squad/config.json, so settings like stateBackend, defaultModel, and per-agent model overrides survive upgrades. Only the coordinator writes to that file for model preferences.