Skip to content

feat: unify AI extension management#83

Merged
CollieIsCute merged 2 commits into
masterfrom
feat/unify-ai-extensions
Jul 12, 2026
Merged

feat: unify AI extension management#83
CollieIsCute merged 2 commits into
masterfrom
feat/unify-ai-extensions

Conversation

@CollieIsCute

Copy link
Copy Markdown
Owner

Summary

  • add a single chezmoi inventory for Claude Code, Codex, and OpenCode skills, marketplaces, and plugins
  • install and update native plugins on each AI extensions: Synchronizing Claude Code plugins
    Updating marketplace: superclaude...Refreshing marketplace cache (timeout: 120s)…
    ✔ Successfully updated marketplace: superclaude
    Updating marketplace: superpowers-marketplace...Refreshing marketplace cache (timeout: 120s)…
    ✔ Successfully updated marketplace: superpowers-marketplace
    Updating marketplace: ponytail...Refreshing marketplace cache (timeout: 120s)…
    ✔ Successfully updated marketplace: ponytail
    Checking for updates for plugin "superpowers@superpowers-marketplace" at user scope…
    ✔ superpowers is already at the latest version (6.1.1).
    Checking for updates for plugin "ponytail@ponytail" at user scope…
    ✔ ponytail is already at the latest version (4.8.4).
    AI extensions: Synchronizing Codex plugins
    {
    "selectedMarketplaces": [
    "ponytail"
    ],
    "upgradedRoots": [],
    "errors": []
    }
    {
    "pluginId": "ponytail@ponytail",
    "name": "ponytail",
    "marketplaceName": "ponytail",
    "version": "4.8.4",
    "installedPath": "/home/collie/.codex/plugins/cache/ponytail/ponytail/4.8.4",
    "authPolicy": "ON_INSTALL"
    }
    AI extensions: Updating skill collection addyosmani-agent-skills
    Already up to date., while keeping unlisted local extensions intact
  • install Ponytail across all three CLIs and synchronize shared user skills

Verification

  • diff --git a/.chezmoiscripts/5-sync-ai-extensions.sh b/.chezmoiscripts/5-sync-ai-extensions.sh
    new file mode 100755
    index 0000000000000000000000000000000000000000..04e3087d8f90ef2d4e84e63fd5a7317a397fc02a
    --- /dev/null
    +++ b/.chezmoiscripts/5-sync-ai-extensions.sh
    @@ -0,0 +1,101 @@
    +#!/usr/bin/env bash
    +set -euo pipefail

+info() {

  • printf 'AI extensions: %s\n' "$*"
    +}

+skill_destination() {

  • case "$1" in
  • claude) printf '%s\n' "$HOME/.claude/skills" ;;
  • codex) printf '%s\n' "$HOME/.agents/skills" ;;
  • opencode) printf '%s\n' "$HOME/.config/opencode/skills" ;;
  • *)
  •  printf 'Unknown AI skill host: %s\n' "$1" >&2
    
  •  return 1
    
  •  ;;
    
  • esac
    +}

