Agent Skillsdoodledood/manifest-dev › sync-claude-code-plugins

sync-claude-code-plugins

GitHub

将claude-code-plugins中的prompt-engineering插件同步到本地仓库的.claude/目录,支持复制、元数据修复及受控删除,确保仓库内容隔离且自包含。

.claude/skills/sync-claude-code-plugins/SKILL.md doodledood/manifest-dev

Trigger Scenarios

同步claude-code-plugins 拉取prompt-engineering 刷新prompt-engineering插件

Install

npx skills add doodledood/manifest-dev --skill sync-claude-code-plugins -g -y
More Options

Non-standard path

npx skills add https://github.com/doodledood/manifest-dev/tree/main/.claude/skills/sync-claude-code-plugins -g -y

Use without installing

npx skills use doodledood/manifest-dev@sync-claude-code-plugins

指定 Agent (Claude Code)

npx skills add doodledood/manifest-dev --skill sync-claude-code-plugins -a claude-code -g -y

安装 repo 全部 skill

npx skills add doodledood/manifest-dev --all -g -y

预览 repo 内 skill

npx skills add doodledood/manifest-dev --list

SKILL.md

Frontmatter
{
    "name": "sync-claude-code-plugins",
    "metadata": {
        "internal": true
    },
    "description": "Sync the prompt-engineering plugin from a local clone of claude-code-plugins into .claude\/ so the repo is self-contained for isolated\/web environments. Copies agents\/skills, removes only previously-synced items that disappeared upstream. Other content in .claude\/ is left alone. Use when asked to sync claude-code-plugins, pull prompt-engineering, refresh prompt-engineering plugin.",
    "user-invocable": true
}

User request: $ARGUMENTS

Sync prompt-engineering plugin components from a local sibling clone of claude-code-plugins into this repo's .claude/ directory. The plugin OWNS only the files it ships — other content in .claude/agents/ and .claude/skills/ (manifest-dev sync, KB skills, anything else) must be left alone.

Source & Target

Role Path
Source repo ../claude-code-plugins (relative to this repo's root)
Source components <source_repo>/claude-plugins/prompt-engineering/
Target .claude/ in this repo
Tracking file .claude/.claude-code-plugins-sync.json

Sync scope

Component Source dir Target dir
Agents agents/ .claude/agents/
Skills skills/ .claude/skills/

prompt-engineering ships no hooks today.

Territory model

Deletion invariant: only items in tracked (the previously-synced set) are eligible for removal when they disappear upstream. Items never in tracked are invisible — that's how project-local content stays safe.

The tracked set lives in .claude/.claude-code-plugins-sync.json:

{
  "version": 1,
  "last_synced_at": "ISO-8601 timestamp",
  "agents": ["prompt-reviewer.md", "..."],
  "skills": ["prompt-engineering", "..."]
}

First run (file missing): tracked is empty, no deletions happen, file is written at end.

Sync algorithm

Pre-flight: abort if <source_repo>/claude-plugins/prompt-engineering/ is missing — silent absence is a misconfigured path, not upstream removal. Do not delete on this signal. If the source is a clean git repo, git pull --ff-only first; surface a warning and proceed if pulling fails.

For each component (agents/skills):

  • Copy every source item over its target path. Skip if target is a symlink. Skip retired items (see denylist below) even when an older upstream checkout still ships them.
  • Re-apply local metadata after copying: every non-symlink synced skill's SKILL.md must carry metadata: / internal: true in its frontmatter — add it back when the upstream copy lacks it. Synced skills are repo-maintenance tooling in this repo; the flag keeps skill pickers and directory scrapers from listing them as product skills.
  • Delete items in tracked − source from target. Skip if target is a symlink, doesn't exist, or is the sync-claude-code-plugins skill itself.
  • Refresh .claude/.claude-code-plugins-sync.json with the current source listing minus the denylist.

Source listing excludes README.md and .claude-plugin/ (plugin metadata, not content).

Retirement denylist (never copy or track, regardless of upstream): agents/prompt-reviewer.md, skills/prompt-engineering. manifest-dev-tools ships its own prompt-engineering and review-prompt skills (plugin-owned symlinks at .claude/skills/prompt-engineering and .claude/skills/review-prompt) and manifest-dev ships zero agents, so neither the upstream prompt-reviewer agent nor the upstream prompt-engineering skill may be reintroduced — both are already dropped from the tracked set.

.agents mirror

After each sync, ensure .agents/skills/<name> is a symlink to ../../.claude/skills/<name> for every tracked skill, and remove the symlink for any skill removed from tracked. This lets non-Claude coding agents (Codex, etc.) read the same skills without duplicating content. Only skills are mirrored — .agents/agents/ is out of scope.

  • Create the symlink if missing.
  • If .agents/skills/<name> exists and is not a symlink, skip it — that's project-local content, don't clobber.
  • Create .agents/skills/ if missing, but never .agents/ itself (the user opts in by creating it).

Gotchas

  • Upstream copies drop the internal flag. Upstream claude-code-plugins skills ship without metadata: internal: true; a plain copy silently reverts the flag on the non-symlink synced skills (observed 2026-07-05). The re-apply step above exists for this — do not skip it.

  • Source must exist: missing source path means abort, not "delete all tracked items."

  • Nested skills directory: source skills live at skills/prompt-engineering/, skills/compress-prompt/, etc. Copy each skill directory into .claude/skills/<skill-name>/ — don't copy the outer skills/ folder or you get .claude/skills/skills/.

  • prompt-engineering and review-prompt are plugin-owned, not upstream: manifest-dev-tools ships its own versions of both skills, symlinked at .claude/skills/prompt-engineering and .claude/skills/review-prompt. The upstream plugin ships skills with the same names, but the "skip if target is a symlink" rule above means this sync leaves the plugin's symlinks alone (it neither overwrites nor deletes them). Do not re-add either to the tracking file.

  • Symlinks look like directories to cp/rm/find: a symlinked target overwritten by cp -R corrupts the linked plugin's source files; a symlinked directory deleted by rm -rf removes the link, not the plugin, but a recursive find that follows the link will. Use [ -L path ] before every overwrite and every delete.

Output

Summary table per component (agents/skills): items added, updated, removed, symlinks skipped, and removals refused (e.g. due to symlink). Show the net change to the tracking file.

Never

  • Overwrite, remove, or follow into symlinks under .claude/ — check [ -L path ] before every copy, delete, or recursive descent
  • Replace a non-symlink at .agents/skills/<name> — leave project-local content alone
  • Create .agents/ itself (only manage .agents/skills/<name> entries inside an existing .agents/)
  • Delete items not in the tracked set — even if they're not in source
  • Delete the sync-claude-code-plugins skill
  • Treat a missing source path as upstream removal — abort instead
  • Copy plugin metadata (README.md, .claude-plugin/) or the source repo's own .claude/ directory
  • Modify the source repo (other than the optional git pull --ff-only)

Version History

  • 2ac487e Current 2026-08-20 08:55

Same Skill Collection

.claude/skills/auto-optimize-prompt/SKILL.md
.claude/skills/compress-prompt/SKILL.md
.claude/skills/harden-task-file/SKILL.md
.claude/skills/learn-from-session/SKILL.md
.claude/skills/optimize-prompt-token-efficiency/SKILL.md
.claude/skills/sync-tools/SKILL.md
claude-plugins/manifest-dev-tools/skills/babysit-pr/SKILL.md
claude-plugins/manifest-dev-tools/skills/handoff/SKILL.md
claude-plugins/manifest-dev-tools/skills/prompt-engineering/SKILL.md
claude-plugins/manifest-dev-tools/skills/re-pitch/SKILL.md
claude-plugins/manifest-dev-tools/skills/review-pr/SKILL.md
claude-plugins/manifest-dev-tools/skills/review-prompt/SKILL.md
claude-plugins/manifest-dev-tools/skills/walk-pr/SKILL.md
claude-plugins/manifest-dev/skills/auto/SKILL.md
claude-plugins/manifest-dev/skills/check-pr/SKILL.md
claude-plugins/manifest-dev/skills/define/SKILL.md
claude-plugins/manifest-dev/skills/do/SKILL.md
claude-plugins/manifest-dev/skills/done/SKILL.md
claude-plugins/manifest-dev/skills/escalate/SKILL.md
claude-plugins/manifest-dev/skills/figure-out-team/SKILL.md
claude-plugins/manifest-dev/skills/figure-out/SKILL.md
claude-plugins/manifest-dev/skills/init-context/SKILL.md
claude-plugins/manifest-dev/skills/just-auto/SKILL.md
claude-plugins/manifest-dev/skills/just-do/SKILL.md
claude-plugins/manifest-dev/skills/next-ticket/SKILL.md
claude-plugins/manifest-dev/skills/poll-slack/SKILL.md
claude-plugins/manifest-dev/skills/review-writing/SKILL.md
claude-plugins/manifest-dev/skills/run-ticket/SKILL.md
claude-plugins/manifest-dev/skills/sweep-tickets/SKILL.md
claude-plugins/manifest-dev/skills/ticket-up/SKILL.md
claude-plugins/PLUGIN_TEMPLATE/skills/example/SKILL.md
claude-plugins/manifest-dev-tools/skills/teach-me/SKILL.md
claude-plugins/manifest-dev/skills/chat-surface/SKILL.md
claude-plugins/manifest-dev/skills/review-code/SKILL.md

Metadata

Files
0
Version
2ac487e
Hash
16594fde
Indexed
2026-08-20 08:55

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 09:05
浙ICP备14020137号-1 $방문자$