mcp-config: sync shared opencode skills from the repo

Models and MCP servers are discovered from the LiteLLM gateway at sync time
(/v1/models, and the aggregate /mcp/ endpoint). Skills have no gateway side to
query: LiteLLM's /v1/skills is a passthrough to Anthropic's Skills API, which
lists skills on an Anthropic account rather than serving skill files, and
/public/skill_hub is a marketplace catalog. So the repo is the source of truth
and the tree is fetched whole, from the repo tarball.

Deploy to ~/.config/mcp-sync/skills rather than ~/.config/opencode/skills so
the atomic replace can never delete a skill the user wrote by hand; opencode
picks the tree up via skills.paths, which expands {env:HOME} — verified — so
the shared config stays identical for every user.

Same throttle and non-fatal discipline as the config sync: a fetch that yields
no skills/ leaves the last-good tree in place instead of emptying it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-12 12:26:17 -04:00
co-authored by Claude Opus 4.8
parent c0df3a1596
commit c0d67f023a
5 changed files with 164 additions and 10 deletions
+15
View File
@@ -15,11 +15,26 @@
# ~/.config/mcp-sync/key — run mcp-config/install.sh once instead of
# setting it here. Only set it here on a box without mcp-sync:
# export LITELLM_KEY=sk-...
#
# To develop mcp-config/ or skills/ against a working checkout instead of
# Gitea's main, point the sync at it and source it directly:
# MCP_SYNC_RAW_URL="file://$HOME/source/dotfiles/mcp-config/opencode.gateway.json"
# MCP_SYNC_SKILLS_SRC="$HOME/source/dotfiles/skills"
# . "$HOME/source/dotfiles/mcp-config/sync.sh"
# --- 1Password CLI -------------------------------------------------------
# Service-account token for non-interactive `op read` / `op run`.
# export OP_SERVICE_ACCOUNT_TOKEN=ops_...
# --- Proxmox MCP gateway (ai-k8s-iac) ------------------------------------
# Credentials for the Proxmox MCP server registered on the covert-gpt
# LiteLLM gateway. `task up` in ai-k8s-iac reads these env vars and stores
# them in the inference-mcp Secret; they are never committed.
# export PROXMOX_MCP_HOST="https://pve.local:8006"
# export PROXMOX_MCP_TOKEN_ID="root@pam!terragrunt-proxmox"
# export PROXMOX_MCP_TOKEN_SECRET="00000000-0000-0000-0000-000000000000"
# export PROXMOX_MCP_INSECURE_TLS="true"
# --- Anything else -------------------------------------------------------
# Aliases, PATH additions, kubeconfig defaults, etc. This file loads last,
# so it can override anything the managed zshrc sets.