# .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: 1. Reads the harnesses from `~/.config/harnesses` and finds the config folder of each one, by name or by looking inside the path you gave. 2. Reads the skills from `~/.config/skills`. 3. For every harness and every skill, works in `/skills/`: - 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. 4. 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 ```sh git clone https://git.bjphoster.com/skills/.autoupdate.git cd .autoupdate ./install.sh ``` The installer: - copies `skills-autoupdate` to `~/.local/bin/`; - creates `~/.config/skills` and `~/.config/harnesses` from 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` ``` [] ``` | 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. To go back from a pinned version to following the branch, just remove the operator and the version. ### `~/.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 `/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: ```sh 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: ```sh 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 store` and 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 `/skills/` for the skills you listed, plus the lock file. It does not remove skills you delete from the list, does not touch skills it did not clone, 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/skills` and `~/.config/harnesses`. ## License MIT, see [LICENSE](LICENSE).