9.6 KiB
.autoupdate
Keeps your AI agent skills up to date on every machine, with plain git and cron. You list the skills you want in one file and the harnesses (Claude Code, Codex, OpenCode and friends) in another; skills-autoupdate clones or updates every skill in every harness, at the version you asked for.
What it does, in plain words
Each run:
- Reads the harnesses from
~/.config/harnessesand finds the config folder of each one, by name or by looking inside the path you gave. - Reads the skills from
~/.config/skills. - For every harness and every skill, works in
<harness folder>/skills/<skill name>:- if the folder does not exist, clones the skill there;
- otherwise fetches the latest commits and tags;
- then checks out the version you asked for: the latest commit of the default branch, a fixed tag or commit, or the newest tag above a given version.
- Prints one line per skill and harness (
cloned,updated,up to date, warnings, errors) and exits with a non-zero status if anything failed.
It never throws away your work: a skill folder with local changes, a folder that is not a git checkout, or a checkout that points to a different repository is skipped with a warning.
Install
git clone https://git.bjphoster.com/skills/.autoupdate.git
cd .autoupdate
./install.sh
The installer:
- copies
skills-autoupdateto~/.local/bin/; - creates
~/.config/skillsand~/.config/harnessesfrom the examples, only if they do not exist yet (every line is commented out, so nothing happens until you edit them); - adds a crontab entry that runs the update every hour at minute 17 and appends the output to
~/.local/state/skills-autoupdate.log.
Running it again is safe: the crontab entry is replaced, not duplicated, and your config files are left alone.
| Option or variable | Effect |
|---|---|
./install.sh --no-cron |
Install without touching the crontab |
./install.sh --uninstall |
Remove the script and the crontab entry (config files are kept) |
SCHEDULE="0 */6 * * *" ./install.sh |
Use a different cron schedule |
BIN_DIR=/some/dir ./install.sh |
Install the script somewhere else |
LOG_FILE=/some/file ./install.sh |
Write the cron log somewhere else |
To update the tool itself, git pull in the clone and run ./install.sh again.
Configuration
Both files take one entry per line. Empty lines and everything after a # are ignored.
~/.config/skills
<git url>[<operator><version>]
| Line | Meaning |
|---|---|
https://git.bjphoster.com/skills/ship |
Follow the default branch: every run moves to its latest commit |
https://git.bjphoster.com/skills/ship=0.1.0 |
Stay on tag 0.1.0 (a v0.1.0 tag works too) |
https://git.bjphoster.com/skills/settle=be3f9d3646526bbd504688bd3113b9d18734b2d3 |
Stay on that exact commit |
https://git.bjphoster.com/skills/settle=be3f9d3646 |
Same, with a short commit hash |
https://git.bjphoster.com/skills/ship>0.1.0 |
Use the newest tag strictly greater than 0.1.0, and keep moving to newer tags as they come out |
https://git.bjphoster.com/skills/ship>=0.1.0 |
Same, but 0.1.0 itself is accepted |
The skill folder is named after the last part of the URL, without .git: https://git.bjphoster.com/skills/ship is installed as skills/ship. HTTPS and SSH URLs both work (git@host:org/name.git).
Versions are compared with sort -V, and only tags that start with a digit (optionally after a v) count. With > or >=, if no tag matches yet the skill is left where it is and a warning is printed. = also accepts a branch name (=main): the skill then follows that branch. To go back from a pinned version to following the branch, just remove the operator and the version.
Skills inside a bigger repository
Some repositories hold several skills in subfolders. List the ones you want between braces, separated by commas, right after the URL:
https://github.com/t3dotgg/tstack{/skills/council,/skills/sol-loop}
This installs two skills, council and sol-loop, the same as taking only the folders https://github.com/t3dotgg/tstack/tree/main/skills/council and https://github.com/t3dotgg/tstack/tree/main/skills/sol-loop. Each skill is named after the last part of its folder, and only the content of that folder ends up in <harness folder>/skills/<name>, not the rest of the repository.
The version goes after the braces and applies to every folder on that line:
| Line | Meaning |
|---|---|
https://github.com/t3dotgg/tstack{/skills/council} |
council from the latest commit of the default branch |
https://github.com/t3dotgg/tstack{/skills/council,/skills/sol-loop}=1.2.0 |
Both from tag 1.2.0 |
https://github.com/t3dotgg/tstack{/skills/council}>=1.2.0 |
council from the newest tag from 1.2.0 up |
https://github.com/t3dotgg/tstack{/skills/council}=dev |
council following the dev branch |
To use different versions for different folders of the same repository, put them on separate lines. The leading and trailing / in the folder are optional, and folders containing .. are refused.
How it works: the repository is kept as a git mirror in ~/.cache/skills-autoupdate (fetched once per run, however many skills and harnesses use it), and each folder is extracted from there into the skill folder. Since that folder is a plain copy and not a git checkout, the script writes a small .skills-autoupdate file next to the skill with the source URL, the folder, the commit and a checksum of the files. On the next run it uses that file to know which version is installed and whether you changed anything: if a file was edited, added or removed, the skill is skipped with a warning, exactly like a git checkout with local changes. Delete the skill folder to get a fresh copy.
Every skill name must be unique across the whole file: if two lines would install a skill with the same name, the second one is skipped with a warning.
~/.config/harnesses
Each line is either a harness name or a path to a harness config folder:
codex
~/.codex2
claude
~/.claudeDodolo
opencode
/home/otheruser/.codex
Known names and their default folders (skills go into <folder>/skills):
| Name | Also accepted as | Default folder |
|---|---|---|
claude |
claude-code |
~/.claude |
codex |
openai-codex |
~/.codex |
opencode |
~/.config/opencode (honors XDG_CONFIG_HOME) |
|
antigravity |
agy |
~/.gemini/antigravity |
pi |
pi-agent, pi-coding-agent |
~/.pi/agent |
cursor |
cursor-agent |
~/.cursor |
kimi |
kimi-cli |
~/.kimi |
zcode |
glm, z-code |
~/.zcode |
A name whose default folder does not exist on this machine is skipped quietly, so the same harnesses file can be shared between machines that have different tools installed.
Paths can be absolute (/home/otheruser/.codex), start with ~ (~/.codex2) or be relative, in which case they are relative to your home folder (.claudeDodolo is ~/.claudeDodolo). The harness inside a path is recognized by the files it contains:
| Harness | Recognized by |
|---|---|
| OpenCode | opencode.json or opencode.jsonc |
| Kimi | kimi.json |
| ZCode | cli/plugins and workspace, or cli/config.json and v2 |
| Claude Code | .credentials.json, CLAUDE.md or .claude.json |
| Codex | config.toml together with AGENTS.md, auth.json, installation_id or sessions/ |
| Antigravity | mcp_config.json or brain/ |
| Pi | models.json and settings.json |
| Cursor | argv.json, cli-config.json or ide_state.json |
If none of these match, the folder name is used as a hint (~/.codexWork is Codex, ~/.claude-alt is Claude Code). A path that still cannot be recognized is skipped with a warning. The same folder listed twice (for example claude and ~/.claude) is processed once.
Usage
Run it by hand any time:
skills-autoupdate
Example output:
2026-11-21 18:54:11 [claude] ship: updated 9b9dec0a1f -> 0.2.0
2026-11-21 18:54:11 [claude] settle: up to date at be3f9d3
2026-11-21 18:54:12 [codex] ship: cloned https://git.bjphoster.com/skills/ship
2026-11-21 18:54:12 [codex] ship: at 0.2.0
2026-11-21 18:54:12 WARN [cursor] settle: local changes present, skipped
2026-11-21 18:54:12 finished
Different files can be used for a single run:
SKILLS_FILE=./skills HARNESSES_FILE=./harnesses skills-autoupdate
Only one run at a time is allowed (a lock in ~/.cache/skills-autoupdate.lock): if cron starts a new run while the previous one is still going, the new one exits right away.
Private repositories
Cron has no terminal, so git cannot ask for a password: the script disables every prompt and fails the clone or fetch instead of hanging. For private repositories set up non-interactive access first, for example:
- HTTPS with
git config --global credential.helper storeand one manual clone to save the credentials, or - SSH keys without a passphrase (or with an agent reachable from cron) and SSH URLs in
~/.config/skills.
What it will and will not do
It only writes inside <harness folder>/skills/<skill name> for the skills you listed, plus the lock file and the mirrors in ~/.cache/skills-autoupdate. It does not remove skills you delete from the list, does not touch skills it did not install, never resets or discards local changes, and never pushes.
Requirements
- Bash 4 or newer, git, and
cron(or any scheduler) for automatic runs. flock(from util-linux) is used when available to avoid overlapping runs.
Files
skills-autoupdate: the update script.install.sh: installs the script, the example config files and the crontab entry.examples/: commented examples of~/.config/skillsand~/.config/harnesses.
License
MIT, see LICENSE.