mdskills
guides

How to Update and Manage Your Installed AI Agent Skills

Team managing workflow
Photo by Annie Spratt on Unsplash

Your AI agent accumulates skills over time. Installing them was the easy part. Keeping them current without breaking things? That's where most developers hit walls.

Git-based skills update automatically when you pull changes. But version conflicts, deprecated APIs, and stale dependencies create real problems. Here's how to update and manage your installed AI agent skills without the headaches.

Check what you actually have

Before touching anything, inventory your current skills. Most developers skip this step and regret it.

find ~/.config/ai-agents -name "SKILL.md" -exec dirname {} \;

This shows every skill directory. Now check which ones are Git repositories:

for dir in ~/.config/ai-agents/*/; do
  if [ -d "$dir/.git" ]; then
    echo "Git: $dir"
  else
    echo "Static: $dir"
  fi
done

Git-managed skills can update cleanly. Static installs need manual replacement. The difference matters for your update strategy.

Version checking that actually works

Each SKILL.md spec file contains version metadata. But parsing it manually is tedious. Create a simple version checker:

#!/bin/bash
for skill_dir in ~/.config/ai-agents/*/; do
  if [ -f "$skill_dir/SKILL.md" ]; then
    version=$(grep "^version:" "$skill_dir/SKILL.md" | cut -d' ' -f2)
    name=$(basename "$skill_dir")
    echo "$name: $version"
  fi
done

Run this before and after updates to track changes. Some skills don't follow semantic versioning. Others use dates or commit hashes. Document the inconsistencies.

Git-based updates (the clean way)

For Git repositories, updating is straightforward but requires care with local modifications.

cd ~/.config/ai-agents/your-skill
git fetch
git status

Clean working directory? Pull directly:

git pull origin main

Local changes present? You have options. Stash and reapply if the changes are configuration tweaks:

git stash
git pull origin main
git stash pop

If conflicts emerge during stash pop, resolve them manually. The skill author's changes take precedence unless you've made critical customizations.

For major local modifications, create a branch first:

git checkout -b local-changes
git add .
git commit -m "Local modifications before update"
git checkout main
git pull origin main

Then cherry-pick or merge your changes back. This keeps update history clean.

Managing static skill updates

Static skills (no Git repository) require manual replacement. But don't just delete and reinstall. You'll lose configuration.

First, backup the current version:

cp -r ~/.config/ai-agents/skill-name ~/.config/ai-agents/skill-name.backup

Download the new version to a temporary location:

curl -L https://github.com/author/skill/archive/refs/heads/main.zip -o skill-update.zip
unzip skill-update.zip

Compare the old and new SKILL.md files:

diff ~/.config/ai-agents/skill-name/SKILL.md skill-main/SKILL.md

Look for breaking changes in the interface, new dependencies, or removed functions. If the update looks safe, replace the files but preserve any configuration:

cp ~/.config/ai-agents/skill-name/config.json /tmp/
rm -rf ~/.config/ai-agents/skill-name
mv skill-main ~/.config/ai-agents/skill-name
cp /tmp/config.json ~/.config/ai-agents/skill-name/

Dependency conflicts and resolution

Skills often share dependencies. Python packages, Node modules, system libraries. Updates can break these shared resources.

Check for Python conflicts:

pip list | grep -E "(requests|numpy|pandas)" 

Different skills might pin different versions of the same package. The skill best practices recommend virtual environments, but many authors ignore this.

When conflicts arise, isolate the problematic skill. Create a dedicated environment:

python -m venv ~/.config/ai-agents/isolated-skill/venv
source ~/.config/ai-agents/isolated-skill/venv/bin/activate
pip install -r requirements.txt

Update the skill's execution script to use this environment. Not elegant, but it works.

Cleaning up unused skills

Dead skills accumulate. They consume disk space and create confusion. Regular cleanup prevents bloat.

Find skills that haven't been accessed recently:

find ~/.config/ai-agents -name "SKILL.md" -atime +30

This shows skills untouched for 30 days. But access time isn't always reliable. Check your agent's usage logs instead:

grep "skill:" ~/.local/share/ai-agent/usage.log | tail -100

Skills not appearing in recent logs are candidates for removal. But verify they're not dependencies for other skills first.

Some skills provide utilities that other skills import. Removing them breaks the dependents. Check for cross-references:

grep -r "import.*skill-name" ~/.config/ai-agents/

Handling breaking changes

Skill authors sometimes introduce breaking changes. Function signatures change, APIs get deprecated, configuration formats evolve.

Read the changelog before updating. Many skills include CHANGELOG.md or release notes. If not, check the Git history:

git log --oneline --since="1 month ago"

Look for commits mentioning "breaking", "deprecated", or version number bumps. Test the updated skill in isolation before deploying to your main agent.

Create a test configuration:

cp -r ~/.config/ai-agents ~/.config/ai-agents-test
# Update the test copy
# Run your agent against the test configuration
# Verify everything works

If the update breaks existing workflows, you have several options:

  • Pin to the old version (but lose future updates)
  • Adapt your workflows to the new interface
  • Fork the skill and maintain your own version

Automation for regular updates

Manual updates get tedious. Automate the process for Git-managed skills:

#!/bin/bash
for skill_dir in ~/.config/ai-agents/*/; do
  if [ -d "$skill_dir/.git" ]; then
    echo "Updating $(basename "$skill_dir")"
    cd "$skill_dir"
    git fetch
    if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then
      git pull origin main
      echo "Updated: $(basename "$skill_dir")"
    else
      echo "Already current: $(basename "$skill_dir")"
    fi
  fi
done

Run this weekly. But always test critical skills after automatic updates. Production agents need stability over bleeding-edge features.

When updates go wrong

Rollbacks happen. Keep the backup strategy simple but reliable.

For Git repositories, rolling back is straightforward:

cd ~/.config/ai-agents/broken-skill
git log --oneline
git reset --hard <previous-commit-hash>

For static skills, restore from your backup:

rm -rf ~/.config/ai-agents/broken-skill
mv ~/.config/ai-agents/broken-skill.backup ~/.config/ai-agents/broken-skill

Document what broke and why. This helps with future updates and provides valuable feedback to skill authors.

Maintaining AI agent skills requires balance. Too aggressive with updates and you break working systems. Too conservative and you miss important fixes and features. Regular inventory, careful testing, and good backup habits keep your skills current without the chaos.

The effort pays off. Updated skills perform better, have fewer bugs, and often include new capabilities that expand what your agent can accomplish.

skillsupdatemanage

Related Articles