Skip to main content

Usage

Description

The update command automatically checks for and installs the latest versions of all globally installed skills. It’s equivalent to running skills check followed by reinstalling each skill that has an update.
Only global skills installed with -g are updated. Project-scoped skills are not tracked for updates.

How It Works

1

Check for Updates

Reads ~/.agents/.skill-lock.json and compares each skill’s folder hash with the latest version on GitHub.This is the same process as skills check.
2

Identify Updates

Creates a list of skills where the current hash differs from the latest hash.
3

Reinstall Skills

For each skill with an update:
  1. Constructs the source URL with skill path
  2. Runs npx skills add <url> -g -y
  3. Tracks success/failure
4

Report Results

Shows:
  • Number of skills successfully updated
  • Number of skills that failed to update
  • Updated lock file with new hashes

Update Process

For each skill needing an update:
The reinstallation:
  • ✅ Downloads latest files from GitHub
  • ✅ Preserves agent links (reinstalls to same agents)
  • ✅ Updates lock file with new hash
  • ✅ Maintains global installation

Output Examples

Skills Not Updated

Some skills cannot be updated automatically (same as skills check):

Local Paths

Skills from local paths (./my-skill) are skipped.Manual update:

Git URLs

Non-GitHub Git URLs don’t support automatic updates yet.Manual update:

No Version Hash

Skills without a skillFolderHash in the lock file.Fix: Reinstall the skill

Missing Skill Path

Skills without a skillPath in the lock file.Fix: Reinstall the skill

GitHub Token

For better performance and private repository access, set a GitHub token:
Benefits:
  • Higher rate limits: 5,000 requests/hour (vs 60 unauthenticated)
  • Private repos: Access skills in private repositories
  • Faster: Avoids rate limit delays

Update URL Construction

The update process constructs URLs based on lock file data:
This ensures:
  • ✅ Exact skill folder is updated (not the entire repo)
  • ✅ Correct branch is used (defaults to main)
  • ✅ Subpath is preserved

Lock File Updates

After successful update, the lock file is updated: Before:
After:

Comparison with Check

The check and update commands work together: When to use:
  • check: Quick check before committing, in CI, or before presentations
  • update: When you’re ready to update and have time for downloads

Error Handling

The update process is resilient:
Behavior: Continues updating other skillsResult:
  • Successful skills are updated
  • Failed skills show error messages
  • Lock file only updated for successful skills
Behavior: Skips unreachable skillsCauses:
  • GitHub API down
  • Repository deleted/moved
  • Network connectivity issues
Solution: Try again later or reinstall manually
Behavior: Update completes, but lock not updatedImpact: Next update may re-download same versionSolution: Check file permissions on ~/.agents/.skill-lock.json

Best Practices

1

Check First

Run skills check before updating to see what will change:
2

Set GitHub Token

Avoid rate limits with a personal access token:
Add to your shell profile for persistence.
3

Review Changes

After updating, review the skill changes:
Test skills with your agent before important work.

Troubleshooting

Symptoms: Command runs but nothing updatesCauses:
  • No global skills installed
  • All skills already up to date
  • Skills can’t be auto-updated (local/git)
Check:
Symptoms: Skill not found after successful updateCause: Skill was removed from source repositorySolution: Remove from lock file or pin to old version
Symptoms: Update hangs or is very slowCauses:
  • Large skill repositories
  • Slow network connection
  • Many skills to update
Solutions:
  • Use GitHub token for better rate limits
  • Update specific skills manually
  • Check network connection

Alias

The following alias is available:
  • skills upgradeskills update