+sync_skill_collection() {

  • local source="$1"
  • local path="$2"
  • shift 2
  • if [[ ! -d "$source/$path" ]]; then
  • printf 'AI skill source is missing: %s\n' "$source/$path" >&2
  • return 1
  • fi
  • local host destination skill
  • for host in "$@"; do
  • destination="$(skill_destination "$host")"
  • mkdir -p "$destination"
  • for skill in "$source/$path"/*; do
  •  [[ -d "$skill" ]] || continue
    
  •  cp -a "$skill" "$destination/"
    
  • done
  • done
    +}

+sync_git_skill_collection() {

  • local id="$1"
  • local source="$2"
  • local path="$3"
  • shift 3
  • local checkout="$HOME/.local/share/chezmoi-ai/sources/$id"
  • mkdir -p "$(dirname "$checkout")"
  • if [[ ! -d "$checkout/.git" ]]; then
  • info "Cloning skill collection $id"
  • git clone --depth=1 "$source" "$checkout"
  • elif git -C "$checkout" diff --quiet && git -C "$checkout" diff --cached --quiet; then
  • info "Updating skill collection $id"
  • git -C "$checkout" pull --ff-only
  • else
  • info "Keeping locally modified skill collection $id"
  • fi
  • sync_skill_collection "$checkout" "$path" "$@"
    +}

+if command -v claude >/dev/null 2>&1; then

  • info "Synchronizing Claude Code plugins"
  • if ! claude plugin marketplace list --json | grep -Fq '"name": "superclaude"'; then
  • claude plugin marketplace add "SuperClaude-Org/SuperClaude_Plugin" --scope user
  • fi
  • claude plugin marketplace update "superclaude"
  • if ! claude plugin marketplace list --json | grep -Fq '"name": "superpowers-marketplace"'; then
  • claude plugin marketplace add "obra/superpowers-marketplace" --scope user
  • fi
  • claude plugin marketplace update "superpowers-marketplace"
  • if ! claude plugin marketplace list --json | grep -Fq '"name": "ponytail"'; then
  • claude plugin marketplace add "DietrichGebert/ponytail" --scope user
  • fi
  • claude plugin marketplace update "ponytail"
  • if claude plugin list --json | grep -Fq '"id": "superpowers@superpowers-marketplace"'; then
  • claude plugin update "superpowers@superpowers-marketplace" --scope user
  • else
  • claude plugin install "superpowers@superpowers-marketplace" --scope user
  • fi
  • if claude plugin list --json | grep -Fq '"id": "ponytail@ponytail"'; then
  • claude plugin update "ponytail@ponytail" --scope user
  • else
  • claude plugin install "ponytail@ponytail" --scope user
  • fi
    +else
  • info "Claude Code is not installed; skipping"
    +fi

+if command -v codex >/dev/null 2>&1; then

  • info "Synchronizing Codex plugins"
  • if ! codex plugin marketplace list --json | grep -Fq '"name": "ponytail"'; then
  • codex plugin marketplace add "DietrichGebert/ponytail" --json
  • fi
  • codex plugin marketplace upgrade "ponytail" --json
  • codex plugin add "ponytail@ponytail" --json
    +else
  • info "Codex is not installed; skipping"
    +fi
    +sync_git_skill_collection "addyosmani-agent-skills" "https://github.com/addyosmani/agent-skills.git" "skills" "claude" "codex" "opencode"
    +sync_skill_collection "$HOME/.local/share/ai-skills" "." "claude" "codex" "opencode"
    AI extensions: Synchronizing Claude Code plugins
    Updating marketplace: superclaude...Refreshing marketplace cache (timeout: 120s)…
    ✔ Successfully updated marketplace: superclaude
    Updating marketplace: superpowers-marketplace...Refreshing marketplace cache (timeout: 120s)…
    ✔ Successfully updated marketplace: superpowers-marketplace
    Updating marketplace: ponytail...Refreshing marketplace cache (timeout: 120s)…
    ✔ Successfully updated marketplace: ponytail
    Checking for updates for plugin "superpowers@superpowers-marketplace" at user scope…
    ✔ superpowers is already at the latest version (6.1.1).
    Checking for updates for plugin "ponytail@ponytail" at user scope…
    ✔ ponytail is already at the latest version (4.8.4).
    AI extensions: Synchronizing Codex plugins
    {
    "selectedMarketplaces": [
    "ponytail"
    ],
    "upgradedRoots": [],
    "errors": []
    }
    {
    "pluginId": "ponytail@ponytail",
    "name": "ponytail",
    "marketplaceName": "ponytail",
    "version": "4.8.4",
    "installedPath": "/home/collie/.codex/plugins/cache/ponytail/ponytail/4.8.4",
    "authPolicy": "ON_INSTALL"
    }
    AI extensions: Updating skill collection addyosmani-agent-skills
    Already up to date.
  • rendered Claude/OpenCode JSON validated with
  • rendered synchronization script validated with
  • verified Claude Code and Codex plugin inventories
  • verified OpenCode resolves the Ponytail plugin

@CollieIsCute
CollieIsCute merged commit 6ceb25b into master Jul 12, 2026
4 checks passed
@CollieIsCute
CollieIsCute deleted the feat/unify-ai-extensions branch July 12, 2026 21:26
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