From aios
Non-destructive update for an installed AI-OS. Pulls new skills, hooks, and templates from the current plugin version into the user's `.claude/` directory without ever touching the brain folders (memory, learning, MEMORY.md, etc.). Use after the user upgrades the plugin (`npm update @aios/plugin` or plugin marketplace auto-update) to sync their local AI-OS with the new plugin version. Handles added skills, changed core skills, removed skills, new hooks, and template changes. Prompts before overwriting any file the user has modified.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aios:aios-updateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Sync an installed AI-OS with the current plugin version. This is the mechanism that makes the subscription model honest — users keep getting new skills and hook improvements without ever losing their data or their customizations.
Sync an installed AI-OS with the current plugin version. This is the mechanism that makes the subscription model honest — users keep getting new skills and hook improvements without ever losing their data or their customizations.
The rule that governs every step: the brain belongs to the user. The plugin owns .claude/skills/, .claude/hooks/, .claude/settings.json (hook entries only), and the plugin-shipped templates. Everything else — memory/, learning/ content, MEMORY.md, projects/, knowledge/, voice/, system/context/, risks.md — is user data and must never be touched by an update.
Invoke this skill whenever any of the following apply:
npm update @aios/plugin and wants to apply the changes to their installed AI-OSDo not invoke on a fresh install — use /aios-start instead. Update only runs against an existing AI-OS (presence of aios.config.json or CLAUDE.md at the root).
The caller may provide:
diff (default, read-only report), apply (execute the update with a confirmation per conflict), or apply-all (execute non-interactively — used only when the user explicitly wants to skip the per-conflict prompt)all (default), or a specific area: skills, hooks, templates, settings--only morning-briefing,reflect)$CLAUDE_PLUGIN_ROOT if set, otherwise walk up from this skill file to find the plugin/ directory.$CLAUDE_PROJECT_DIR. Confirm presence of aios.config.json or a CLAUDE.md with the expected structure. If neither is present, refuse — this is not an installed AI-OS.Read aios.config.json from the user tree and plugin/.claude-plugin/plugin.json from the plugin tree. Report the upgrade path ("upgrading from 0.1.0 → 0.2.0"). If the installed version is newer than the plugin, stop and flag — the user has an incompatible state, likely from using a pre-release.
For each directory under plugin/skills/:
.claude/skills/. Action: install.overwrite / keep-user / keep-both (user copy renamed to <skill>.local.md for inspection)..claude/skills/archive/.Track the "last-known-shipped version" by hashing the skill file at install or last update. Store the hash map in .claude/skills/.shipped-hashes.json. On first update run after installing a version that predated this hash tracking, treat every present file as "unknown baseline" and always prompt (never auto-overwrite).
Optional skills (those under plugin/skills/optional/) are only considered if the user's aios.config.json integrations list matches the skill's requires metadata. Do not install an optional skill that the user did not opt into.
Same categories as skills, applied to .sh files. Hooks changing is more sensitive than skills — a broken hook can fail every session. After every write, run bash -n <file> to syntax-check before leaving. If syntax fails, revert and stop.
Read .claude/settings.json and plugin/settings.template.json. Only compare the plugin's own hook entries — do not touch user-added hooks, permissions, env vars, or any other settings.
For each hook event the plugin defines:
overwrite only if the command clearly points at the same script name (e.g. both reference session-start.sh).Templates are only relevant if the user requests a template refresh (usually they do not — templates are a one-time boot artifact). When requested:
CLAUDE.md, MEMORY.md, etc. are their own once installed.For mode=diff the output is:
# AI-OS Update — {plugin-version} → {plugin-version}
## Summary
<counts: added X, updated Y, conflicts Z, removed (flagged) W>
## Skills
<per-skill line with action>
## Hooks
<per-hook line with action>
## Settings
<hook-event lines with action>
## Templates
<only if scope included templates>
## Conflicts requiring your decision
<numbered list, each with a diff preview>
## Safe actions
<list of no-ops and auto-applicable changes>
If every change is non-conflicting, offer to proceed by re-running with mode=apply. If there are conflicts, present them one at a time.
In mode=apply, process each item in this order:
keep-user for skills, prompt for each for hooks, leave-as-is for settings)..claude/skills/archive/{skill}-YYYY-MM-DD/ if the user accepts archival, or leave in place.After every file write, update the shipped-hash map. At the end, update aios.config.json with the new version and lastUpdatedAt timestamp.
Write an update log entry to .claude/update-log/YYYY-MM-DD-HHMMSS.md with:
---
type: aios-update
from_version: <x>
to_version: <y>
created: YYYY-MM-DDTHH:MM:SSZ
tags: [update, meta]
---
Body lists each action with the outcome.
If any step fails (syntax error in a hook, file write error, etc.), restore the entire update to pre-run state from a staging copy. Do not leave a partial update. The staging copy lives in .claude/.update-staging/, created at the start and removed on success.
If rollback itself fails for some reason, leave the staging copy in place and instruct the user to restore manually with mv .claude/.update-staging/* .claude/.
To make this rule unmissable — the update MUST NOT touch any of the following:
memory/ (anything inside)learning/corrections.md, learning/patterns.md, learning/skill-feedback/, learning/tool-errors.logMEMORY.md, risks.md, CLAUDE.md (the user's root instructions)knowledge/, projects/, blueprints/, voice/, system/context/, archive/aios-owned: userIf the plugin ever ships a file with a name that would land inside one of these directories, stop and flag. That is a plugin packaging bug, not an update action.
plugin.json version matches the aios.config.json version, there is nothing to do — say so and exit.session-start.sh will surface it in its banner — no explicit action from this skill.signal-calibration is one of the updated skills and the keyword mapping changed, flag this in the update log so the user knows to recalibrate.nightly-consolidation reads from the brain folders only and is unaffected by plugin updates (but the skill itself may be updated — the file, not the data it processes).plugin/scripts/migrate-<from>-<to>.sh which this skill invokes after the file sync.npx claudepluginhub ludwigawra/aios --plugin aiosGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.