[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AD0G02236V1Y8448P6BBMP":3,"skill-same:01M6AD0G02236V1Y8448P6BBMP":92},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":53,"linkOnly":54,"markdownContent":55,"markdownBody":56,"frontMatter":57,"refName":64,"commitSha":65,"skillDirectory":66,"forksCount":67,"repositoryHtmlUrl":68,"repositoryHomepageUrl":69,"ownerHtmlUrl":70,"ownerBlogUrl":71,"ownerDescription":17,"updatedAt":72,"install":73,"resources":86},"01M6AD0G02236V1Y8448P6BBMP","shared-config-sync","Claude 共享配置同步","Commit and push the user's shared Claude config to the `~\u002F.claude-config` sync repo, rebasing first so a push never buries work from another machine. Bootstraps the repo when it is missing. Never force-pushes, never rewrites pushed history, never creates a public remote, and touches nothing outside `~\u002F.claude-config\u002F`.","将用户的共享 Claude 配置提交并推送到 `~\u002F.claude-config` 同步仓库，先进行 rebase，以确保推送不会覆盖另一台机器上的工作。仓库缺失时自动引导初始化。绝不 force-push，绝不重写已推送的历史，绝不创建公开远程仓库，且只触碰 `~\u002F.claude-config\u002F` 内的内容。","apache\u002Fmagpie","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACRKRED1THWRMNQ1E2RYE7",146,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-setup\u002Fskills\u002Fshared-config-sync\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],"sync","config","shared config sync","shared","config sync","when","commit","synced","capability","remote","host","fresh","drift","sync repo","never","work","commit and push","Meta","intake","push","update","setup","2026-11-10 10:12:30",false,"---\n# SPDX-License-Identifier: Apache-2.0\n# https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\nname: shared-config-sync\nfamily: setup\nmode: Meta\ndescription: >-\n  Commit and push the user's shared Claude config to the\n  `~\u002F.claude-config` sync repo, rebasing first so a push never buries\n  work from another machine. Bootstraps the repo when it is missing.\n  Never force-pushes, never rewrites pushed history, never creates a\n  public remote, and touches nothing outside `~\u002F.claude-config\u002F`.\nwhen_to_use: >-\n  When the user wants their shared Claude config synced, or has just\n  edited something under `~\u002F.claude-config\u002F`. Also on a fresh host with\n  no such repo yet, and after `setup-isolated-setup-update` finds drift\n  on a script they keep there.\ncapability:\n  - capability:intake\n  - capability:platform\nsurface_hash: sha256:bc445ef323563cd8\nlicense: Apache-2.0\nmeasured_tokens: 3767\n---\n\n\u003C!-- Placeholder convention (see AGENTS.md#placeholder-convention-used-in-skill-files):\n     \u003Cproject-config> → per file: the personal layer, else `.apache-magpie-overrides\u002F` -->\n\n# setup-shared-config-sync\n\nThis skill pushes local edits in `~\u002F.claude-config\u002F` to the sync repo's remote, so other machines can pull them.\nIt is the counterpart to the periodic `git pull --rebase --autostash` that the framework's example `sync.sh` runs on a timer: that pulls *upstream* into the local clone; this skill pushes *local* changes upstream.\n\n## Adopter overrides\n\n\u003C!-- BEGIN MAGPIE BLOCK: adopter-overrides — generated from tools\u002Fdev\u002Fblocks\u002Fadopter-overrides.md -->\n\nBefore running its default behaviour, this skill consults\n`setup-shared-config-sync.md` in the personal layer\n(`.apache-magpie-local\u002F` when the project adopted Magpie, falling back to the main checkout's in a linked worktree,\nor `\u003Cgit-common-dir>\u002Fapache-magpie\u002F` when Magpie is only installed; applied first, wins on conflict) and\n[`.apache-magpie-overrides\u002Fsetup-shared-config-sync.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md) (committed, project-wide)\nin the adopter repo, if present, and applies any agent-readable overrides it finds.\nSee [`docs\u002Fsetup\u002Fagentic-overrides.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md) for the contract.\n\n**Hard rule**: agents NEVER modify the snapshot under `\u003Cadopter-repo>\u002F.apache-magpie\u002F`.\nLocal modifications go in the override file; framework changes go via PR to `apache\u002Fmagpie`.\n\n\u003C!-- END MAGPIE BLOCK: adopter-overrides -->\n\n---\n## Hardcoded path\n\nThe sync repo lives at `~\u002F.claude-config\u002F`, the convention documented in\n[`docs\u002Fsetup\u002Fsecure-agent-setup.md` → Syncing user-scope config across machines](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fsecure-agent-setup.md#syncing-user-scope-config-across-machines).\nThe path is intentionally not parameterised: the doc names one canonical location, so adopters with a sync repo elsewhere fork this skill.\n\n## The default remote\n\nWhen the skill has to **bootstrap** a missing `~\u002F.claude-config\u002F`\n(see [Bootstrapping a missing `~\u002F.claude-config\u002F`](#bootstrapping-a-missing-claude-config)),\nit resolves the remote to clone or create in this order:\n\n1. **An explicit URL the user passed this invocation** (e.g. *\"bootstrap from `git@gitlab.com:me\u002Fclaude-config.git`\"*) wins over everything.\n2. **The default GitHub convention**: `git@github.com:\u003Chandle>\u002Fclaude-config.git`, the SSH form the doc's\n   [Setting up a fresh host](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fsecure-agent-setup.md#setting-up-a-fresh-host)\n   snippet uses.\n   `\u003Chandle>` comes from `gh api user --jq .login` (requires an authenticated `gh`).\n   The repo name is `claude-config`.\n\nIf neither resolves (`gh` is missing or unauthenticated **and** the user gave no URL), ask the user for the remote URL rather than guessing.\nAny remote the skill *creates* is **private** (see the golden rules); never public.\n\n## Golden rules\n\n- **Never force-push.** No `--force`, no `--force-with-lease`, no `--no-verify`, no rewriting commits already pushed to the remote.\n  The sync repo is the source of truth between machines; rewriting its history can lose work from a machine that has not been pulled here yet.\n- **Never modify a file outside `~\u002F.claude-config\u002F`.**\n  If the user's intended change is to a file in `~\u002F.claude\u002F` directly (not via a symlink into `~\u002F.claude-config\u002F`), surface that and stop; they need a different action, not this skill.\n  The **one** exception is the fresh-host symlink wiring during bootstrap (`ln -sfn ~\u002F.claude-config\u002F... ~\u002F.claude\u002F...`), and only after the user confirms it; see\n  [Bootstrapping a missing `~\u002F.claude-config\u002F`](#bootstrapping-a-missing-claude-config).\n- **Any remote the skill creates is private.** When bootstrap creates a new remote (`gh repo create`), it always passes `--private`: never public, never `--internal` unless the user asks.\n  `~\u002F.claude\u002FCLAUDE.md` carries personal collaboration preferences and the scripts may reference internal paths; a public config repo leaks both.\n  This mirrors the doc's *\"a **private** git repository (private, not public …)\"* rule.\n- **Confirm before creating or pushing to a new remote.** Creating a GitHub repo and pushing the first commit is outward-facing and hard to reverse.\n  Bootstrap shows the exact plan (repo name, `--private` visibility, remote URL, the files it will scaffold) and waits for explicit approval before running `gh repo create` or the initial `git push`.\n  **Cloning** an existing remote is lower-risk (it writes only into the new `~\u002F.claude-config\u002F` checkout) and may proceed without a separate confirmation, though the skill still reports what it cloned.\n- **Never clobber a non-repo `~\u002F.claude-config\u002F`.** If the path exists but is not a git working tree, stop and surface it; do not `rm` it or `git init` over it.\n  Bootstrap only ever *creates* a `~\u002F.claude-config\u002F` that was entirely absent.\n- **Pull-with-rebase first.** If `git fetch` shows the local checkout is behind the remote, run `git pull --rebase --autostash` *before* the commit + push.\n  Concurrent work from another machine takes precedence; the local commit lands on top, as the example `sync.sh` does for the periodic pull.\n- **Draft the commit message; never auto-send.** For every uncommitted change, draft a one-line commit subject (plus a 2–4 line body if the change merits it) and show it to the user.\n  The user replies *\"go\"* \u002F *\"yes\"* \u002F edits \u002F *\"split into two commits\"* etc. before any `git commit` runs.\n- **Use the resolved attribution trailer, added with `--trailer`.** Agent-authored commits carry the trailer the user's commit-attribution convention names, resolved per [`commit-attribution.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fcommit-attribution.md) (the sync repo has no project file, so the user's choice applies, else `Generated-by: \u003Cagent> (\u003Cmodel>)`), where `\u003Cagent>` and `\u003Cmodel>` are the agent and model you are actually running as (e.g. `Claude (Opus 4.8)`, `OpenCode (Big Pickle)`). Add it with `git commit --trailer`, never in the message body.\n  Do not hardcode either, and never use `Co-Authored-By:`.\n  Canonical wording: [AGENTS.md → Commit and PR conventions](..\u002F..\u002F..\u002F..\u002FAGENTS.md#commit-and-pr-conventions).\n- **Stop on lock conflict.** The example `sync.sh` uses `flock --nonblock` on `~\u002F.claude-config\u002F.sync.lock` so two sync runs do not race.\n  If `.sync.lock` is held, do not steal the lock; surface the conflict and stop.\n  The other process is likely the user's recurring sync timer.\n\n## Bootstrapping a missing `~\u002F.claude-config\u002F`\n\nReached from [Walk-through step 1](#walk-through) when the sync repo is **entirely absent**.\nThe goal is a working `~\u002F.claude-config\u002F` git checkout wired to a private remote, by cloning the default remote if it exists or creating it if not.\nThe skill touches nothing outside the new checkout except the confirmed fresh-host symlink wiring at the end.\n\n### Step B1 — resolve the remote\n\nResolve the remote per [The default remote](#the-default-remote): an explicit URL the user passed, else `git@github.com:\u003Chandle>\u002Fclaude-config.git` with `\u003Chandle>` from `gh api user --jq .login`.\nIf neither resolves (`gh` missing\u002Funauthenticated **and** no URL given), ask the user for the remote URL and stop until they provide one; do not guess a handle.\n\n### Step B2 — does the remote exist?\n\n- **GitHub default:** `gh repo view \u003Chandle>\u002Fclaude-config`: exit `0` ⇒ exists, non-zero ⇒ does not exist.\n  If the error is auth\u002Fpermission rather than \"not found\", surface it and stop rather than assuming absence.\n- **Explicit non-GitHub URL:** `git ls-remote \u003Curl>`: exit `0` ⇒ exists, non-zero ⇒ does not exist \u002F unreachable.\n\n### Step B3a — remote exists → clone\n\n`git clone \u003Curl> ~\u002F.claude-config`.\nThis low-risk path (it writes only the new checkout) may proceed without a separate create-confirmation; report the clone result.\nThen continue to [Step B4 — fresh-host symlink wiring](#step-b4--fresh-host-symlink-wiring) and resume the sync walk-through from step 2 (typically *\"in sync, nothing to do\"*).\n\n### Step B3b — remote does not exist → create + scaffold + push\n\nCreating an outward-facing remote is confirm-first (golden rule).\n**Show the full plan and wait for explicit approval**: the repo name, `--private` visibility, the remote URL, and the files to be scaffolded.\nOn approval:\n\n1. **Create the private remote.**\n   - GitHub: `gh repo create \u003Chandle>\u002Fclaude-config --private --description \"Personal Claude Code shared config (synced across machines)\"`\n     (no `--clone`, no auto-init; the local scaffold below becomes the first commit).\n   - Non-GitHub explicit URL: the skill cannot create the remote; tell the user to create an **empty private** repo at that URL and re-invoke.\n2. **Init + scaffold the minimal layout** under `~\u002F.claude-config\u002F`, matching the doc's\n   [Layout](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fsecure-agent-setup.md#layout) and\n   [A minimal `sync.sh`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fsecure-agent-setup.md#a-minimal-syncsh):\n\n   ```text\n   git init -b main ~\u002F.claude-config\n   ~\u002F.claude-config\u002F\n   ├── README.md      # what's in the repo + per-machine install steps\n   ├── sync.sh        # the pull\u002Fcommit\u002Fpush helper (chmod +x)\n   ├── scripts\u002F       # (empty; hooks land here as the user adopts them)\n   └── .gitignore     # excludes .sync.lock and any *.credentials* \u002F secrets\n   ```\n\n   `sync.sh` is the verbatim script from the doc's\n   [A minimal `sync.sh`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fsecure-agent-setup.md#a-minimal-syncsh)\n   section.\n   `.gitignore` must at minimum carry `.sync.lock` (the `flock` file) so the lock is never committed.\n3. **Initial commit + push.** `git add` the scaffolded files individually (never `git add -A`; see [Walk-through](#walk-through) step 5), commit with the resolved attribution trailer (via `--trailer`), `git remote add origin \u003Curl>`, then `git push -u origin main`.\n\n### Step B4 — fresh-host symlink wiring\n\nThe new (or freshly cloned) checkout only *protects* this host once its tracked artifacts are symlinked into `~\u002F.claude\u002F`.\nThis is the **one** write outside `~\u002F.claude-config\u002F` the skill performs, and only after the user confirms.\nOffer to run the\n[Setting up a fresh host](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fsecure-agent-setup.md#setting-up-a-fresh-host)\nwiring (the `ln -sfn ~\u002F.claude-config\u002F… ~\u002F.claude\u002F…` block, which `mv`s any pre-existing real file to `.bak` before symlinking).\nIf the user declines, point them at that doc section.\nWire only the artifacts the checkout contains; on a brand-new scaffold `scripts\u002F` may be empty, so this step is often a no-op beyond `CLAUDE.md`.\n\n## Walk-through\n\n1. **`cd ~\u002F.claude-config`** and verify it is a git working tree pointing at a private remote.\n   - If the directory **does not exist** at all, do not stop — **bootstrap** it: jump to\n     [Bootstrapping a missing `~\u002F.claude-config\u002F`](#bootstrapping-a-missing-claude-config),\n     then resume the sync walk-through from step 2.\n   - If the directory **exists but is not a git repo**, surface that and stop (per the golden rule — never clobber a non-repo path).\n     The user has a stray `~\u002F.claude-config\u002F`; they resolve it, then re-invoke.\n   - If it is a git repo, continue to step 2.\n\n2. **`git fetch origin`** to learn the remote's current state.\n   Report:\n   - commits behind upstream (will be pulled in step 4),\n   - commits ahead of upstream (committed local work not yet pushed),\n   - uncommitted working-tree modifications (`git status --short`),\n   - untracked files the user may want to either add or `.gitignore`.\n\n3. **Decide the action.** The four reachable states:\n   - **In sync, nothing to do.** No uncommitted changes, no unpushed commits, not behind.\n     Report and stop.\n   - **Push-only.** Committed local work needs to land on the remote, but not behind and no uncommitted edits.\n     Pull-with-rebase is unnecessary; go straight to push.\n   - **Commit-then-push.** Uncommitted edits exist.\n     Walk each modified file with the user (diff + draft commit message + approval), commit each batch the user accepts, then push.\n   - **Pull-then-commit-then-push.** Uncommitted edits *and* behind upstream.\n     Run `git pull --rebase --autostash` first; if rebase succeeds cleanly, proceed to the commit-then-push flow.\n     If rebase conflicts, stop and surface — conflicts in `~\u002F.claude-config\u002F` are the user's to resolve, not the skill's.\n\n4. **Pull-with-rebase (when applicable).** Run `git pull --rebase --autostash`.\n   Report what changed (commits pulled, files touched).\n\n5. **Stage + commit (when applicable).** For each modification the user approves:\n   - `git add \u003Cfile>` for the specific file (never `git add -A` or `git add .` — the sync repo is the user's most personal directory and `git add -A` risks staging an editor swap file or a `.DS_Store` you forgot to gitignore),\n   - `git commit -m '\u003Csubject>' -m '\u003Cbody>' --trailer '\u003Ctrailer>'` with the approved message.\n     `\u003Ctrailer>` is the resolved attribution trailer (see the golden rule above) — the actual agent and model you are running as, not a hardcoded value; omit `--trailer` when the convention is `none`.\n\n   Probe the gpg-agent cache first when `commit.gpgsign` is true: a token-backed key with a cold cache stalls this commit until `gpg: signing failed: Timeout`.\n   Surface a dialogue, or hand the user the command — see\n   [`AGENTS.md` → *Commit and PR conventions*](..\u002F..\u002F..\u002F..\u002FAGENTS.md#commit-and-pr-conventions).\n\n6. **Push.** `git push` to the upstream branch. No `--force`.\n   A rejected (non-fast-forward) push means another machine pushed after our `git fetch` in step 2; stop, surface, and recommend re-invoking the skill (which repeats the fetch + pull-with-rebase).\n   Do not retry in-flight.\n\n## After the push lands\n\nReport:\n- which commit SHA is now on the remote,\n- a one-line summary of what was pushed (so the user can confirm in their terminal scrollback),\n- whether other-machine pulls are needed (the timer-driven `sync.sh` on the user's other hosts picks the change up on its next run; do not nag about this).\n\nIf the changes touched a file under `~\u002F.claude-config\u002Fscripts\u002F` that is symlinked from `~\u002F.claude\u002Fscripts\u002F`, also note that the change is *immediately* live on this host, since the symlink resolves to the modified file.\nNo re-`cp` needed.\n","\u003C!-- Placeholder convention (see AGENTS.md#placeholder-convention-used-in-skill-files):\n     \u003Cproject-config> → per file: the personal layer, else `.apache-magpie-overrides\u002F` -->\n\n# setup-shared-config-sync\n\nThis skill pushes local edits in `~\u002F.claude-config\u002F` to the sync repo's remote, so other machines can pull them.\nIt is the counterpart to the periodic `git pull --rebase --autostash` that the framework's example `sync.sh` runs on a timer: that pulls *upstream* into the local clone; this skill pushes *local* changes upstream.\n\n## Adopter overrides\n\n\u003C!-- BEGIN MAGPIE BLOCK: adopter-overrides — generated from tools\u002Fdev\u002Fblocks\u002Fadopter-overrides.md -->\n\nBefore running its default behaviour, this skill consults\n`setup-shared-config-sync.md` in the personal layer\n(`.apache-magpie-local\u002F` when the project adopted Magpie, falling back to the main checkout's in a linked worktree,\nor `\u003Cgit-common-dir>\u002Fapache-magpie\u002F` when Magpie is only installed; applied first, wins on conflict) and\n[`.apache-magpie-overrides\u002Fsetup-shared-config-sync.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md) (committed, project-wide)\nin the adopter repo, if present, and applies any agent-readable overrides it finds.\nSee [`docs\u002Fsetup\u002Fagentic-overrides.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md) for the contract.\n\n**Hard rule**: agents NEVER modify the snapshot under `\u003Cadopter-repo>\u002F.apache-magpie\u002F`.\nLocal modifications go in the override file; framework changes go via PR to `apache\u002Fmagpie`.\n\n\u003C!-- END MAGPIE BLOCK: adopter-overrides -->\n\n---\n## Hardcoded path\n\nThe sync repo lives at `~\u002F.claude-config\u002F`, the convention documented in\n[`docs\u002Fsetup\u002Fsecure-agent-setup.md` → Syncing user-scope config across machines](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fsecure-agent-setup.md#syncing-user-scope-config-across-machines).\nThe path is intentionally not parameterised: the doc names one canonical location, so adopters with a sync repo elsewhere fork this skill.\n\n## The default remote\n\nWhen the skill has to **bootstrap** a missing `~\u002F.claude-config\u002F`\n(see [Bootstrapping a missing `~\u002F.claude-config\u002F`](#bootstrapping-a-missing-claude-config)),\nit resolves the remote to clone or create in this order:\n\n1. **An explicit URL the user passed this invocation** (e.g. *\"bootstrap from `git@gitlab.com:me\u002Fclaude-config.git`\"*) wins over everything.\n2. **The default GitHub convention**: `git@github.com:\u003Chandle>\u002Fclaude-config.git`, the SSH form the doc's\n   [Setting up a fresh host](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fsecure-agent-setup.md#setting-up-a-fresh-host)\n   snippet uses.\n   `\u003Chandle>` comes from `gh api user --jq .login` (requires an authenticated `gh`).\n   The repo name is `claude-config`.\n\nIf neither resolves (`gh` is missing or unauthenticated **and** the user gave no URL), ask the user for the remote URL rather than guessing.\nAny remote the skill *creates* is **private** (see the golden rules); never public.\n\n## Golden rules\n\n- **Never force-push.** No `--force`, no `--force-with-lease`, no `--no-verify`, no rewriting commits already pushed to the remote.\n  The sync repo is the source of truth between machines; rewriting its history can lose work from a machine that has not been pulled here yet.\n- **Never modify a file outside `~\u002F.claude-config\u002F`.**\n  If the user's intended change is to a file in `~\u002F.claude\u002F` directly (not via a symlink into `~\u002F.claude-config\u002F`), surface that and stop; they need a different action, not this skill.\n  The **one** exception is the fresh-host symlink wiring during bootstrap (`ln -sfn ~\u002F.claude-config\u002F... ~\u002F.claude\u002F...`), and only after the user confirms it; see\n  [Bootstrapping a missing `~\u002F.claude-config\u002F`](#bootstrapping-a-missing-claude-config).\n- **Any remote the skill creates is private.** When bootstrap creates a new remote (`gh repo create`), it always passes `--private`: never public, never `--internal` unless the user asks.\n  `~\u002F.claude\u002FCLAUDE.md` carries personal collaboration preferences and the scripts may reference internal paths; a public config repo leaks both.\n  This mirrors the doc's *\"a **private** git repository (private, not public …)\"* rule.\n- **Confirm before creating or pushing to a new remote.** Creating a GitHub repo and pushing the first commit is outward-facing and hard to reverse.\n  Bootstrap shows the exact plan (repo name, `--private` visibility, remote URL, the files it will scaffold) and waits for explicit approval before running `gh repo create` or the initial `git push`.\n  **Cloning** an existing remote is lower-risk (it writes only into the new `~\u002F.claude-config\u002F` checkout) and may proceed without a separate confirmation, though the skill still reports what it cloned.\n- **Never clobber a non-repo `~\u002F.claude-config\u002F`.** If the path exists but is not a git working tree, stop and surface it; do not `rm` it or `git init` over it.\n  Bootstrap only ever *creates* a `~\u002F.claude-config\u002F` that was entirely absent.\n- **Pull-with-rebase first.** If `git fetch` shows the local checkout is behind the remote, run `git pull --rebase --autostash` *before* the commit + push.\n  Concurrent work from another machine takes precedence; the local commit lands on top, as the example `sync.sh` does for the periodic pull.\n- **Draft the commit message; never auto-send.** For every uncommitted change, draft a one-line commit subject (plus a 2–4 line body if the change merits it) and show it to the user.\n  The user replies *\"go\"* \u002F *\"yes\"* \u002F edits \u002F *\"split into two commits\"* etc. before any `git commit` runs.\n- **Use the resolved attribution trailer, added with `--trailer`.** Agent-authored commits carry the trailer the user's commit-attribution convention names, resolved per [`commit-attribution.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fcommit-attribution.md) (the sync repo has no project file, so the user's choice applies, else `Generated-by: \u003Cagent> (\u003Cmodel>)`), where `\u003Cagent>` and `\u003Cmodel>` are the agent and model you are actually running as (e.g. `Claude (Opus 4.8)`, `OpenCode (Big Pickle)`). Add it with `git commit --trailer`, never in the message body.\n  Do not hardcode either, and never use `Co-Authored-By:`.\n  Canonical wording: [AGENTS.md → Commit and PR conventions](..\u002F..\u002F..\u002F..\u002FAGENTS.md#commit-and-pr-conventions).\n- **Stop on lock conflict.** The example `sync.sh` uses `flock --nonblock` on `~\u002F.claude-config\u002F.sync.lock` so two sync runs do not race.\n  If `.sync.lock` is held, do not steal the lock; surface the conflict and stop.\n  The other process is likely the user's recurring sync timer.\n\n## Bootstrapping a missing `~\u002F.claude-config\u002F`\n\nReached from [Walk-through step 1](#walk-through) when the sync repo is **entirely absent**.\nThe goal is a working `~\u002F.claude-config\u002F` git checkout wired to a private remote, by cloning the default remote if it exists or creating it if not.\nThe skill touches nothing outside the new checkout except the confirmed fresh-host symlink wiring at the end.\n\n### Step B1 — resolve the remote\n\nResolve the remote per [The default remote](#the-default-remote): an explicit URL the user passed, else `git@github.com:\u003Chandle>\u002Fclaude-config.git` with `\u003Chandle>` from `gh api user --jq .login`.\nIf neither resolves (`gh` missing\u002Funauthenticated **and** no URL given), ask the user for the remote URL and stop until they provide one; do not guess a handle.\n\n### Step B2 — does the remote exist?\n\n- **GitHub default:** `gh repo view \u003Chandle>\u002Fclaude-config`: exit `0` ⇒ exists, non-zero ⇒ does not exist.\n  If the error is auth\u002Fpermission rather than \"not found\", surface it and stop rather than assuming absence.\n- **Explicit non-GitHub URL:** `git ls-remote \u003Curl>`: exit `0` ⇒ exists, non-zero ⇒ does not exist \u002F unreachable.\n\n### Step B3a — remote exists → clone\n\n`git clone \u003Curl> ~\u002F.claude-config`.\nThis low-risk path (it writes only the new checkout) may proceed without a separate create-confirmation; report the clone result.\nThen continue to [Step B4 — fresh-host symlink wiring](#step-b4--fresh-host-symlink-wiring) and resume the sync walk-through from step 2 (typically *\"in sync, nothing to do\"*).\n\n### Step B3b — remote does not exist → create + scaffold + push\n\nCreating an outward-facing remote is confirm-first (golden rule).\n**Show the full plan and wait for explicit approval**: the repo name, `--private` visibility, the remote URL, and the files to be scaffolded.\nOn approval:\n\n1. **Create the private remote.**\n   - GitHub: `gh repo create \u003Chandle>\u002Fclaude-config --private --description \"Personal Claude Code shared config (synced across machines)\"`\n     (no `--clone`, no auto-init; the local scaffold below becomes the first commit).\n   - Non-GitHub explicit URL: the skill cannot create the remote; tell the user to create an **empty private** repo at that URL and re-invoke.\n2. **Init + scaffold the minimal layout** under `~\u002F.claude-config\u002F`, matching the doc's\n   [Layout](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fsecure-agent-setup.md#layout) and\n   [A minimal `sync.sh`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fsecure-agent-setup.md#a-minimal-syncsh):\n\n   ```text\n   git init -b main ~\u002F.claude-config\n   ~\u002F.claude-config\u002F\n   ├── README.md      # what's in the repo + per-machine install steps\n   ├── sync.sh        # the pull\u002Fcommit\u002Fpush helper (chmod +x)\n   ├── scripts\u002F       # (empty; hooks land here as the user adopts them)\n   └── .gitignore     # excludes .sync.lock and any *.credentials* \u002F secrets\n   ```\n\n   `sync.sh` is the verbatim script from the doc's\n   [A minimal `sync.sh`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fsecure-agent-setup.md#a-minimal-syncsh)\n   section.\n   `.gitignore` must at minimum carry `.sync.lock` (the `flock` file) so the lock is never committed.\n3. **Initial commit + push.** `git add` the scaffolded files individually (never `git add -A`; see [Walk-through](#walk-through) step 5), commit with the resolved attribution trailer (via `--trailer`), `git remote add origin \u003Curl>`, then `git push -u origin main`.\n\n### Step B4 — fresh-host symlink wiring\n\nThe new (or freshly cloned) checkout only *protects* this host once its tracked artifacts are symlinked into `~\u002F.claude\u002F`.\nThis is the **one** write outside `~\u002F.claude-config\u002F` the skill performs, and only after the user confirms.\nOffer to run the\n[Setting up a fresh host](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fsecure-agent-setup.md#setting-up-a-fresh-host)\nwiring (the `ln -sfn ~\u002F.claude-config\u002F… ~\u002F.claude\u002F…` block, which `mv`s any pre-existing real file to `.bak` before symlinking).\nIf the user declines, point them at that doc section.\nWire only the artifacts the checkout contains; on a brand-new scaffold `scripts\u002F` may be empty, so this step is often a no-op beyond `CLAUDE.md`.\n\n## Walk-through\n\n1. **`cd ~\u002F.claude-config`** and verify it is a git working tree pointing at a private remote.\n   - If the directory **does not exist** at all, do not stop — **bootstrap** it: jump to\n     [Bootstrapping a missing `~\u002F.claude-config\u002F`](#bootstrapping-a-missing-claude-config),\n     then resume the sync walk-through from step 2.\n   - If the directory **exists but is not a git repo**, surface that and stop (per the golden rule — never clobber a non-repo path).\n     The user has a stray `~\u002F.claude-config\u002F`; they resolve it, then re-invoke.\n   - If it is a git repo, continue to step 2.\n\n2. **`git fetch origin`** to learn the remote's current state.\n   Report:\n   - commits behind upstream (will be pulled in step 4),\n   - commits ahead of upstream (committed local work not yet pushed),\n   - uncommitted working-tree modifications (`git status --short`),\n   - untracked files the user may want to either add or `.gitignore`.\n\n3. **Decide the action.** The four reachable states:\n   - **In sync, nothing to do.** No uncommitted changes, no unpushed commits, not behind.\n     Report and stop.\n   - **Push-only.** Committed local work needs to land on the remote, but not behind and no uncommitted edits.\n     Pull-with-rebase is unnecessary; go straight to push.\n   - **Commit-then-push.** Uncommitted edits exist.\n     Walk each modified file with the user (diff + draft commit message + approval), commit each batch the user accepts, then push.\n   - **Pull-then-commit-then-push.** Uncommitted edits *and* behind upstream.\n     Run `git pull --rebase --autostash` first; if rebase succeeds cleanly, proceed to the commit-then-push flow.\n     If rebase conflicts, stop and surface — conflicts in `~\u002F.claude-config\u002F` are the user's to resolve, not the skill's.\n\n4. **Pull-with-rebase (when applicable).** Run `git pull --rebase --autostash`.\n   Report what changed (commits pulled, files touched).\n\n5. **Stage + commit (when applicable).** For each modification the user approves:\n   - `git add \u003Cfile>` for the specific file (never `git add -A` or `git add .` — the sync repo is the user's most personal directory and `git add -A` risks staging an editor swap file or a `.DS_Store` you forgot to gitignore),\n   - `git commit -m '\u003Csubject>' -m '\u003Cbody>' --trailer '\u003Ctrailer>'` with the approved message.\n     `\u003Ctrailer>` is the resolved attribution trailer (see the golden rule above) — the actual agent and model you are running as, not a hardcoded value; omit `--trailer` when the convention is `none`.\n\n   Probe the gpg-agent cache first when `commit.gpgsign` is true: a token-backed key with a cold cache stalls this commit until `gpg: signing failed: Timeout`.\n   Surface a dialogue, or hand the user the command — see\n   [`AGENTS.md` → *Commit and PR conventions*](..\u002F..\u002F..\u002F..\u002FAGENTS.md#commit-and-pr-conventions).\n\n6. **Push.** `git push` to the upstream branch. No `--force`.\n   A rejected (non-fast-forward) push means another machine pushed after our `git fetch` in step 2; stop, surface, and recommend re-invoking the skill (which repeats the fetch + pull-with-rebase).\n   Do not retry in-flight.\n\n## After the push lands\n\nReport:\n- which commit SHA is now on the remote,\n- a one-line summary of what was pushed (so the user can confirm in their terminal scrollback),\n- whether other-machine pulls are needed (the timer-driven `sync.sh` on the user's other hosts picks the change up on its next run; do not nag about this).\n\nIf the changes touched a file under `~\u002F.claude-config\u002Fscripts\u002F` that is symlinked from `~\u002F.claude\u002Fscripts\u002F`, also note that the change is *immediately* live on this host, since the symlink resolves to the modified file.\nNo re-`cp` needed.\n",{"mode":48,"name":5,"family":52,"license":16,"capability":58,"description":7,"when_to_use":61,"surface_hash":62,"measured_tokens":63},[59,60],"capability:intake","capability:platform","When the user wants their shared Claude config synced, or has just edited something under `~\u002F.claude-config\u002F`. Also on a fresh host with no such repo yet, and after `setup-isolated-setup-update` finds drift on a script they keep there.","sha256:bc445ef323563cd8",3767,"main","1012b6c8350192a6d88250f309dd1bd07f42150c","plugins\u002Fmagpie-setup\u002Fskills\u002Fshared-config-sync",127,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie","https:\u002F\u002Fmagpie.apache.org\u002F","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-15 00:32:58",{"source":9,"skillName":5,"commands":74,"prompt":84,"zipAvailable":85},[75,78,81],{"tool":76,"command":77},"npx","npx skills add apache\u002Fmagpie --skill shared-config-sync",{"tool":79,"command":80},"bunx","bunx skills add apache\u002Fmagpie --skill shared-config-sync",{"tool":82,"command":83},"pnpm","pnpm dlx skills add apache\u002Fmagpie --skill shared-config-sync","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-setup\u002Fskills\u002Fshared-config-sync\u002FSKILL.md",true,[87],{"path":88,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":15,"sourceHtmlUrl":91},"agents\u002Fopenai.yaml","REFERENCE","参考文档","https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fto-tickets\u002Fagents\u002Fopenai.yaml",[93,117,141,161,182,211],{"skillNo":94,"name":95,"nameZh":17,"description":96,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":53},"01M70JNYMCY5EEWYWDN30WKDJ4","upgrade","Upgrade Magpie in one run: move to the new version if needed (`setup update`), check this machine and project, apply one approved plan, re-check, and print exact commands for what is out of reach.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-setup\u002Fskills\u002Fupgrade\u002FSKILL.md",[],[95,100,101,102,103,104,105,106,48,107,108,109,110,111,112,113,114,115,116,51],"notice","platform","for","project","re","move","session","machine","yes","new","version","apply","print","check","last","plan","run",{"skillNo":118,"name":119,"nameZh":17,"description":120,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":53},"01M70JJBSW3XE35BAXQ1VTA9SV","dependency-vulnerability-audit","Read-only dependency vulnerability audit for one repository or a local\ncheckout. Detects the project's dependency manager(s), runs the\nappropriate audit tool, surfaces patchable findings grouped by severity,\nand proposes upgrades for maintainer review. Never modifies manifests or\nlock files and never opens update PRs.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-repo-health\u002Fskills\u002Fdependency-vulnerability-audit\u002FSKILL.md",[],[124,125,126,127,45,128,129,130,103,131,132,133,134,135,136,36,137,138,139,140],"vulnerability","audit","dependency","dependency vulnerability audit","checkout","chain","scope","dependency manager","local","only","files","invoke","manifests","ask","patch","hand","review",{"skillNo":142,"name":143,"nameZh":17,"description":144,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":53},"01M70JGBWHKMB7V6T7QWT6G5DQ","thread-mentor","Draft a teaching-register comment on a GitHub issue or PR thread on the\nconfigured `\u003Cupstream>` repo, aimed at a contributor missing context the\nmaintainer would spell out. Reads the thread, decides\nwhether an intervention is warranted, drafts one comment per the tone\nguide and convention pointers, and waits for explicit confirmation before\nposting via `gh`. Escalates on the four hand-off triggers.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-pr-management\u002Fskills\u002Fthread-mentor\u002FSKILL.md",[],[148,149,150,103,151,152,135,153,154,36,155,137,156,139,140,157,32,158,159,160],"thread mentor","mentor","thread","repro","confirmation","pr-management","contributor","number","teaching","at","drafts","flags","spell",{"skillNo":162,"name":163,"nameZh":17,"description":164,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":53},"01M70JF866SAVGXSSC33HRX4ZG","merge-candidates","Identify trivial, low-risk PRs in the `ready for maintainer review` queue\nof \u003Cupstream> that pass every quality gate and touch only supplementary\nareas (docs, changelog, translations, tests) — the \"express lane\".\nSurfaces and ranks candidates with per-PR diff summaries, an\nall-gates-green attestation, and the exact merge command. On explicit\nper-PR confirmation it can submit an APPROVE review, exactly as\npr-management-code-review does. It never merges itself — automated merge\nis the deliberately-deferred Agentic Autonomous mode.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-pr-management\u002Fskills\u002Fmerge-candidates\u002FSKILL.md",[],[168,169,170,171,172,45,173,174,103,175,176,177,133,178,152,135,153,179,180,181],"merge candidates","merge","ready","quick","show","green","submit","churn","attestation","mode","autonomous","show me","agentic","code",{"skillNo":183,"name":184,"nameZh":185,"description":186,"descriptionZh":187,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":188,"categories":189,"keywords":196,"publishedAt":53},"01M6AD18GMVM1BEM31VF538R8A","generate-cve-json","CVE 5.x JSON 文档生成","Generate a CVE 5.x JSON document from an \u003Ctracker> tracking\nissue, ready to paste into the Vulnogram `#source` tab of the ASF CVE tool\nat https:\u002F\u002Fcveprocess.apache.org\u002Fcve5\u002F\u003CCVE-ID>#source. The conversion is\ndeterministic: same issue in, same JSON bytes out. Handles multiple\ncredits (one per line) and multiple references (URLs extracted from the\nissue's \"Public advisory URL\" and \"PR with the fix\" fields; the\n\"Security mailing list thread\" field is treated as internal-only and\nnever exported).","从 \u003Ctracker> 跟踪工单生成 CVE 5.x JSON 文档，可直接粘贴到 https:\u002F\u002Fcveprocess.apache.org\u002Fcve5\u002F\u003CCVE-ID>#source 处 ASF CVE 工具的 Vulnogram `#source` 标签页。该转换是确定性的：相同的工单输入总是产生完全相同的 JSON 字节输出。支持多条致谢信息（每行一条）和多个引用（URL 从工单的 \"Public advisory URL\" 和 \"PR with the fix\" 字段提取；\"Security mailing list thread\" 字段被视为仅内部使用，绝不导出）。","https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Ftools\u002Fcve-tool-vulnogram\u002Fgenerate-cve-json\u002FSKILL.md",[190,193],{"categoryNo":191,"categoryName":192,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98CYQ7TEW2D1MRQ00TE","安全公告与漏洞管理",{"categoryNo":194,"categoryName":195,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师",[197,198,199,200,10,51,170,45,201,133,202,203,204,205,206,207,208,209,210,157,135,36],"cve","generate","generate cve json","json","fix","either","URL","team","conversion","publish","references","tracker","paste","exported",{"skillNo":212,"name":213,"nameZh":214,"description":215,"descriptionZh":216,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":217,"categories":218,"keywords":223,"publishedAt":53},"01M6AD158PEPPPX9N33DASMRQ8","write-skill","Apache Magpie 技能编写与迁移","Write a new skill for the Apache Magpie framework, or bring an existing one up to current conventions. Scaffolds the directory, walks the house style and the prompt-injection defences, and validates before it ships.","为 Apache Magpie 框架编写新技能，或将现有技能更新至当前规范。它会搭建目录结构、引导遵循项目内部风格与提示注入防护措施，并在发布前进行验证。","https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-utilities\u002Fskills\u002Fwrite-skill\u002FSKILL.md",[219,220],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":221,"categoryName":222,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理",[224,225,226,10,227,228,48,229,109,36,230,231,232,233,234,235,236,237,39,238],"write skill","write","create","directory","framework","up","optimize","authoring","injection","Utilities","new skill","magpie","add","existing skill","bring"]