Skip to content

Add update-skill --hook for automatic agent-toolkit skill updates - #10797

Open
luigi617 wants to merge 7 commits into
automatic-skill-update-safe-updatefrom
automatic-skill-update-command
Open

luigi617 wants to merge 7 commits into
automatic-skill-update-safe-updatefrom
automatic-skill-update-command

Conversation

@luigi617

@luigi617 luigi617 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:

Adds aws agent-toolkit update-skill --hook <agent>, the command an agent's session start hook runs to keep AWS skills up to date automatically. Installing the hooks into agent configs comes in a follow-up PR.

When automatic updates are turned on, a hook run:

  • Updates installed AWS skills in every detected agent.
  • Installs new aws-core skills into skills directories that already have toolkit-installed skills. Directories the toolkit didn't create are left alone.
  • Checks each skills directory at most once every 24 hours, or 1 hour after a failed check. Directories are tracked separately in state.json by real path for project-level skill.
  • Leaves installed skills that are no longer in the catalog untouched, without reporting them.
  • Prints a short summary in the format each agent expects (Claude Code, Gemini CLI, Codex, Cursor, Kiro), and nothing if nothing changed.

Other changes:

  • Gemini CLI paths resolve against GEMINI_CLI_HOME when it's set.
  • Fetching the list of aws-core skills is moved into a shared list_core_skills helper, also used by configure agent-toolkit.

Intentional design:

  • A core skill removed with remove-skill is installed again at the next check.
  • Updates replace the whole skill directory, so edits to a toolkit-installed skill are overwritten.

Testing:

  • Added unit tests for hook output per agent, the check interval and retry, per-directory results, skills dropped from the catalog, new core skill installs, lock handling, and GEMINI_CLI_HOME paths.
  • Tested manually on Linux, macOS and Windows.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Runs as an agent's session start hook: updates installed AWS skills,
installs new aws-core skills into agents that already have AWS skills,
prints what the agent expects, records the run and always succeeds. Hook
runs take turns and skip a run right after another for the same agent.

Installing the hooks into agent configs comes separately.
@luigi617
luigi617 added this pull request to stack #10785 October 22, 2026 04:44
Luigi Liu added 2 commits October 22, 2026 04:49
Record hook runs by agent id instead of the path of the agent's hook file,
so this command does not need to know where hooks are installed. Removes
hook_config_path and is_hook_supported from hooks.py, leaving the agent
ids and the output formatting the hook run uses.
Reverts 00c606b. last_hook_run stays keyed by the path of the agent's
hook config, as defined in automatic-skill-update-safe-update, so separate
config directories of one agent keep separate records. hook_config_path
only locates that file; it does not install or manage hooks.
@luigi617
luigi617 force-pushed the automatic-skill-update-command branch from 602b142 to 9edc7b9 Compare October 22, 2026 14:40
@luigi617
luigi617 force-pushed the automatic-skill-update-command branch from 76ca45c to e3e93d0 Compare October 22, 2026 17:20
@luigi617
luigi617 marked this pull request as ready for review October 22, 2026 17:50
@luigi617
luigi617 requested a review from a team as a code owner October 22, 2026 17:50

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant