{"id":"a4ca284f-fe9c-428a-964b-9506e81fb25d","entityType":"agent","slug":"clawhub-drumrobot-cc-plugin","name":"cc-plugin","canonicalUrl":"https://www.xpersona.co/agent/clawhub-drumrobot-cc-plugin","canonicalPath":"/agent/clawhub-drumrobot-cc-plugin","generatedAt":"2026-10-10T03:51:36.144Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T19:09:11.678Z","emptyReason":null},"description":"Claude Code plugin lifecycle management. cache - clean old cache versions (cleanup only — NOT for cache miss diagnosis) [cache.md], clustering - skill affinity scoring (coupling/dep/hook-ownership) → plugin bundle membership [clustering.md], create - plugin authoring guide (structure, plugin.json, components) [create.md], dev-reflect - reflect local dev repo into marketplace clone for pre-push testing [dev-reflect.md], hud - OMC HUD statusline (omcHud elements, omcLabel, wrapper sed fallback) [hud.md], marketplace - clone/list/update marketplace repos [marketplace.md], troubleshoot - cache miss/error, install fail, cache sync, HUD diagnostics — ALL plugin errors route here [troubleshoot.md]. \"plugin\", \"marketplace\", \"plugin install\", \"plugin not installed\", \"cache miss\", \"cache error\", \"plugin error\", \"load error\", \"reload errors\", \"dev reflect\", \"plugin clustering\", \"bundle skills\", \"skill affinity\", \"OMC HUD\", \"omcHud\", \"omcLabel\", \"statusline\", \"[OMC#\" triggers.","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.1K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17ay1v6v88r2m102pvvc44gz183qcrm:cc-plugin","sourceUrl":"https://clawhub.ai/drumrobot/cc-plugin","homepage":"https://clawhub.ai/drumrobot/skills/cc-plugin","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/drumrobot/cc-plugin","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/drumrobot/skills/cc-plugin","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":66,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"cc-plugin technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T19:09:11.678Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T19:09:11.678Z","emptyReason":null},"stars":null,"forks":null,"downloads":2093,"packageName":null,"latestVersion":"0.8.1","tractionLabel":"2.1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T19:09:11.650Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T19:09:11.678Z","lastCrawledAt":"2026-10-09T19:09:11.650Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T19:09:11.650Z","lastVerifiedAt":null,"highlights":[{"version":"0.8.1","createdAt":"2026-10-06T07:55:32.334Z","changelog":"- Updated documentation for cache management and troubleshooting, clarifying separation of responsibilities. - Improved cache cleanup instructions in cache.md and updated troubleshooting steps in troubleshoot.md. - Removed obsolete skill-card.md file. - Refined topic descriptions and routing logic for handling plugin errors and cache issues.","fileCount":14,"zipByteSize":36326},{"version":"0.8.0","createdAt":"2026-09-24T14:19:25.316Z","changelog":"- Removed the skill-card.md file. - Updated CHANGELOG.md to reflect recent changes.","fileCount":14,"zipByteSize":34528},{"version":"0.7.2","createdAt":"2026-09-20T11:23:01.982Z","changelog":"- Removed the unused file: skill-card.md. - Updated CHANGELOG.md and scripts/dev-reflect.sh (details not specified). - No user-facing functionality changes.","fileCount":14,"zipByteSize":34524},{"version":"0.7.1","createdAt":"2026-09-18T15:52:53.121Z","changelog":"cc-plugin 0.7.1 - Removed the skill-card.md file for a more streamlined documentation set. - Updated CHANGELOG.md to reflect recent changes. No updates to core plugin logic.","fileCount":14,"zipByteSize":33499},{"version":"0.7.0","createdAt":"2026-09-06T10:31:16.014Z","changelog":"cc-plugin 0.7.0 - Removed the skill-card.md file. - Updated CHANGELOG.md with latest changes.","fileCount":14,"zipByteSize":33426},{"version":"0.6.2","createdAt":"2026-09-01T22:37:42.855Z","changelog":"- Updated documentation: CHANGELOG.md and dev-reflect.md have been modified for improved clarity. - Removed outdated file: skill-card.md has been deleted. - No changes to code or functionality in this release.","fileCount":14,"zipByteSize":33277},{"version":"0.6.1","createdAt":"2026-08-30T11:13:11.386Z","changelog":"cc-plugin 0.6.1 - Updated documentation in CHANGELOG.md. - Removed skill-card.md file.","fileCount":14,"zipByteSize":32363},{"version":"0.6.0","createdAt":"2026-08-21T05:40:39.327Z","changelog":"cc-plugin 0.6.0 - Removed the skill-card.md file. - Updated CHANGELOG.md with latest changes.","fileCount":14,"zipByteSize":32020}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17ay1v6v88r2m102pvvc44gz183qcrm:cc-plugin","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17ay1v6v88r2m102pvvc44gz183qcrm:cc-plugin` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/drumrobot/cc-plugin before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-cc-plugin/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-cc-plugin/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-cc-plugin/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-cc-plugin/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-cc-plugin/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-cc-plugin/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T03:51:36.142Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-cc-plugin/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-cc-plugin/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-cc-plugin/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-cc-plugin/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T19:09:11.678Z","emptyReason":null},"readme":"Skill: cc-plugin\n\nOwner: drumrobot\n\nSummary: Claude Code plugin lifecycle management. cache - clean old cache versions (cleanup only — NOT for cache miss diagnosis) [cache.md], clustering - skill affinity scoring (coupling/dep/hook-ownership) → plugin bundle membership [clustering.md], create - plugin authoring guide (structure, plugin.json, components) [create.md], dev-reflect - reflect local dev repo into marketplace clone for pre-push testing [dev-reflect.md], hud - OMC HUD statusline (omcHud elements, omcLabel, wrapper sed fallback) [hud.md], marketplace - clone/list/update marketplace repos [marketplace.md], troubleshoot - cache miss/error, install fail, cache sync, HUD diagnostics — ALL plugin errors route here [troubleshoot.md]. \"plugin\", \"marketplace\", \"plugin install\", \"plugin not installed\", \"cache miss\", \"cache error\", \"plugin error\", \"load error\", \"reload errors\", \"dev reflect\", \"plugin clustering\", \"bundle skills\", \"skill affinity\", \"OMC HUD\", \"omcHud\", \"omcLabel\", \"statusline\", \"[OMC#\" triggers.\n\nTags: latest:0.8.1\n\nVersion history:\n\nv0.8.1 | 2026-10-06T07:55:32.334Z | auto\n\n- Updated documentation for cache management and troubleshooting, clarifying separation of responsibilities.\n- Improved cache cleanup instructions in cache.md and updated troubleshooting steps in troubleshoot.md.\n- Removed obsolete skill-card.md file.\n- Refined topic descriptions and routing logic for handling plugin errors and cache issues.\n\nv0.8.0 | 2026-09-24T14:19:25.316Z | auto\n\n- Removed the skill-card.md file.\n- Updated CHANGELOG.md to reflect recent changes.\n\nv0.7.2 | 2026-09-20T11:23:01.982Z | auto\n\n- Removed the unused file: skill-card.md.\n- Updated CHANGELOG.md and scripts/dev-reflect.sh (details not specified).\n- No user-facing functionality changes.\n\nv0.7.1 | 2026-09-18T15:52:53.121Z | auto\n\ncc-plugin 0.7.1\n\n- Removed the skill-card.md file for a more streamlined documentation set.\n- Updated CHANGELOG.md to reflect recent changes. No updates to core plugin logic.\n\nv0.7.0 | 2026-09-06T10:31:16.014Z | auto\n\ncc-plugin 0.7.0\n\n- Removed the skill-card.md file.\n- Updated CHANGELOG.md with latest changes.\n\nv0.6.2 | 2026-09-01T22:37:42.855Z | auto\n\n- Updated documentation: CHANGELOG.md and dev-reflect.md have been modified for improved clarity.\n- Removed outdated file: skill-card.md has been deleted.\n- No changes to code or functionality in this release.\n\nv0.6.1 | 2026-08-30T11:13:11.386Z | auto\n\ncc-plugin 0.6.1\n\n- Updated documentation in CHANGELOG.md.\n- Removed skill-card.md file.\n\nv0.6.0 | 2026-08-21T05:40:39.327Z | auto\n\ncc-plugin 0.6.0\n\n- Removed the skill-card.md file.\n- Updated CHANGELOG.md with latest changes.\n\nv0.5.3 | 2026-08-18T05:41:10.215Z | auto\n\ncc-plugin 0.5.3\n\n- Updated CHANGELOG.md with latest changes.\n- Removed skill-card.md documentation file.\n\nv0.5.2 | 2026-08-06T09:21:21.052Z | auto\n\ncc-plugin 0.5.2\n\n- Updated CHANGELOG.md with latest changes.\n- Removed outdated skill-card.md documentation file.\n\nv0.5.1 | 2026-07-23T13:39:11.702Z | auto\n\n- Added resources/cache-cleanup.sh to manage cache cleanup tasks.\n- Updated cache.md and CHANGELOG.md documentation.\n- Removed skill-card.md and moved the cache-cleanup script from scripts/ to resources/.\n- No changes to any user-facing features or SKILL.md content.\n\nv0.5.0 | 2026-07-08T14:27:36.840Z | auto\n\ncc-plugin 0.5.0\n\n- Added \"clustering\" topic and guide for skill affinity scoring and plugin bundle recommendation.\n- Updated descriptions and keywords to reflect new clustering functionality.\n- Revised documentation in SKILL.md, CHANGELOG.md, create.md, and troubleshoot.md.\n- Improved routing and topic explanations for better guidance on cache vs. troubleshoot actions.\n\nv0.4.2 | 2026-07-02T01:40:55.172Z | auto\n\ncc-plugin 0.4.2\n\n- Documentation files updated; no functional or code changes.\n- SKILL.md reformatted description (from >- to |) for improved text formatting.\n- Ensured documentation consistency; no changes to routing rules, guides, or plugin features.\n\nv0.4.1 | 2026-06-26T16:24:05.901Z | auto\n\n- Updated documentation in CHANGELOG.md and troubleshoot.md.\n- Removed obsolete file skill-card.md.\n- No functional changes; documentation and cleanup only.\n\nv0.4.0 | 2026-06-12T15:36:31.500Z | auto\n\n- Added \"dev-reflect\" feature for reflecting local development changes into the marketplace clone for testing before push.\n- Introduced new dev-reflect documentation and helper script (`scripts/dev-reflect.sh`).\n- Updated documentation to cover the new dev-reflect workflow.\n- Removed outdated `skill-card.md` file.\n\nv0.3.0 | 2026-06-03T12:12:51.720Z | auto\n\ncc-plugin 0.3.0 – Major update with new HUD guide, clarified troubleshooting, and topic routing\n\n- Added OMC HUD configuration guide (`hud.md`) for statusline and compatibility.\n- Significantly revised troubleshooting: all plugin load/cache/install errors now route to `troubleshoot.md`.\n- Cache guide (`cache.md`) now only covers deletion of old cache versions; not for cache or load errors.\n- Explicit topic routing rules added for user requests (e.g., \"cache miss\" always routes to troubleshoot).\n- Updated documentation and metadata for clarity; deprecated `skill-card.md`.\n\nv0.1.0 | 2026-05-04T04:18:54.776Z | user\n\nInitial release: merged marketplace-manager + cache-cleanup + plugin-writer + troubleshoot\n\nArchive index:\n\nArchive v0.8.1: 14 files, 36326 bytes\n\nFiles: cache.md (1305b), CHANGELOG.md (8810b), clustering.md (22997b), create.md (3583b), dev-reflect.md (6558b), hud.md (8900b), LICENSE (1063b), marketplace.md (1036b), resources/cache-cleanup.sh (4885b), scripts/dev-reflect.sh (6660b), skill-card.md (1883b), SKILL.md (3029b), troubleshoot.md (17802b), _meta.json (128b)\n\nFile v0.8.1:SKILL.md\n\n---\nmetadata:\n  author: es6kr\n  version: \"0.1.0\"\nname: cc-plugin\ndescription: |\n  Claude Code plugin lifecycle management.\n  cache - clean old cache versions (cleanup only — NOT for cache miss diagnosis) [cache.md],\n  clustering - skill affinity scoring (coupling/dep/hook-ownership) → plugin bundle membership [clustering.md],\n  create - plugin authoring guide (structure, plugin.json, components) [create.md],\n  dev-reflect - reflect local dev repo into marketplace clone for pre-push testing [dev-reflect.md],\n  hud - OMC HUD statusline (omcHud elements, omcLabel, wrapper sed fallback) [hud.md],\n  marketplace - clone/list/update marketplace repos [marketplace.md],\n  troubleshoot - cache miss/error, install fail, cache sync, HUD diagnostics — ALL plugin errors route here [troubleshoot.md].\n  \"plugin\", \"marketplace\", \"plugin install\", \"plugin not installed\",\n  \"cache miss\", \"cache error\", \"plugin error\", \"load error\", \"reload errors\",\n  \"dev reflect\", \"plugin clustering\", \"bundle skills\", \"skill affinity\",\n  \"OMC HUD\", \"omcHud\", \"omcLabel\", \"statusline\", \"[OMC#\" triggers.\n---\n\n# Plugin\n\nClaude Code plugin lifecycle management: create, install, update, cache, troubleshoot.\n\n## Topics\n\n| Topic | Description | Guide |\n|-------|-------------|-------|\n| cache | **Cleanup only** — clean old plugin cache versions and temp directories. **NOT for \"cache miss\" or load errors** — use troubleshoot instead | [cache.md](./cache.md) |\n| clustering | Score skill-to-skill affinity (coupling / shared external dep / hook-ownership gate) and recommend plugin bundle membership. Feeds into `create` | [clustering.md](./clustering.md) |\n| create | Plugin authoring guide (structure, plugin.json, components) | [create.md](./create.md) |\n| dev-reflect | Reflect a local dev source repo's plugin/skill changes into the registered marketplace clone for local testing before commit/push (helper: `scripts/dev-reflect.sh`) | [dev-reflect.md](./dev-reflect.md) |\n| hud | OMC HUD statusline configuration: omcHud elements, omcLabel toggle, wrapper sed fallback, version compatibility | [hud.md](./hud.md) |\n| marketplace | Clone, list, and update marketplace repositories | [marketplace.md](./marketplace.md) |\n| troubleshoot | **All plugin errors** — cache miss, load errors, `/reload-plugins` errors, `/doctor` failures, installation failures, cache sync, HUD diagnostics | [troubleshoot.md](./troubleshoot.md) |\n\n## Routing rule (HARD STOP)\n\n| User says | Topic |\n|-----------|-------|\n| \"cache miss\", \"cache error\", \"load error\", \"reload errors\", \"plugin not loading\", \"plugin not installed\" | **troubleshoot** (NOT cache) |\n| \"cache cleanup\", \"old versions\", \"disk space\", \"remove temp_git_*\" | cache |\n\n`cache.md` only owns deletion of stale versions. Any diagnostic of \"why isn't this plugin working\" — including the literal phrase \"cache miss\" — routes to `troubleshoot.md`.\n\n## Paths\n\n```\nMarketplaces: ~/.claude/plugins/marketplaces/\nCache:        ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/\n```\n\nFile v0.8.1:_meta.json\n\n{\n  \"ownerId\": \"kn74k8yfvftx6f062qa8fzyd8h8373jd\",\n  \"slug\": \"cc-plugin\",\n  \"version\": \"0.8.1\",\n  \"publishedAt\": 1791273332334\n}\n\nFile v0.8.1:cache.md\n\n# Cache Cleanup\n\nClean old plugin cache versions and temporary git directories.\n\n> **⚠️ This topic is cleanup-only.**\n> If the user says \"cache miss\", \"cache error\", \"load error\", or any plugin diagnostic phrase — **stop and route to [troubleshoot.md](./troubleshoot.md) instead**. cache.md does not diagnose anything; it only deletes stale versions.\n\n## Usage\n\n```bash\nresources/cache-cleanup.sh [--dry-run] [--verbose]\n```\n\n- `--dry-run`: Preview deletions without removing\n- `--verbose`: Show detailed output\n\n> **Platform**: cross-platform (macOS, Linux, WSL). The script tries BSD-style birthtime\n> (`stat -f \"%B\"`) first, falls back to Linux birthtime (`stat -c \"%W\"`, often `0` on filesystems\n> that don't track it), then falls back again to modification time (`stat -c \"%Y\"`) so version\n> ordering is still correct everywhere. (This note previously said \"macOS only\" — that was stale;\n> the fallback chain is already implemented in `resources/cache-cleanup.sh`.)\n\n## What It Cleans\n\n- **Old versions**: Keeps only the latest version per plugin in `~/.claude/plugins/cache/<marketplace>/<plugin>/`\n- **Temp git dirs**: Removes `temp_git_*` directories in cache root\n\n## When to Use\n\n- After plugin updates (old versions accumulate)\n- When disk space is needed\n- Periodically as maintenance\n\nFile v0.8.1:CHANGELOG.md\n\n# Changelog\n\n## [0.8.1](https://github.com/es6kr/skills/compare/cc-plugin-v0.8.0...cc-plugin-v0.8.1) (2026-10-04)\n\n\n### Bug Fixes\n\n* **cc-plugin:** clarify temp_git_* lives at cache root, not nested in &lt;marketplace&gt; ([680aecd](https://github.com/es6kr/skills/commit/680aecdd06e5f753eb549aee5a2a4e147fe3d86a))\n* **cc-plugin:** document WSL temp_git_* update-swap failures, fix stale platform note ([668406e](https://github.com/es6kr/skills/commit/668406e7501eaf1534d573fcf89805e167b3bf7a))\n\n\n### Documentation\n\n* **cc-plugin:** document WSL temp_git_* update-swap failures, fix stale platform note ([9e7493d](https://github.com/es6kr/skills/commit/9e7493d13e69f46eadcdb1b90194e8c5cebd1315))\n\n## [0.8.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.7.2...cc-plugin-v0.8.0) (2026-09-24)\n\n\n### Features\n\n* **fix-plan:** add pipeline log and hook integrity check scripts ([e93a432](https://github.com/es6kr/skills/commit/e93a4323b54a311fcda6855163ffe14c2c146412))\n\n\n### Bug Fixes\n\n* **cc-plugin:** restore missing skills to es6kr plugin in marketplace manifest ([6ab94b0](https://github.com/es6kr/skills/commit/6ab94b0278d626012be3378d44c634621be1fd8b))\n\n## [0.7.2](https://github.com/es6kr/skills/compare/cc-plugin-v0.7.1...cc-plugin-v0.7.2) (2026-09-20)\n\n\n### Bug Fixes\n\n* address code review feedback ([0c08bfb](https://github.com/es6kr/skills/commit/0c08bfbf2b5b737fdce685c8f15ead56c64290f4))\n* **cc-plugin:** eliminate eval-based command injection in dev-reflect.sh ([097aafe](https://github.com/es6kr/skills/commit/097aafea4adcdf39df8c4825d69ea83a66fbd4fa))\n* **cc-plugin:** sync dev-reflect.sh changes into cached plugin version dirs ([#510](https://github.com/es6kr/skills/issues/510)) ([28824f6](https://github.com/es6kr/skills/commit/28824f643b32ab05b766cdf99ddb626ffc5e3f95))\n\n## [0.7.1](https://github.com/es6kr/skills/compare/cc-plugin-v0.7.0...cc-plugin-v0.7.1) (2026-09-18)\n\n\n### Bug Fixes\n\n* **cleanup:** make the session-end report table self-sufficient ([#487](https://github.com/es6kr/skills/issues/487)) ([c4a0255](https://github.com/es6kr/skills/commit/c4a02557fb8de3b32cf337c549f62535dabf824b))\n\n## [0.7.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.6.2...cc-plugin-v0.7.0) (2026-09-06)\n\n\n### Features\n\n* **cc-plugin:** implement post-commit dev-reflect and cache drift guard ([3f78c05](https://github.com/es6kr/skills/commit/3f78c054e7c00e7c33730d3378c5aff6575566e4))\n* **hooks:** migrate standalone hooks into plugin resources and fix test regressions ([d7b0060](https://github.com/es6kr/skills/commit/d7b0060ddffdd4a7b5f4f9751039ee9a79e049db))\n\n## [0.6.2](https://github.com/es6kr/skills/compare/cc-plugin-v0.6.1...cc-plugin-v0.6.2) (2026-09-01)\n\n\n### Bug Fixes\n\n* staging branch next-fix sync into main ([bbbd460](https://github.com/es6kr/skills/commit/bbbd460bf3b6b1cba4c6d07b3641afa734c89860))\n\n## [0.6.1](https://github.com/es6kr/skills/compare/cc-plugin-v0.6.0...cc-plugin-v0.6.1) (2026-08-29)\n\n\n### Bug Fixes\n\n* **cc-plugin:** remove duplicate cache-cleanup.sh from scripts/ ([1a64d24](https://github.com/es6kr/skills/commit/1a64d2421d6b8f42bd149c6c4bb3b1af0b146965))\n* **hook-kit:** resolve RAG receiver from workspace config instead of mandating --rag ([58e85ec](https://github.com/es6kr/skills/commit/58e85ecbb437557544cd528281aa30b804bd2532))\n* **hook-kit:** scope PR-URL bare-ref check to per-number match, allow force-push in worktrees ([dd50dce](https://github.com/es6kr/skills/commit/dd50dced989eed4847daaf9a0cd4be12a04426e1))\n\n## [0.6.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.5.3...cc-plugin-v0.6.0) (2026-08-20)\n\n\n### Features\n\n* promote next-feat staging (lifecycle guards, triage automation, and workflow safety procedures) ([77d58ac](https://github.com/es6kr/skills/commit/77d58ac3a771a4897043c9eea8b149ea1e8ba2ff))\n\n## [0.5.3](https://github.com/es6kr/skills/compare/cc-plugin-v0.5.2...cc-plugin-v0.5.3) (2026-08-17)\n\n\n### Bug Fixes\n\n* **wip:** cross-ref PR-URL and TaskCreate subject repo-qualifier rules ([#186](https://github.com/es6kr/skills/issues/186)) ([4982364](https://github.com/es6kr/skills/commit/49823641a7b08123ebd0325273892bee41bc3280))\n\n## [0.5.2](https://github.com/es6kr/skills/compare/cc-plugin-v0.5.1...cc-plugin-v0.5.2) (2026-08-05)\n\n\n### Bug Fixes\n\n* **wip:** cross-ref PR-URL and TaskCreate subject repo-qualifier rules ([#186](https://github.com/es6kr/skills/issues/186)) ([951c1e6](https://github.com/es6kr/skills/commit/951c1e6871e78e226757c6a7ae5ae53efeb7bfb0))\n\n## [0.5.1](https://github.com/es6kr/skills/compare/cc-plugin-v0.5.0...cc-plugin-v0.5.1) (2026-07-23)\n\n\n### Bug Fixes\n\n* **cc-plugin:** relocate cache-cleanup hook to resources/ and restore exec bit ([810c3d6](https://github.com/es6kr/skills/commit/810c3d6ee0e049c280609a194f90a0cb65118f30))\n* hook relocation + Korean-pattern externalization (cc-plugin, fix, wip) ([f4af5b5](https://github.com/es6kr/skills/commit/f4af5b564b2d43387a5d004f875e56b30a36ce13))\n* **next-fix:** accumulate bug fixes for docxport, wip, fix-plan, and hook-kit ([6eec083](https://github.com/es6kr/skills/commit/6eec083b7fbc429bdabcfcc89d7778b185dd7497))\n\n## [0.5.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.4.2...cc-plugin-v0.5.0) (2026-07-07)\n\n\n### Features\n\n* **cc-plugin:** add troubleshoot topic + expand create guidance ([6df1e6e](https://github.com/es6kr/skills/commit/6df1e6e430d715cdd3adf87e525d5b0f4118e52f))\n* **docxport:** promote initial registration to main ([8265ba3](https://github.com/es6kr/skills/commit/8265ba33b13ab6054c3595943d068f5c1c13625a))\n* **skills:** drift sync bundle — cc-plugin/github-flow/wip/next/check-hangul ([ac5d15d](https://github.com/es6kr/skills/commit/ac5d15d7231e67b3b53cae3861bb6132a2f3beff))\n\n## [0.4.2](https://github.com/es6kr/skills/compare/cc-plugin-v0.4.1...cc-plugin-v0.4.2) (2026-06-30)\n\n\n### Bug Fixes\n\n* **skills:** add procedural guards + standardize description scalar ([#66](https://github.com/es6kr/skills/issues/66)) ([fcc921f](https://github.com/es6kr/skills/commit/fcc921fba3928aad7421ecff888d5dcee5ae5655))\n\n## [0.4.1](https://github.com/es6kr/skills/compare/cc-plugin-v0.4.0...cc-plugin-v0.4.1) (2026-06-25)\n\n\n### Bug Fixes\n\n* apply PR [#62](https://github.com/es6kr/skills/issues/62) AI review findings (14) ([8132a2b](https://github.com/es6kr/skills/commit/8132a2b001fbd10e3db618decf989f8cf84b1b6b))\n* **fix:** split Step 2 medium by content type — case history to failed-attempts.md ([#62](https://github.com/es6kr/skills/issues/62)) ([747b3f9](https://github.com/es6kr/skills/commit/747b3f957ca0fefdbc5044eb08f66b8aafc1e26a))\n\n## [0.4.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.3.0...cc-plugin-v0.4.0) (2026-06-12)\n\n\n### Features\n\n* decompose workflow/git rules + rename web-ui-test→web-browser ([#50](https://github.com/es6kr/skills/issues/50)) ([e10d48f](https://github.com/es6kr/skills/commit/e10d48fea4e507b95888de44812b53484d32128d))\n\n## [0.3.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.2.0...cc-plugin-v0.3.0) (2026-06-03)\n\n\n### Features\n\n* **cc-plugin:** add cache miss assertion guardrail to troubleshoot ([0ab4d27](https://github.com/es6kr/skills/commit/0ab4d27f2719f476ca73948c3767f1889f3e4f8b))\n* **cc-plugin:** import published baseline (ClawHub drumrobot/cc-plugin) ([9658945](https://github.com/es6kr/skills/commit/9658945df431f9a743d7855eab91919d80e58fb6))\n* **cc-plugin:** publish Claude Code plugin lifecycle skill ([012556a](https://github.com/es6kr/skills/commit/012556aaaeae14d5df17f0d202426b10a86d1ab9))\n\n\n### Bug Fixes\n\n* **cc-plugin:** address PR review actionable findings ([2d77ac3](https://github.com/es6kr/skills/commit/2d77ac3289db20dab35110b11ad3e111915aade9))\n* **cc-plugin:** translate remaining Korean phrase to English (CI hangul-check) ([dd3cf99](https://github.com/es6kr/skills/commit/dd3cf998e823d4291c775862c94ba3f6058de746))\n\n\n### Documentation\n\n* **cc-plugin:** add Symlink-Based Dual-Environment Setup troubleshoot section ([916f2be](https://github.com/es6kr/skills/commit/916f2be41fcefe2c9982b6e944f78e6ecdf7202b))\n\n## [0.2.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.1.0...cc-plugin-v0.2.0) (2026-05-24)\n\n\n### Features\n\n* **cc-plugin:** publish Claude Code plugin lifecycle skill ([012556a](https://github.com/es6kr/skills/commit/012556aaaeae14d5df17f0d202426b10a86d1ab9))\n\n\n### Bug Fixes\n\n* **cc-plugin:** address PR review actionable findings ([2d77ac3](https://github.com/es6kr/skills/commit/2d77ac3289db20dab35110b11ad3e111915aade9))\n* **cc-plugin:** translate remaining Korean phrase to English (CI hangul-check) ([dd3cf99](https://github.com/es6kr/skills/commit/dd3cf998e823d4291c775862c94ba3f6058de746))\n\n\n### Documentation\n\n* **cc-plugin:** add Symlink-Based Dual-Environment Setup troubleshoot section ([916f2be](https://github.com/es6kr/skills/commit/916f2be41fcefe2c9982b6e944f78e6ecdf7202b))\n\nFile v0.8.1:clustering.md\n\n# Plugin Clustering Recommendation\n\nScore the **affinity between skills** across the ecosystem and recommend which\nskills should be bundled into a shared plugin. High mutual affinity → ship\ntogether; low affinity → keep standalone. The output of this topic feeds\ndirectly into the [create](./create.md) topic (which becomes the `plugins/<name>`\nmembership list) and the [marketplace](./marketplace.md) topic (where bundled\nplugins are published).\n\n## When to Use\n\n- \"Which of these skills belong in the same plugin?\"\n- Before publishing a plugin bundle — decide membership by signal, not by guesswork\n- After a cluster of skills grows cross-references organically and you want to formalize the boundary\n\n**Pre-flight (MANDATORY)**: before authoring any new scoring/clustering tooling\nhere, run a remote ecosystem search via `Skill(\"skill-kit\", \"route\")` Step 2b\n(this skill's own `find` topic / ClawHub) for an existing affinity/clustering\nskill. Reuse over rebuild applies to this capability too.\n\n## Two Modes — Discovery vs Candidate-set Audit\n\nClustering is invoked in two different shapes. The scoring model is the same;\nthe *scope of iteration* and the *handling of references that point outside\nthat scope* differ. Pick the mode before measuring.\n\n| Mode | Input | Iteration scope | What to do with references to skills outside the scope |\n|------|-------|-----------------|-------------------------------------------------------|\n| **Discovery** | None — scan all installed skills | All `~/.claude/skills/*/` | N/A (scope = universe; nothing is \"outside\") |\n| **Candidate-set audit** | A given list of N skills (e.g., a dependency-diagram subgraph, a proposed plugin's tentative membership) | The N candidates | **Surface separately as cluster-expansion candidates and external-bundle signals** (see \"Outside-set references\" below). Do not silently drop them |\n\nIn audit mode, an edge from candidate A to a non-candidate skill X is a real\nsignal — it means either X belongs in the cluster (expand the candidate set) or\nX is an external dependency the bundle must track (Dim 2-style). Dropping these\nedges by restricting both loops to the candidate set produces an\nunder-recommended cluster.\n\n## Scoring Model\n\nThree dimensions feed a pairwise affinity score. The first two pull skills\n*together*; the third gates whether bundling is *worth it at all*.\n\n| # | Dimension | Weight | Pulls toward | Signal source |\n|---|-----------|--------|--------------|---------------|\n| 1 | Cross-skill topic coupling | High | Bundling A+B | Directed topic→topic references between two skills (`Skill(\"B\", \"topic\")`, `B/topic.md`, `/B <topic>` inside A's topic files) |\n| 2 | Shared external dependency | Medium | Bundling A+B (and/or co-locating the dependency) | `depends-on` overlap, esp. on external skills/plugins (e.g., `superpowers`). Two skills depending on the same external surface have aligned release/version needs |\n| 3 | Command + hook footprint | Low (gate, not pull) | Whether *any* plugin is justified | Count of installed command aliases + `resources/*.sh` hooks + hook criticality (see below). **Low hook footprint lowers the need to convert at all** — a skill that installs no hooks works fine standalone and gains little from plugin packaging |\n\n### Dimension 1 — Cross-skill topic coupling (primary)\n\nThe strongest bundling signal. Count **directed topic-level edges** between every\npair of skills (the same data the dependency graphs are built from). Edge sources\nto extract:\n\n| Edge source | Pattern | Example |\n|-------------|---------|---------|\n| `Skill()` tool call in topic body | `Skill(\"<name>\", \"<topic>\")` | `Skill(\"github-flow\", \"merge\")` |\n| Topic markdown link | `<name>/<topic>.md` | `github-flow/pr.md` |\n| Slash-command reference | `/<name> <topic>` | `/cleanup retrospect` |\n| **Frontmatter `depends-on`** (inline) | `depends-on: [a, b, c]` | `depends-on: [github-flow, tdd]` |\n| **Frontmatter `depends-on`** (YAML block) | `depends-on:` then `  - <name>` lines | `depends-on:\\n  - commit-tidy` |\n\n```bash\n# For skill A, find which other skills its topics reference (topic + depends-on)\n# Patterns are intentionally narrow to avoid false positives from filesystem\n# paths like `org/repo` and shell commands like `/repo remote`.\nSKILLS_DIR=~/.claude/skills\n\nextract_refs() {\n  local A=\"$1\" a; a=$(basename \"$A\")\n  # 1. Skill() tool call — most specific, high precision\n  grep -rhoE 'Skill\\(\"[a-z][a-z-]*\"' \"$A\" 2>/dev/null \\\n    | grep -oE '\"[a-z][a-z-]*\"' | tr -d '\"'\n  # 2. Markdown link to a topic file: require boundary char before <skill>/<topic>.md\n  #    (excludes `/works/group/repo/file.md` style paths)\n  grep -rhoE '(^|[[:space:](\"`./])([a-z][a-z-]+)/([a-z][a-z-]+)\\.md' \"$A\" 2>/dev/null \\\n    | grep -oE '[a-z][a-z-]+/[a-z][a-z-]+\\.md' | cut -d/ -f1\n  # 3. Slash-command reference: require boundary so `~/path/repo remote` is excluded\n  grep -rhoE '(^|[[:space:]\"`(])/[a-z][a-z-]+ +[a-z][a-z-]+' \"$A\" 2>/dev/null \\\n    | grep -oE '/[a-z][a-z-]+' | tr -d '/'\n  # 4. frontmatter depends-on — inline AND YAML block\n  awk '/^---$/{f=!f; next} f' \"$A/SKILL.md\" 2>/dev/null | awk '\n    /^depends-on: *\\[/ { gsub(/.*\\[|\\].*/, \"\"); gsub(/,/, \" \"); print; next }\n    /^depends-on:/    { block=1; next }\n    block && /^  *- / { gsub(/^  *- */, \"\"); print; next }\n    block && /^[^ ]/  { block=0 }\n  '\n}\n\nfor A in \"$SKILLS_DIR\"/*/; do\n  a=$(basename \"$A\")\n  extract_refs \"$A\" | sort -u | while read tok; do\n    [ -d \"$SKILLS_DIR/$tok\" ] && [ \"$tok\" != \"$a\" ] && echo \"$a -> $tok\"\n  done\ndone | sort | uniq -c | sort -rn\n```\n\n**False-positive verification (MANDATORY before publishing results)**: any edge\nthe extractor reports must be confirmed by reading the cited file:line. A skill\nname that also exists as a common shell-command word (`repo`, `next`, `wip`,\n`fix`, `run`) is at high risk of matching a literal path or command fragment.\nFor every outside-set edge in the result, open the source file and verify the\nmatch is a real `Skill()` call, markdown link, slash-command, or `depends-on`\nentry — not `~/path/repo remote`, `gh pr view -R owner/repo`, or similar\nplaceholder. Failing to verify the top hits before reporting will produce a\nworked example that is partly wrong.\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | Trust the grep output for skills whose name is a common word (`repo`, `next`, `wip`, `fix`, `run`) | Open every cited file:line for these skills before classifying. Strip matches that are path placeholders, gh CLI URLs, git command fragments |\n| 2 | Loose patterns like `/[a-z-]+ [a-z-]+` without boundary | Require boundary char (`(^|[[:space:]\"`(])`) before `/` so `~/works/group/repo remote` does not match `/repo remote` |\n| 3 | Pattern `[a-z-]+/[a-z-]+\\.md` against full text | Require boundary before the first segment so `/works/group/repo/file.md` does not look like `repo/file.md` |\n| 4 | Sample-of-1 verification (\"I checked git-repo and the count looked right\") | Sample-of-5+ verification across skills whose names collide with shell words; do not report results until all 5 verify |\n\n- **Score**: `coupling(A,B) = edges(A→B) + edges(B→A)`. Mutual (bidirectional) coupling scores higher than one-way.\n- A `depends-on` declaration that is *also* exercised by an actual topic reference counts double — declared + used.\n\n#### Outside-set references (candidate-set audit mode only)\n\nWhen clustering is run in **audit mode** (Two Modes table above), every edge\n`A → X` where `X` is **not in the candidate set** must be captured and\nclassified, not dropped. There are two valid classifications:\n\n| Classification | When | Action |\n|----------------|------|--------|\n| **Cluster-expansion candidate** | Most candidates in the set reference `X`, OR `X` itself heavily references candidates back (mutual coupling) | Propose adding `X` to the candidate set and re-score. Re-run the audit with the expanded set |\n| **External bundle signal** | Only one or two candidates reference `X`, and `X` doesn't reciprocate (one-way, narrow) | Treat like Dim 2's shared external dep: either vendor `X` into the plugin, or pin `X` as a cross-plugin dependency. Do not pull `X` into the cluster |\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | Restrict both loops to the candidate set and call the result \"the cluster's couplings\" | Iterate inner loop over **all** skills; report inside-set edges as coupling and outside-set edges in a separate \"outside refs\" section |\n| 2 | Treat a single outside reference (e.g., `git-repo → commit-tidy` alone) as noise and discard | Surface it. The user decides if `commit-tidy` should expand the set or be a bundle/dep signal — that decision is part of the audit |\n| 3 | Conflate outside refs with Dim 2 only when **N** candidates share them | Even **1** candidate's outside ref is a signal in audit mode. Dim 2's \"shared\" threshold is about *which dependency to vendor*, not whether the edge exists |\n| 4 | Hide outside refs from the AskUserQuestion options | Add an explicit \"Expand cluster with `<X>`\" option when outside refs cross the cluster-expansion threshold (≥half the candidates reference `X`, or `X` reciprocates) |\n\n### Dimension 2 — Shared external dependency\n\n```bash\n# Map each skill's depends-on (inline OR YAML block), then find shared external dep\nfor S in ~/.claude/skills/*/; do\n  s=$(basename \"$S\")\n  dep=$(awk '/^---$/{f=!f; next} f' \"$S/SKILL.md\" 2>/dev/null | awk '\n    /^depends-on: *\\[/ { gsub(/.*\\[|\\].*/, \"\"); gsub(/,/, \" \"); print; next }\n    /^depends-on:/    { block=1; next }\n    block && /^  *- / { gsub(/^  *- */, \"\"); printf \"%s \", $0; next }\n    block && /^[^ ]/  { block=0; print \"\" }\n    END { if (block) print \"\" }\n  ')\n  [ -n \"$dep\" ] && echo \"$s: $dep\"\ndone\n```\n\nThe parser handles both forms — a skill that uses YAML block style (`depends-on:\\n  - x`) instead of inline `[x, y]` is otherwise silently invisible to Dim 2, and any external-dep shared via the block form gets undercounted.\n\n- Two skills sharing an **external** dependency (a plugin not in this repo — e.g., `superpowers`) score higher than two sharing an internal one, because they must track that external surface's versions together.\n- Output also flags: if N skills all depend on the same external skill, consider whether that external surface should be **vendored into the plugin** (see `skill-kit/portability` topic) rather than left as a cross-plugin dead reference.\n\n### Dimension 3 — Command + hook footprint (the gate)\n\n```bash\n# Per-skill hook + command footprint\nfor S in ~/.claude/skills/*/; do\n  s=$(basename \"$S\")\n  hooks=$(ls \"$S\"/resources/*.sh 2>/dev/null | wc -l | tr -d ' ')\n  cmd=$(ls ~/.claude/commands/\"$s\".md 2>/dev/null | wc -l | tr -d ' ')\n  echo \"$s: hooks=$hooks cmd=$cmd\"\ndone\n```\n\nHook **criticality** weighting (read matcher type from `~/.claude/settings.json`):\n\n| Hook type | Criticality | Plugin-conversion value |\n|-----------|-------------|-------------------------|\n| `PreToolUse` blocking (exit 2 / deny) | High | High — guard machinery benefits from versioned plugin packaging |\n| `SessionStart` context injection | High | High — always-on behavior shipped as a unit |\n| `PostToolUse` warning (non-blocking) | Medium | Medium |\n| `Stop` / `UserPromptSubmit` advisory | Low | Low |\n| No hooks at all | — | **Low — standalone skill is sufficient; do not force a plugin** |\n\nThis dimension does **not** pull two skills together. It scales the final\nrecommendation: a tightly-coupled pair with zero hooks may still be fine as two\nstandalone skills; a pair that also installs critical guard hooks gains real\nvalue from plugin packaging (shared install/version/settings registration).\n\n**Measurement caveat — count by ownership, not keyword match**: a skill's hook\nfootprint is the hooks it *owns* (`<skill>/resources/*.sh`), not every installed\n`~/.claude/hooks/*.sh` whose name matches the skill's domain. An installed hook may be:\n\n- **UNMANAGED / ORPHAN** — no `resources/` owner (a `Skill(\"hook-kit\", \"audit\")` cleanup item, not this skill's footprint)\n- **cross-cutting general guard** — fires on a broad matcher (e.g., \"all UI file edits\", \"any SSH-config Read\") rather than this skill's own workflow\n\nNeither counts toward plugin-conversion value. Verify both ownership and matcher\nscope before crediting a hook to a skill:\n\n```bash\n# OWNERSHIP: resources/ is the source of truth — does this skill own the hook?\nls ~/.claude/skills/<skill>/resources/*.sh 2>/dev/null\n# An installed hook with a domain-matching name but no resources/ owner is\n# UNMANAGED (cross-check `Skill(\"hook-kit\", \"audit\")`) — it is NOT this skill's footprint.\n```\n\n## Forming Clusters\n\n1. Build a pairwise `affinity(A,B) = coupling*w1 + sharedExternalDep*w2` matrix (dimensions 1–2).\n2. Group skills whose mutual affinity exceeds a threshold (transitive: A–B and B–C with no A–C still cluster via B).\n3. **Process outside-set references** (audit mode only — see \"Outside-set references\" subsection): for each `A → X` where `X` is outside the candidate set, classify as cluster-expansion candidate or external-bundle signal. If any `X` qualifies as expansion, surface it as an option *before* finalizing the cluster.\n4. Apply the dimension-3 gate per candidate cluster: compute total hook/command footprint + max criticality. Low footprint → annotate \"bundling optional, standalone OK\"; high-criticality hooks → annotate \"bundling recommended\".\n5. Name each cluster after its highest-coupling hub skill.\n\n## Present Results via AskUserQuestion\n\n```\nAskUserQuestion {\n  question: \"Affinity scoring suggests these plugin clusters. Which should be bundled?\",\n  multiSelect: true,\n  options: [\n    { label: \"Bundle {hub} + {a} + {b}\", description: \"Coupling N edges, shared dep {X}, critical hooks {H} → high value\" },\n    { label: \"Keep {c} standalone\", description: \"Couples to {hub} but installs no hooks → low conversion value\" },\n    { label: \"Vendor {ext} into the plugin\", description: \"M skills share external dep {ext}; bundling avoids dead cross-refs\" }\n  ]\n}\n```\n\nAfter the user selects a cluster, hand off to [create](./create.md) to author\nthe `plugins/<name>/` directory with the chosen membership.\n\n## Optional d3 export — affinity graph dispatch\n\nRender the clustering result as a force-directed d3 graph for visual review of\ncluster boundaries, outside-set bundle signals, and ownership-gate failures.\n**Companion to `skill-kit/graph` Step 4** — both topics expose the same\n`--render=<skill>:<topic>` abstract dispatch contract so a single d3 receiver\ncan render either dependency edges (graph) or affinity-weighted clusters\n(clustering).\n\n### Inputs\n\n| Input | Form | Example |\n|-------|------|---------|\n| Candidate set | list of slugs (audit mode) or omitted (discovery mode) | `code-workflow github-flow consolidate git-repo tdd web-browser` |\n| `--render=<skill>:<topic>` (optional) | abstract dispatch contract for d3 receiver | `--render=es6kr:force-graph` |\n| `--threshold=<N>` (optional) | minimum coupling score to emit a link (default: 1) | `--threshold=2` |\n\n### Nodes / links conversion\n\nThe clustering result (Dim 1/2/3 + outside-set) maps to a `{nodes, links}` JSON\npayload the d3 receiver consumes. Each node carries cluster membership +\nownership-gate metadata so the receiver can color/group consistently with the\naudit decision.\n\n```json\n{\n  \"nodes\": [\n    {\n      \"id\": \"<slug>\",\n      \"cluster\": \"<hub-skill>|standalone|outside\",\n      \"hooks\": <int — owned resources/*.sh count>,\n      \"criticality\": \"high|medium|low|none\",\n      \"role\": \"candidate|outside-bundle-signal|cluster-expansion\"\n    }\n  ],\n  \"links\": [\n    {\n      \"source\": \"<slug>\",\n      \"target\": \"<slug>\",\n      \"value\": <coupling score — Dim 1 inside-set edges A→B + B→A>,\n      \"kind\": \"inside|outside|shared-dep\",\n      \"shared_dep\": \"<external skill name — only when kind=shared-dep>\"\n    }\n  ]\n}\n```\n\nField semantics:\n\n| Field | Source dimension | Notes |\n|-------|------------------|-------|\n| `nodes[].cluster` | Forming Clusters Step 5 | Outside-set bundle signals get `cluster: \"outside\"` so the receiver can hull-separate them from inside-set clusters |\n| `nodes[].hooks` + `nodes[].criticality` | Dim 3 ownership gate | Count `<skill>/resources/*.sh` only — **UNMANAGED / cross-cutting general guards do not count** (per the \"Measurement caveat\" subsection) |\n| `nodes[].role` | Outside-set classification | `candidate` = inside the audit set; `outside-bundle-signal` = single-source narrow outside ref (vendor/pin); `cluster-expansion` = outside ref that crosses the ≥half candidates / reciprocation threshold |\n| `links[].value` | Dim 1 coupling | `value = edges(A→B) + edges(B→A)` — bidirectional coupling sums |\n| `links[].kind` | Mode separation | `inside` = both endpoints in candidate set; `outside` = audit-mode candidate → non-candidate; `shared-dep` = Dim 2 shared external dep edge (synthetic, not a direct `Skill()` call) |\n\n### Dispatch\n\n```bash\n/cc-plugin clustering <slugs> --render=<receiver-skill>:<receiver-topic>\n```\n\nWhen the flag is supplied, the clustering topic invokes the receiver with the\n`{nodes, links}` JSON. The receiver owns the HTML template, force-tuning\ncontrols (charge / link distance / collision radius), and convex-hull rendering\nthat visually groups each cluster. **Do NOT hardcode a specific receiver name**\n— see `skill-kit/portability` Rule B (Generic skills must expose abstract\ndispatch, not vendor-specific calls).\n\nWhen the flag is omitted, the procedure stops at the AskUserQuestion result +\nWorked Example deliverable.\n\n### Don't / Do\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | Hardcode a specific render receiver (e.g., `es6kr:force-graph`) in clustering topic body | Use abstract `--render=<skill>:<topic>` dispatch — caller chooses the receiver (Rule B of `skill-kit/portability`) |\n| 2 | Emit only inside-set links in the JSON payload | Audit mode emits `kind: \"outside\"` links separately so the receiver can hull-separate outside-bundle-signal nodes from inside-set clusters (Outside-set Don't/Do #1) |\n| 3 | Include keyword-matched but UNMANAGED hooks in `nodes[].hooks` count | Count only `<skill>/resources/*.sh` ownership (per the \"Measurement caveat\" subsection) — UNMANAGED / cross-cutting guards inflate plugin-conversion value falsely |\n| 4 | Reuse `skill-kit/graph`'s edge JSON directly as clustering links | Graph emits raw dependency edges; clustering links carry **affinity score** (coupling sums + Dim 2 synthetic edges). They are companion outputs, not interchangeable |\n| 5 | Drop the `--threshold` filter and emit every pair | Default `--threshold=1` filters zero-coupling pairs; raise the threshold when the graph is dense (audit mode with many outside refs) so visualization stays legible |\n\n### Outputs\n\n| Output | Always | When `--render` |\n|--------|--------|------------------|\n| AskUserQuestion options (clusters + outside-set decisions) | ✅ | ✅ |\n| Worked Example summary table (Cluster / Members / Rationale) | ✅ | ✅ |\n| `{nodes, links}` JSON payload | — | ✅ |\n| d3 force-directed graph (via receiver) | — | ✅ |\n\n### Self-check (before invoking dispatch)\n\n1. Did the audit run produce a final cluster assignment (Forming Clusters Step 5)? — dispatch must follow scoring, not precede it\n2. Are outside-set edges classified per \"Outside-set references\" (cluster-expansion vs external-bundle-signal) before mapping to `nodes[].role`?\n3. Is the dispatch flag abstract (`--render=<skill>:<topic>`) — no hardcoded receiver in topic body?\n4. Does the JSON payload schema match the receiver's contract? Receivers may extend the schema, but the four fields above (`cluster`, `hooks`, `criticality`, `role` on nodes; `value`, `kind` on links) are MANDATORY for hull/color/size mapping\n5. Is `--threshold` set appropriately for graph density? Discovery mode often needs `--threshold=2+` to avoid hairball\n\n## Worked Example — code-workflow dependency cluster\n\nApplying the model in **candidate-set audit mode** to the skills in the\ncode-workflow dependency graph (code-workflow, github-flow, tdd, web-browser,\nconsolidate, git-repo; superpowers external).\n\n- **Dim 1 (coupling — inside-set, grep + diagram edges)**: github-flow ↔ consolidate = 11 (gf→co 8 Step-9 follow-up, co→gf 3) strongest bidirectional; code-workflow ↔ github-flow = 5+ (companion/deps/plan-to-issue/pr/merge, depends-on both ways); code-workflow→tdd 2, →web-browser 1, consolidate→git-repo 1 (depends-on, one-way).\n- **Dim 1 (outside-set references — audit-mode surfacing)**: `git-repo → commit-tidy` (frontmatter `depends-on`, one-way, narrow); `consolidate/next → next` and `→ wip` (`Skill()` calls, one-way, narrow). None of `commit-tidy / next / wip` are in the candidate set, and each reference is single-source + non-reciprocated → classify as **external bundle signal** (Dim 2-style), not cluster-expansion candidate. The bundle either vendors them or pins them as cross-plugin deps. Without the Outside-set Don't/Do #2 rule, these edges would have been silently dropped by inner-loop restriction.\n- **Dim 2 (shared external dep)**: code-workflow, consolidate, github-flow all pull `superpowers` → bundling signal.\n- **Dim 3 (ownership gate)**: code-workflow owns 1 hook, consolidate owns 1; github-flow / tdd / web-browser / git-repo own 0. tdd/web-browser/git-repo matched `ui-change`/`ssh-config` installed hooks by keyword, but those are **UNMANAGED cross-cutting guards** → footprint 0 (per the caveat above).\n\n**Result:**\n\n| Cluster | Members | Rationale |\n|---------|---------|-----------|\n| Core PR-workflow plugin (hub = github-flow) | code-workflow + github-flow + consolidate | strong bidirectional coupling + shared `superpowers` + owns guard hooks |\n| Standalone | tdd, web-browser, git-repo | depends-on targets but one-way + zero **owned** hooks → Dim-3 gate keeps them standalone |\n| External bundle signals (vendor or pin) | superpowers (shared by 3 — Dim 2), commit-tidy (narrow from git-repo `depends-on`), next + wip (narrow from `consolidate/next` `Skill()` handoff) | Dim 2 + outside-set surfacing |\n\nTwo discriminators kept the cluster honest:\n- **Dim-3 ownership gate** for tdd/web-browser/git-repo (heavily referenced but own no hooks → standalone).\n- **Outside-set surfacing** for `commit-tidy`, `next`, `wip` (would have been dropped by inner-loop restriction — the audit must report them as bundle signals even though no inside-set member matches).\n\n## Notes\n\n- Affinity scoring is a **recommendation aid**, not an automatic action — never create/move a plugin without the AskUserQuestion above.\n- Dimension 3 is the discriminator most often ignored: do not recommend a plugin for a coupled pair that installs no hooks/commands and gains nothing from packaging.\n- Reuse the cross-skill edge data already produced for dependency diagrams if one exists (e.g., `~/.agents/docs/skill-dependencies*.md`) instead of recomputing.\n\nFile v0.8.1:create.md\n\n# Plugin Creation\n\nGuide for authoring Claude Code plugins.\n\n## Structure\n\n```\nplugin-name/\n├── .claude-plugin/\n│   └── plugin.json          # Required: plugin metadata\n├── commands/                 # Slash commands (optional)\n│   └── my-command.md\n├── agents/                   # Specialized agents (optional)\n│   └── my-agent.md\n├── skills/                   # Agent Skills (optional)\n│   └── my-skill/\n│       └── SKILL.md\n├── hooks/                    # Event handlers (optional)\n├── .mcp.json                 # MCP server config (optional)\n└── README.md\n```\n\n## plugin.json\n\n```json\n{\n  \"name\": \"plugin-name\",\n  \"description\": \"What the plugin does\",\n  \"version\": \"1.0.0\",\n  \"author\": {\n    \"name\": \"Author Name\",\n    \"email\": \"email@example.com\"\n  }\n}\n```\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `name` | string | yes | Lowercase, hyphens only. Must match directory name |\n| `description` | string | yes | Plugin functionality description |\n| `version` | string | yes | Semver (e.g., \"1.0.0\") |\n| `author.name` | string | no | Author name |\n| `author.email` | string | no | Author email |\n\n## Marketplace entry: narrowing components with `strict`\n\nA marketplace.json plugin entry may point `source` at a directory that already\n**auto-discovers** components (`commands/`, `agents/`, `skills/`, `hooks/`). This is\ncommon with `source: \"./\"`, where the repo root is the marketplace root and its\n`skills/` directory is auto-discovered.\n\nWhen such an entry *also* lists explicit component paths (`skills`, `hooks`,\n`commands`, `agents`) — typically to expose only a **subset** of what the source root\nholds — you MUST set `\"strict\": true` on the entry. `strict: true` makes the\nmarketplace entry the **authoritative** component source: the explicit paths take\nover and only the listed components load.\n\nWith the default `strict: false`, the explicit paths and the auto-discovered\ncomponents are treated as two competing manifests → Claude Code rejects the plugin\nwith a `conflicting manifests` load error (see `troubleshoot.md`).\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | Add `skills`/`hooks` paths to a `source: \"./\"` entry and leave `strict` unset (defaults to false) | Set `\"strict\": true` so the entry's component list is authoritative |\n| 2 | Resolve the resulting conflict by deleting the entry's component paths | Deleting them re-broadens the plugin to the whole auto-discovered set (e.g., the entire `skills/` collection) — the opposite of the narrowing intent. Use `strict: true` instead |\n| 3 | Assume two plugins sharing `source: \"./\"` can each auto-discover a different subset | Auto-discovery yields the same full set for both. The narrowed plugin must declare explicit paths **and** `strict: true` |\n\nExample — expose only one skill plus its hooks from a multi-skill repo root:\n\n```jsonc\n{\n  \"name\": \"ralph\",\n  \"source\": \"./\",\n  \"skills\": [\"./skills/ralph\"],   // narrowed subset\n  \"hooks\": { /* SessionStart / PreToolUse ... */ },\n  \"strict\": true                   // entry is authoritative — required when narrowing on an auto-discovering source\n}\n```\n\n## Validation Checklist\n\n- [ ] `.claude-plugin/plugin.json` exists\n- [ ] `name` matches directory name\n- [ ] `version` is valid semver\n- [ ] All component files have frontmatter\n- [ ] README.md present\n\n## Plugin Locations\n\n| Location | Purpose |\n|----------|---------|\n| `~/.claude/plugins/my-plugin/` | Personal |\n| `.claude/plugins/my-plugin/` | Project-scoped |\n\nFile v0.8.1:dev-reflect.md\n\n# Dev Reflect\n\nReflect a **local dev source repo**'s plugin/skill changes directly into the **registered Claude Code marketplace clone** (`~/.claude/plugins/marketplaces/<marketplace>/`) for local testing **before** commit/push.\n\n## When to Use\n\n- You develop a skill/plugin in a local source repo (e.g. `~/ghq/github.com/<org>/<repo>`) and want to test it in this Claude Code install before pushing to GitHub.\n- The marketplace clone is normally synced from GitHub by Claude Code. This bypasses that round-trip for fast local iteration.\n- A new skill/topic/hook is not detected because the clone (and `~/.claude/skills/`) does not yet contain it.\n\n## Direction\n\n```\ndev source repo (SoT)                 registered marketplace clone (test target)\n~/ghq/github.com/<org>/<repo>   ──►   ~/.claude/plugins/marketplaces/<marketplace>/\n  .claude-plugin/marketplace.json       .claude-plugin/marketplace.json  (plugin entries upserted)\n  skills/ agents/ commands/ hooks/      skills/ agents/ commands/ hooks/  (synced)\n```\n\nThe source repo is the source of truth. The clone is a disposable test target — a later GitHub re-sync overwrites it.\n\n## Precondition — the clone must not be the source repo itself (HARD STOP)\n\nSome setups register the marketplace by **symlinking it at the source repo**:\n\n```bash\n$ ls -ld ~/.claude/plugins/marketplaces/<marketplace>\nlrwxr-xr-x ... ~/.claude/plugins/marketplaces/<marketplace> -> ~/ghq/github.com/<org>/<repo>\n```\n\nWhen that holds, `--source` and the clone resolve to the **same repository**, and step 1's\n`rsync -a --delete` overwrites the very checkout you develop in — removing every file the\nchecked-out branch has but `--source` does not. If that checkout sits on an unrelated feature\nbranch, this destroys its work.\n\nCheck before every run:\n\n```bash\nCLONE=$(cd ~/.claude/plugins/marketplaces/<marketplace> && pwd -P)\nSRC=$(git -C <source> rev-parse --show-toplevel)\nSRC_ROOT=$(git -C <source> rev-parse --path-format=absolute --git-common-dir | sed 's|/\\.git$||')\n[ \"$CLONE\" = \"$SRC\" ] || [ \"$CLONE\" = \"$SRC_ROOT\" ] && echo \"SAME REPO — do not run dev-reflect\"\n```\n\nA **git worktree of the same repo also counts as \"same\"**: its `--show-toplevel` differs from\nthe clone, so a naive comparison passes, yet the clone still points at the main checkout and\nthe `--delete` still lands on another branch's tree. Compare against the common git dir too,\nas above.\n\n**When they are the same, dev-reflect has nothing to do.** The plugin already loads from the\nsource repo, so the active hook/skill files are simply whatever the checked-out branch holds.\nLand the change on that branch (merge the PR, or check the branch out) instead of copying.\n\nConfirm which path is genuinely active from the plugin's own artifacts — e.g. a hook's debug-log\nmtime — rather than assuming `plugins/cache/`. A cache copy can sit untouched for weeks while\nthe symlinked repo path is the one actually executing.\n\n## Usage\n\n```bash\nnode_or_bash=\"$HOME/.claude/skills/cc-plugin/scripts/dev-reflect.sh\"\nbash \"$node_or_bash\" \\\n  --source ~/ghq/github.com/<org>/<repo> \\\n  --marketplace <marketplace-name> \\\n  [--enable <plugin-name>] \\\n  [--dry-run]\n```\n\n| Flag | Meaning |\n|------|---------|\n| `--source` | Local dev repo (must have `.claude-plugin/marketplace.json`) |\n| `--marketplace` | Clone name under `~/.claude/plugins/marketplaces/` (the registered marketplace name) |\n| `--enable` | Optional. Enable `<plugin>@<marketplace>` in `settings.json` (backup written) |\n| `--dry-run` | Print actions without writing |\n\nFind the marketplace name: `jq -r '.name' ~/.claude/plugins/marketplaces/<dir>/.claude-plugin/marketplace.json`, or check `extraKnownMarketplaces` in `settings.json`.\n\n## What It Does\n\n1. **Sync component dirs** (`skills/ agents/ commands/ hooks/ plugins/`) source → clone (`rsync --delete` when available, else additive `cp -r`).\n2. **Upsert** the source's `marketplace.json` plugin entries into the clone by name — clone-only entries are preserved, matching/new entries from source override/add.\n3. **`chmod +x`** synced hook scripts.\n4. **Optional enable** the plugin in `settings.json` (with `settings.json.bak-dev-reflect` backup).\n5. **Print the 4-step plugin-activation verification + reload reminder.**\n\n## Don't / Do\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | Conclude \"works\" right after the clone is patched | Plugins load at session start. Restart / new session, then verify Skill-tool detection (step 4 stays \"NEXT SESSION\") |\n| 2 | Treat the clone edit as durable | Clone edits are a test shortcut; a GitHub re-sync overwrites them. Commit/push the source repo to persist |\n| 3 | Enable both the bundling plugin (`source: \"./\"`) and a sub-plugin that re-declares the same skill | Enable one. Two enabled plugins declaring the same skill name collide |\n| 4 | Overwrite the clone's `marketplace.json` wholesale | Upsert by plugin name (the script does this) so a divergent clone keeps its own entries |\n| 5 | Skip the backup when touching `settings.json` | `--enable` writes `settings.json.bak-dev-reflect` first; keep it until verified |\n| 6 | Run dev-reflect when the marketplace entry is a symlink to the source repo | Resolve both paths first (see Precondition). Identical → the reflect is unnecessary *and* destructive: land the change on the checked-out branch instead |\n\n## Verification (after reload)\n\n1. **Skill detected** — the skill appears in the available-skills list, or `Skill(\"<name>\")` resolves.\n2. **SessionStart hooks** — guard/inject markers appear in the session's `additionalContext`.\n3. **PreToolUse hooks** — the declared matcher fires on the target tool.\n\n## Manual Fallback\n\nIf the script is unavailable, the same effect, done by hand:\n\n```bash\nSRC=~/ghq/github.com/<org>/<repo>\nCLONE=~/.claude/plugins/marketplaces/<marketplace>\ncommand cp -r \"$SRC/skills/.\" \"$CLONE/skills/\"\nRALPH=$(jq '.plugins[] | select(.name==\"<plugin>\")' \"$SRC/.claude-plugin/marketplace.json\")\njq --argjson r \"$RALPH\" '.plugins += [$r]' \"$CLONE/.claude-plugin/marketplace.json\" > /tmp/mp && command cp /tmp/mp \"$CLONE/.claude-plugin/marketplace.json\"\njq '.enabledPlugins[\"<plugin>@<marketplace>\"] = true' ~/.claude/settings.json > /tmp/s && command cp /tmp/s ~/.claude/settings.json\n```\n\n## Relation to Other Topics\n\n- `marketplace` — clone/list/update marketplace repos (GitHub → clone). dev-reflect is the reverse, local-only test path (dev repo → clone).\n- `troubleshoot` — if a reflected plugin still does not load after reload (cache miss / load error), route there.\n\nFile v0.8.1:hud.md\n\n# OMC HUD Statusline Configuration\n\nConfigure the Oh My Claudecode (OMC) HUD statusline that renders via `~/.claude/hud/omc-hud.mjs`.\n\n## When to Use\n\n- Hide the `[OMC#x.x.x]` version label in the statusline\n- Toggle individual HUD segments (ralph, autopilot, agents, todos, contextBar, etc.)\n- Switch HUD presets (`minimal`, `focused`, `full`, `dense`, `analytics`, `opencode`)\n- Tune color thresholds for context usage warnings\n- Diagnose HUD output anomalies before reaching for the wrapper sed fallback\n\n## Anatomy\n\nThe HUD pipeline has three layers:\n\n```\n~/.claude/settings.json (statusLine.command)\n  └─→ ~/.claude/hud/omc-hud.mjs (wrapper, resolves dist source)\n        └─→ ~/.claude/plugins/cache/omc/oh-my-claudecode/<version>/dist/hud/index.js (renderer)\n```\n\nThe wrapper picks `dist/hud/index.js` in this priority order:\n\n1. Dev paths (only when `OMC_DEV=1`)\n2. Plugin cache under `~/.claude/plugins/cache/omc/oh-my-claudecode/<version>/`\n3. Global `oh-my-claudecode` npm install\n\nIf no source is found, the wrapper prints a `[OMC HUD]` diagnostic and exits.\n\n## Configuration Methods\n\n### A. Official `omcHud` block in settings.json\n\nPlace under the top-level `omcHud` key in `~/.claude/settings.json` (newer HUD versions read this block). The block below lists every documented key with its default and effect — toggle the ones you want and delete the rest, or paste the whole catalog and edit values in place.\n\n```jsonc\n{\n  \"omcHud\": {\n    \"preset\": \"focused\",                 // bulk selector: \"minimal\" | \"focused\" | \"full\" | \"dense\" | \"analytics\" | \"opencode\"\n    \"elements\": {\n      \"omcLabel\": true,                  // [OMC#x.x.x] version prefix at the start of the line  → set false to hide\n      \"ralph\": true,                     // Ralph autonomous-loop counter (e.g. \"ralph:3/10\")\n      \"autopilot\": true,                 // Autopilot mode indicator\n      \"prdStory\": true,                  // current PRD / story id (e.g. \"US-002 (2/5)\")\n      \"activeSkills\": true,              // names of skills currently in scope\n      \"lastSkill\": true,                 // last invoked skill name\n      \"contextBar\": true,                // visual bar showing ctx-window usage\n      \"agents\": true,                    // spawned agent panel\n      \"agentsFormat\": \"multiline\",       // agents layout: \"multiline\" | \"inline\"\n      \"backgroundTasks\": true,           // background task counter (e.g. \"bg:3/5\")\n      \"todos\": true,                     // todo counter (e.g. \"todos:2/5\")\n      \"thinking\": true,                  // thinking-mode indicator\n      \"thinkingFormat\": \"text\",          // thinking style: \"text\" | \"icon\"\n      \"permissionStatus\": false,         // current permission-mode badge\n      \"apiKeySource\": false,             // source of the active API key\n      \"profile\": true,                   // profile name segment\n      \"promptTime\": true,                // last prompt timestamp\n      \"sessionHealth\": true,             // session health dot (green/yellow/red)\n      \"useBars\": true,                   // render bars instead of plain percentages\n      \"showCallCounts\": true,            // include \"5h:14%\" style call-count rates\n      \"callCountsFormat\": \"auto\",        // rate format: \"auto\" | \"compact\" | \"verbose\"\n      \"safeMode\": true,                  // honor terminal-width / unicode-safe rendering\n      \"maxOutputLines\": 4                // hard cap on multi-line panel height\n    },\n    \"thresholds\": {\n      \"contextWarning\": 70,              // % → yellow tint on the context bar\n      \"contextCompactSuggestion\": 80,    // % → hint to run /compact\n      \"contextCritical\": 85,             // % → red tint\n      \"ralphWarning\": 7                  // ralph loop count → yellow tint\n    },\n    \"staleTaskThresholdMinutes\": 30,     // minutes since last task update → mark stale\n    \"contextLimitWarning\": {\n      \"threshold\": 80,                   // % at which the warning fires\n      \"autoCompact\": false               // run /compact automatically when threshold hit\n    }\n  }\n}\n```\n\nMinimal form (only override the keys you care about — newer HUD versions merge missing keys from the defaults above):\n\n```jsonc\n{\n  \"omcHud\": {\n    \"elements\": {\n      \"omcLabel\": false                  // hide the [OMC#x.x.x] prefix\n    }\n  }\n}\n```\n\nMost-toggled keys at a glance:\n\n| Key | Effect |\n|-----|--------|\n| `elements.omcLabel` | `[OMC#x.x.x]` version prefix |\n| `elements.ralph` | Ralph loop counter |\n| `elements.contextBar` | Context-usage bar |\n| `elements.todos` | Todo counter |\n| `elements.agents` | Spawned agent panel |\n| `preset` | Bulk-select a curated element set |\n\n### B. Compact alias under `omcHud` (older HUD builds)\n\nSome HUD versions consume a smaller schema (path-segment elements only). Use this when method A keys are not recognized but the block itself is.\n\n```jsonc\n{\n  \"omcHud\": {\n    \"preset\": \"focused\",                 // bulk selector: \"minimal\" | \"focused\" | \"full\" | \"dense\" | \"analytics\" | \"opencode\"\n    \"elements\": {\n      \"cwd\": true,                       // current working directory segment\n      \"gitRepo\": true,                   // git repo name segment\n      \"gitBranch\": true,                 // git branch segment\n      \"showTokens\": true,                // token usage segment\n      \"contextBar\": true,                // visual context-usage bar\n      \"agents\": true,                    // spawned agent panel\n      \"todos\": true,                     // todo counter\n      \"ralph\": true,                     // Ralph loop counter\n      \"autopilot\": true                  // autopilot indicator\n    },\n    \"maxWidth\": 120,                     // hard cap on total statusline width\n    \"wrapMode\": \"truncate\"               // overflow handling: \"truncate\" | \"wrap\"\n  }\n}\n```\n\n### C. Wrapper sed fallback (when settings.json schema rejects `omcHud`)\n\nClaude Code's `settings.json` schema may not yet include `omcHud` as a known field, causing post-edit validation errors (`Unrecognized field: omcHud`). In that case, post-process the wrapper output instead.\n\nPatch `~/.claude/hud/omc-hud.mjs` to strip the OMC label from stdout while preserving the rest of the statusline:\n\n```bash\n# Pipe the wrapper through sed in settings.json\n\"statusLine\": {\n  \"type\": \"command\",\n  \"command\": \"node $HOME/.claude/hud/omc-hud.mjs | sed -E 's/\\\\x1b\\\\[1m\\\\[OMC#[^]]*\\\\]\\\\x1b\\\\[0m[[:space:]]*//'\"\n}\n```\n\nThe sed expression removes the bolded `[OMC#...]` ANSI sequence plus the trailing space. Adjust the pattern if the wrapper changes how the label is escaped.\n\n### D. Disable HUD entirely\n\n```jsonc\n{\n  \"statusLine\": {\n    \"type\": \"command\",\n    \"command\": \"true\"\n  }\n}\n```\n\nThe built-in Claude Code statusline takes over (cwd + model summary).\n\n## Version Compatibility Notes\n\n| HUD source | `omcHud` config support |\n|------------|-------------------------|\n| `dist/hud/index.js` in current plugin cache | Verify with `grep -o \"omcHud\" ~/.claude/plugins/cache/omc/oh-my-claudecode/*/dist/hud/index.js` |\n| Source returns 0 hits | HUD version does not consume `omcHud` — use method C (wrapper sed) or upgrade |\n| Source returns matches | Method A / B should work after the next session start |\n\n**HUD 4.9.1** (verified 2026-05-16): `dist/hud/index.js` contains **no `omcHud` references**. Method A/B require an upgraded build; until then use method C.\n\n## Diagnostics\n\n```bash\n# Verify the wrapper output as Claude Code would receive it\necho '{\"workspace\":{\"current_dir\":\"'\"$PWD\"'\"},\"model\":{\"display_name\":\"Opus\",\"id\":\"claude-opus-4-7\"}}' \\\n  | node ~/.claude/hud/omc-hud.mjs\n\n# Inspect HUD source for known config keys\nHUD=~/.claude/plugins/cache/omc/oh-my-claudecode/*/dist/hud/index.js\ngrep -oE 'omcHud[A-Za-z]*|OMC_[A-Z_]+' $HUD | sort -u\n\n# Force the dev path (when iterating on HUD source locally)\nOMC_DEV=1 node ~/.claude/hud/omc-hud.mjs\n```\n\nIf the wrapper prints `[OMC HUD] Plugin installed but not built`, follow `troubleshoot.md` \"Plugin HUD load failed — npm install && npm run build\".\n\n## Do & Don't\n\n| # | Don't (forbidden) | Do (correct alternative) |\n|---|-------------------|-----------------------|\n| 1 | Edit `dist/hud/index.js` (minified) directly | Configure via `omcHud` settings or wrap with sed/awk |\n| 2 | Delete `~/.claude/hud/omc-hud.mjs` to \"hide OMC\" | Keep the wrapper; either configure `omcHud` or swap the `statusLine.command` |\n| 3 | Add `omcHud` block then ignore the schema validation error | If `Unrecognized field: omcHud` appears, fall back to method C (wrapper sed) — do not silently leave the unrecognized key |\n| 4 | Set `OMC_DEV=1` permanently in user env | Use it only during HUD source iteration; remove afterward |\n\n## Related\n\n- `cache.md` — clean stale `temp_*` directories before debugging HUD source paths\n- `marketplace.md` — update the `omc` marketplace to pull newer HUD builds\n- `troubleshoot.md` — HUD source missing or unbuilt\n\nFile v0.8.1:marketplace.md\n\n# Marketplace Management\n\nClone, list, and update plugin marketplace repositories.\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `clone <url>` | Clone a GitHub repo into marketplaces directory |\n| `list` | List installed marketplaces with remote URLs |\n| `update [name]` | Git pull one or all marketplaces |\n\n## Paths\n\n```\n~/.claude/plugins/marketplaces/<name>/\n```\n\n## clone\n\n```bash\ngit clone <url> ~/.claude/plugins/marketplaces/<repo-name>\n```\n\n- Extracts repo name from URL (last path segment, strips .git)\n- If already exists → AskUserQuestion (overwrite or cancel)\n\n## list\n\n```bash\n# For each marketplace directory\ngit -C <dir> remote get-url origin\n```\n\nOutput format:\n\n```\n| Name | Remote URL | Last Updated |\n|------|------------|--------------|\n```\n\n## update\n\n```bash\n# Single marketplace\ngit -C ~/.claude/plugins/marketplaces/<name> pull\n\n# All marketplaces\nfor dir in ~/.claude/plugins/marketplaces/*/; do\n  git -C \"$dir\" pull\ndone\n```\n\nAfter update: restart Claude Code to reload cached plugins.\n\nFile v0.8.1:skill-card.md\n\n## Description:\n\nGuides Claude Code plugin creation, marketplace maintenance, cache cleanup, local development sync, configuration, and troubleshooting.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[drumrobot](https://clawhub.ai/user/drumrobot)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nClaude Code plugin developers and maintainers use this skill to plan plugin bundles, create and test plugins, maintain marketplace installations, and diagnose plugin failures.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Helper scripts can modify plugin caches and persistent Claude Code settings.\n\nMitigation: Review changes first with --dry-run; back up settings and plugin cache content before syncing or cleanup, and use --enable only when intended.\n\nRisk: Insufficient path-scope safeguards can affect unintended files during sync or cleanup.\n\nMitigation: Run scripts only against trusted local repositories and marketplace metadata, and verify source and target paths before applying changes.\n\n## Reference(s):\n\n- [ClawHub cc-plugin release](https://clawhub.ai/drumrobot/skills/cc-plugin)\n- [Plugin authoring guide](create.md)\n- [Local development sync guide](dev-reflect.md)\n- [Plugin troubleshooting guide](troubleshoot.md)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, Configuration instructions, Code]\n\n**Output Format:** [Markdown with command and configuration examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [None]\n\n## Skill Version(s):\n\n0.8.1 (source: ClawHub release and bundled changelog)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v0.8.1:troubleshoot.md\n\n# Plugin Troubleshooting\n\nDiagnose and fix plugin installation failures, cache sync issues, and HUD errors.\n\n## Common Issues\n\n### \"Plugin not installed\" / HUD Error\n\n**Cause**: Cache directory missing or incomplete.\n\n**Diagnosis**:\n\n```bash\n# Check marketplace exists (plugin lives under marketplaces/<marketplace>/plugins/<plugin-name>/)\nls ~/.claude/plugins/marketplaces/<marketplace>/plugins/<plugin-name>/\n\n# Check cache exists\nls ~/.claude/plugins/cache/<marketplace>/<plugin-name>/\n\n# Check for built dist (required for HUD plugins)\nls ~/.claude/plugins/cache/<marketplace>/<plugin-name>/<version>/dist/hud/index.js\n```\n\n**Fix — Sync marketplace to cache**:\n\n```bash\nMARKET=~/.claude/plugins/marketplaces/<marketplace>/plugins/<plugin-name>\nCACHE=~/.claude/plugins/cache/<marketplace>/<plugin-name>/<version>\n\nmkdir -p \"$CACHE\"\n\n# Copy essential directories\nfor item in .claude-plugin .mcp.json agents CLAUDE.md dist hooks scripts skills; do\n  [ -e \"$MARKET/$item\" ] && cp -r \"$MARKET/$item\" \"$CACHE/\"\ndone\n```\n\nAfter syncing: **restart Claude Code** (cache loads at session start).\n\n### Plugin recognized but skills/commands not loading\n\n**Cause**: `.claude-plugin/plugin.json` missing from cache.\n\n```bash\ncp -r ~/.claude/plugins/marketplaces/<marketplace>/plugins/<name>/.claude-plugin \\\n      ~/.claude/plugins/cache/<marketplace>/<name>/<version>/\n```\n\n### \"Plugin X has conflicting manifests\" — load error\n\n**Symptom** (shown by `/plugin`, `/reload-plugins`, or `/doctor`):\n\n```\nPlugin <name> has conflicting manifests: both plugin.json and marketplace entry\nspecify components. Set strict: true in marketplace entry or remove component\nspecs from one location\n```\n\n**Cause**: The plugin's marketplace.json entry lists explicit component paths\n(`skills`, `hooks`, `commands`, `agents`) while its `source` directory *also*\nauto-discovers components — e.g. `source: \"./\"` whose root holds a `skills/`\ndirectory. With the default `strict: false`, the explicit paths and the\nauto-discovered components are two competing manifests.\n\n**Diagnosis**:\n\n```bash\nMP=~/.claude/plugins/marketplaces/<marketplace>/.claude-plugin/marketplace.json\n# 1. Does the entry specify component paths?\ngrep -nE '\"(skills|hooks|commands|agents)\"' \"$MP\"\n# 2. Does the source root auto-discover components? (source: \"./\" + a skills/ dir, etc.)\nls ~/.claude/plugins/marketplaces/<marketplace>/{skills,hooks,commands,agents} 2>/dev/null\n```\n\n**Fix — set `strict: true` on the entry** (makes the entry authoritative; only its\nlisted components load):\n\n```jsonc\n{\n  \"name\": \"<plugin>\",\n  \"source\": \"./\",\n  \"skills\": [\"./skills/<one>\"],\n  \"strict\": true        // ← was false / absent\n}\n```\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | \"Fix\" it by removing the entry's `skills`/`hooks` paths | Removing them re-broadens the plugin to the whole auto-discovered collection (e.g. the entire `skills/`). Set `strict: true` to keep the narrowed set |\n| 2 | Edit only the cache marketplace.json | Edit **both** the cache (loaded copy) and the source repo's marketplace.json (canonical) — otherwise the next sync reverts it (see [dev-reflect.md](./dev-reflect.md)) |\n\nAfter editing run `/reload-plugins` (or restart) — the `conflicting manifests` line\ndisappears and the entry's hooks/skills load. Authoring rule + example:\n[create.md](./create.md) \"Marketplace entry: narrowing components with `strict`\".\n\n### Plugin HUD load failed — \"npm install && npm run build\"\n\n**Cause**: `dist/` not built. Plugin has TypeScript source that needs compilation.\n\n```bash\ncd ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>\nnpm install && npm run build\n```\n\n### MCP servers not connecting after plugin install\n\n**Cause**: `.mcp.json` not in cache.\n\n```bash\ncp ~/.claude/plugins/marketplaces/<marketplace>/plugins/<name>/.mcp.json \\\n   ~/.claude/plugins/cache/<marketplace>/<name>/<version>/\n```\n\n### Update succeeds but leaves orphaned `temp_git_*` directories (WSL and other slower-I/O hosts)\n\n**Symptom**: `claude plugin marketplace update` or `claude plugin update <plugin>` reports success\n(the new version downloads/clones fine), but a `temp_git_*` directory is left sitting at the top\nlevel of `~/.claude/plugins/cache/` (a sibling of the normal `<marketplace>` directories, not\nnested inside one) instead of being swapped into place as `<marketplace>`.\n\n**Diagnosis**:\n\n```bash\nfind ~/.claude/plugins/cache -maxdepth 1 -iname \"temp_git_*\"\n```\n\nAny hits mean a previous update's clone-then-swap step did not complete — the new version was\nstaged into a `temp_git_*` scratch directory, but deleting the old cache directory to make room\nfor it failed partway through.\n\n**Root cause**: the swap itself happens inside the closed-source `claude` CLI binary, so it cannot\nbe diagnosed or patched from a plugin. It has been reported more often on WSL2 than on native\nLinux/macOS; plausible contributors include WSL2's ext4-on-VHDX I/O being slower/burstier than a\nnative filesystem, and multiple concurrent Claude Code sessions holding the same plugin's files\nopen while an update tries to replace them. **Ruled out**: a cross-filesystem (`EXDEV`) rename\nbetween a `/tmp` staging area and `~/.claude/plugins/cache` — on a single-mount WSL install both\npaths resolve to the same `ext4` device (`df -T /tmp ~/.claude/plugins/cache`), so there is no\nfilesystem boundary to blame there. Treat this as an upstream timing issue to work around, not a\ncc-plugin bug to fix at the source.\n\n**Fix / mitigation**:\n\n1. The `cc-plugin` plugin's own `SessionStart` hook (`resources/cache-cleanup.sh`) already deletes\n   stale `temp_git_*` directories (and superseded version directories) on every session start —\n   this clears the debris but does not fix the swap itself.\n2. If you notice the symptom mid-session, re-run the update (`claude plugin marketplace update` /\n   `claude plugin update <plugin>`) after the next session start — the retry usually succeeds once\n   the stale directory is out of the way.\n3. If it recurs on the same plugin repeatedly, close other Claude Code sessions/windows before\n   updating (a session holding the plugin loaded is one plausible contributor), and run\n   `claude doctor` to rule out an unrelated installation issue.\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | Treat the SessionStart sweep's silence as proof the problem is gone for good | The sweep hides the *debris*, not the *cause*. If `temp_git_*` keeps reappearing across sessions, that recurrence is worth reporting, not routine noise — `cache-cleanup.sh` prints a warning line with a count when it finds one, specifically so this doesn't go unnoticed |\n| 2 | Assume the swap failure is an `EXDEV` cross-filesystem rename issue by default | Check first: `df -T` the staging path and the cache path. On a single-mount WSL install (one `ext4` root) there is no filesystem boundary to blame |\n| 3 | Try to find the exact bug by disassembling the compiled `claude` binary | It is a closed, compiled (bun/Node SEA) binary — not practical to patch or reliably reverse-engineer from a plugin. Treat it as a black box; work around it from the plugin side only |\n\n#### Violation case (2026-10-03)\n\nUser reported \"cache download succeeds, but deleting the existing cache fails, leaving only the\ntemp folder\" on WSL. No `temp_git_*` directories were present at diagnosis time (the SessionStart\ncleanup had already swept them), `claude plugin marketplace update` / `claude plugin update` both\nran clean when retried, and `claude doctor` reported no issues — the live environment could not\nreproduce the failure on demand. This section exists so the next occurrence has a ready diagnosis\ncommand and explanation instead of restarting investigation from zero, and so the cleanup hook's\nsilent success is never mistaken for \"this never happens.\"\n\n### Symlink-Based Dual-Environment Setup — `known_marketplaces.json` Corruption\n\n**Symptom**:\n\n```text\nFailed to refresh marketplace 'claude-plugins-official': Marketplace 'claude-plugins-official' has a\ncorrupted installLocation (C:\\Users\\<USER>\\.claude\\plugins\\marketplaces\\claude-plugins-official)\n— expected a path inside /home/<user>/.claude/plugins/marketplaces.\nThis can happen after cross-platform path writes or manual edits to known_marketplaces.json.\nRun: claude plugin marketplace remove \"<name>\" and re-add it.\n```\n\nAlso presents as `Plugin \"<name>\" not found in marketplace \"<marketplace>\"` even when the plugin\nclearly exists in the marketplace's `marketplace.json`.\n\n**Root Cause**:\n\nWhen `/home/<user>/.claude` is a **symlink to Windows `~/.claude`** (or any other dual-platform\nmount), both environments share the same `known_marketplaces.json` file. Claude Code writes the\nrunning environment's path into `installLocation`, but the other environment reads the same field\nand rejects the foreign path.\n\nThis is **not** a \"missing plugin\" error — it is a `known_marketplaces.json` lookup failure that\nmasks itself as a downstream plugin-not-found error. Cache directory + manifest entry can be intact\nyet the marketplace fails to resolve.\n\n| Layer | What appears | What's actually true |\n|-------|--------------|---------------------|\n| `settings.json` `enabledPlugins: true` | Plugin is enabled | ✅ Enabled, but reference is bound to a broken marketplace name |\n| `marketplaces/<name>/.claude-plugin/marketplace.json` plugin entry | Plugin listed | ✅ Listed correctly |\n| `cache/<name>/<plugin>/<ver>/` directory | Cache exists | ✅ Cache is valid |\n| `known_marketplaces.json` `installLocation` | Path string present | ❌ Path is for the **other** environment — Claude Code rejects it |\n\n**Diagnosis**:\n\n```bash\n# 1. Check filesystem topology\nreadlink ~/.claude              # is it a symlink?\nls -la ~/.claude | head -3      # confirm symlink target\n\n# 2. Read installLocation from BOTH environments\ncat ~/.claude/plugins/known_marketplaces.json | grep installLocation\n\n# 3. Compare: does the path match the current environment?\n#    Windows session expects:  \"C:\\\\Users\\\\<USER>\\\\.claude\\\\plugins\\\\marketplaces\\\\<name>\"\n#    WSL/Linux session expects: \"/home/<user>/.claude/plugins/marketplaces/<name>\"\n```\n\nIf the file shows only one environment's path, the **other** environment will hit corruption errors.\n\n**Fix — Separate marketplace names per environment (recommended for symlink setups)**:\n\nRegister the same marketplace twice in `known_marketplaces.json` under different names, each with\nits environment's `installLocation`. Mirror the corresponding `enabledPlugins` entries.\n\n```json\n// ~/.claude/plugins/known_marketplaces.json\n{\n  \"claude-plugins-official\": {\n    \"source\": { \"source\": \"github\", \"repo\": \"anthropics/claude-plugins-official\" },\n    \"installLocation\": \"C:\\\\Users\\\\<USER>\\\\.claude\\\\plugins\\\\marketplaces\\\\claude-plugins-official\",\n    \"lastUpdated\": \"<ISO timestamp>\"\n  },\n  \"claude-plugins-official-wsl\": {\n    \"source\": { \"source\": \"github\", \"repo\": \"anthropics/claude-plugins-official\" },\n    \"installLocation\": \"/home/<user>/.claude/plugins/marketplaces/claude-plugins-official\",\n    \"lastUpdated\": \"<ISO timestamp>\"\n  }\n}\n```\n\n```json\n// ~/.claude/settings.json — mirror enabledPlugins per marketplace name\n\"enabledPlugins\": {\n  \"superpowers@claude-plugins-official\": true,\n  \"superpowers@claude-plugins-official-wsl\": true,\n  // ... repeat for every plugin you want active in both environments\n}\n```\n\nMarketplace directory under `marketplaces/<name>/` is shared via the symlink — only the\n`known_marketplaces.json` entry name and `installLocation` differ. Cache directories may diverge\n(`cache/claude-plugins-official/<plugin>/<ver>/` vs `cache/claude-plugins-official-wsl/<plugin>/<ver>/`)\nbecause Claude Code keys cache by marketplace name. If the second cache is missing, restart Claude\nCode in that environment so it can hydrate.\n\n**Naming suggestions**:\n\n- `<name>` + `<name>-wsl` (keeps the existing name as \"primary\" for one OS)\n- `<name>-win` + `<name>-wsl` (symmetric explicit naming)\n- `<name>-<hostname>` (multi-machine setups beyond Windows/WSL)\n\n**Alternative — `claude plugin marketplace remove` + re-add**:\n\nWorks if you only ever use one environment. The error message itself suggests this. Drawback:\nrunning it in environment A re-registers `installLocation` for A only, so environment B will hit\nthe same corruption again at the next invocation. Not a fix for symlink setups.\n\n**Don't / Do**:\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | Edit `installLocation` to match the current environment only — the other environment will break next session | Register both environments under different marketplace names |\n| 2 | Symlink or hard-link `known_marketplaces.json` alone while keeping the rest of `~/.claude/` shared | Either split the entire `~/.claude/` per environment or keep both entries in the single shared file |\n| 3 | Assume `enabledPlugins: true` + cache existence = plugin works (indirect evidence) | Verify with an actual `Skill` tool call or `/plugin marketplace refresh <name>` — runtime invocation is the primary source |\n| 4 | Trust a `grep '\"name\": \"<plugin>\"'` zero-match without trying broader patterns first (quote-escape pitfalls) | Use simpler `grep \"<plugin>\"` first to confirm the term exists anywhere, then narrow down |\n| 5 | Conclude \"plugin removed from marketplace\" without reading the manifest line that actually contains the plugin | Read the `marketplace.json` section around the matching line to confirm entry shape (e.g., `source: \"url\"` external plugins) |\n\n**Why naive fixes recur (failed-attempts.md \"asserting without searching\" pattern, 9th variant)**:\n\n- `enabledPlugins: true` (settings flag) — represents intent, not runtime resolution\n- `cache/<name>/<plugin>/<ver>/` (filesystem) — represents past download success, not current lookup validity\n- SessionStart hook injecting a `<plugin>:using-<plugin>` skill — represents a one-time content load, not Skill-tool runtime invocability\n\nThese are **all indirect evidence**. The primary source is the actual Skill/CLI invocation result.\nWhen facing a \"plugin not found\" error, do not assume layered evidence proves runtime health — call\nthe tool and read what happens.\n\n### Primary source order (HARD STOP — diagnostic entry point)\n\nWhen the user reports any plugin failure, **stop before running any diagnostic and pick the\nprimary source in this order**:\n\n| Order | Source | How to read |\n|-------|--------|-------------|\n| 1 | The user's quoted error message | Quote the exact string back to the user — do not paraphrase |\n| 2 | `/reload-plugins` output (\"N errors during load\") | Already in conversation if the user invoked it; do not require re-run |\n| 3 | `/doctor` output | Run if no error log is visible; report each error verbatim |\n| 4 | Plugin runtime invocation result | Try the failing `Skill(\"X\")` or `/<command>` and read the error |\n| 5 | `settings.json` `enabledPlugins` flag | Only proves intent, never proves runtime health |\n| 6 | `~/.claude/plugins/cache/<name>/<plugin>/<ver>/` directory existence | Only proves a past download, never proves current lookup validity |\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | Iterate `enabledPlugins` × `cache/` directory existence and report \"cache miss: 0 cases\" | Re-read the user's quoted error + `/reload-plugins` \"N errors\" lines first. Filesystem checks come AFTER the primary source confirms which plugin is failing |\n| 2 | Ignore \"4 errors during load\" already visible in the conversation | Treat any visible error count > 0 as the entry point — even if filesystem looks healthy, those errors are the actual failure |\n| 3 | Conclude \"no problem found\" while the user still sees the symptom | If the user's symptom contradicts your finding, the finding is wrong. Run `/doctor` or reproduce the failing invocation before any conclusion |\n\n### Violation case (2026-05-28)\n\nUser ran `/cc-plugin cache miss` after `/reload-plugins` reported `4 errors during load`. Assistant\niterated `settings.json` `enabledPlugins` against `cache/` directories, found all 7 cache\ndirectories existed, and reported \"zero cache misses\" — without ever opening `/doctor`, without\nre-reading the visible \"4 errors during load\" line, and despite this very file's table #3 listing\nthat exact mistake as the 9th variant of \"asserting without searching\". The user pointed it out\nwith: \"the cache miss error hasn't gone away — what evidence did you use to assert otherwise?\" (1st recurrence).\n\nRecurrence after this rule → escalate to a `PreToolUse:Skill` hook that blocks `cc-plugin cache`\ninvocation when `/reload-plugins` or `/doctor` output in the recent conversation shows non-zero\nerrors, forcing routing to `troubleshoot.md`.\n\n## Cache Structure Reference\n\n```text\n~/.claude/plugins/\n├── marketplaces/          # Git clones (source of truth)\n│   └── <name>/\n│       ├── .claude-plugin/plugin.json\n│       ├── skills/\n│       └── ...\n└── cache/                 # Runtime copies (loaded at session start)\n    └── <marketplace>/\n        └── <plugin>/\n            └── <version>/\n                ├── .claude-plugin/\n                ├── .mcp.json\n                ├── agents/\n                ├── dist/\n                ├── hooks/\n                ├── scripts/\n                └── skills/\n```\n\n## Key Rules\n\n- **Marketplace = source of truth**, cache = runtime copy\n- Cache loads at **session start** — changes need restart\n- Missing files in cache → copy from marketplace\n- `dist/hud/index.js` required for HUD plugins\n- `temp_git_*` directories in cache are safe to delete — recurring appearance is a signal of a\n  failed update swap, not routine noise (see \"Update succeeds but leaves orphaned `temp_git_*`\n  directories\" above)\n\nFile v0.8.1:LICENSE\n\nMIT License\n\nCopyright (c) 2026 es6.kr\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nArchive v0.8.0: 14 files, 34528 bytes\n\nFiles: cache.md (1125b), CHANGELOG.md (8126b), clustering.md (22997b), create.md (3583b), dev-reflect.md (6558b), hud.md (8900b), LICENSE (1063b), marketplace.md (1036b), resources/cache-cleanup.sh (4418b), scripts/dev-reflect.sh (6660b), skill-card.md (2657b), SKILL.md (3029b), troubleshoot.md (13707b), _meta.json (128b)\n\nFile v0.8.0:SKILL.md\n\n---\nmetadata:\n  author: es6kr\n  version: \"0.1.0\"\nname: cc-plugin\ndescription: |\n  Claude Code plugin lifecycle management.\n  cache - clean old cache versions (cleanup only — NOT for cache miss diagnosis) [cache.md],\n  clustering - skill affinity scoring (coupling/dep/hook-ownership) → plugin bundle membership [clustering.md],\n  create - plugin authoring guide (structure, plugin.json, components) [create.md],\n  dev-reflect - reflect local dev repo into marketplace clone for pre-push testing [dev-reflect.md],\n  hud - OMC HUD statusline (omcHud elements, omcLabel, wrapper sed fallback) [hud.md],\n  marketplace - clone/list/update marketplace repos [marketplace.md],\n  troubleshoot - cache miss/error, install fail, cache sync, HUD diagnostics — ALL plugin errors route here [troubleshoot.md].\n  \"plugin\", \"marketplace\", \"plugin install\", \"plugin not installed\",\n  \"cache miss\", \"cache error\", \"plugin error\", \"load error\", \"reload errors\",\n  \"dev reflect\", \"plugin clustering\", \"bundle skills\", \"skill affinity\",\n  \"OMC HUD\", \"omcHud\", \"omcLabel\", \"statusline\", \"[OMC#\" triggers.\n---\n\n# Plugin\n\nClaude Code plugin lifecycle management: create, install, update, cache, troubleshoot.\n\n## Topics\n\n| Topic | Description | Guide |\n|-------|-------------|-------|\n| cache | **Cleanup only** — clean old plugin cache versions and temp directories. **NOT for \"cache miss\" or load errors** — use troubleshoot instead | [cache.md](./cache.md) |\n| clustering | Score skill-to-skill affinity (coupling / shared external dep / hook-ownership gate) and recommend plugin bundle membership. Feeds into `create` | [clustering.md](./clustering.md) |\n| create | Plugin authoring guide (structure, plugin.json, components) | [create.md](./create.md) |\n| dev-reflect | Reflect a local dev source repo's plugin/skill changes into the registered marketplace clone for local testing before commit/push (helper: `scripts/dev-reflect.sh`) | [dev-reflect.md](./dev-reflect.md) |\n| hud | OMC HUD statusline configuration: omcHud elements, omcLabel toggle, wrapper sed fallback, version compatibility | [hud.md](./hud.md) |\n| marketplace | Clone, list, and update marketplace repositories | [marketplace.md](./marketplace.md) |\n| troubleshoot | **All plugin errors** — cache miss, load errors, `/reload-plugins` errors, `/doctor` failures, installation failures, cache sync, HUD diagnostics | [troubleshoot.md](./troubleshoot.md) |\n\n## Routing rule (HARD STOP)\n\n| User says | Topic |\n|-----------|-------|\n| \"cache miss\", \"cache error\", \"load error\", \"reload errors\", \"plugin not loading\", \"plugin not installed\" | **troubleshoot** (NOT cache) |\n| \"cache cleanup\", \"old versions\", \"disk space\", \"remove temp_git_*\" | cache |\n\n`cache.md` only owns deletion of stale versions. Any diagnostic of \"why isn't this plugin working\" — including the literal phrase \"cache miss\" — routes to `troubleshoot.md`.\n\n## Paths\n\n```\nMarketplaces: ~/.claude/plugins/marketplaces/\nCache:        ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/\n```\n\nFile v0.8.0:_meta.json\n\n{\n  \"ownerId\": \"kn74k8yfvftx6f062qa8fzyd8h8373jd\",\n  \"slug\": \"cc-plugin\",\n  \"version\": \"0.8.0\",\n  \"publishedAt\": 1790259565316\n}\n\nFile v0.8.0:cache.md\n\n# Cache Cleanup\n\nClean old plugin cache versions and temporary git directories.\n\n> **⚠️ This topic is cleanup-only.**\n> If the user says \"cache miss\", \"cache error\", \"load error\", or any plugin diagnostic phrase — **stop and route to [troubleshoot.md](./troubleshoot.md) instead**. cache.md does not diagnose anything; it only deletes stale versions.\n\n## Usage\n\n```bash\nresources/cache-cleanup.sh [--dry-run] [--verbose]\n```\n\n- `--dry-run`: Preview deletions without removing\n- `--verbose`: Show detailed output\n\n> **Platform**: macOS only. The script uses `stat -f \"%B\"` (BSD-style birthtime) which is unavailable on Linux. On Linux, `stat -c \"%W\"` could be substituted but birthtime is not always populated; modification time (`stat -c \"%Y\"`) is a portable fallback if you adapt the script.\n\n## What It Cleans\n\n- **Old versions**: Keeps only the latest version per plugin in `~/.claude/plugins/cache/<marketplace>/<plugin>/`\n- **Temp git dirs**: Removes `temp_git_*` directories in cache root\n\n## When to Use\n\n- After plugin updates (old versions accumulate)\n- When disk space is needed\n- Periodically as maintenance\n\nFile v0.8.0:CHANGELOG.md\n\n# Changelog\n\n## [0.8.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.7.2...cc-plugin-v0.8.0) (2026-09-24)\n\n\n### Features\n\n* **fix-plan:** add pipeline log and hook integrity check scripts ([e93a432](https://github.com/es6kr/skills/commit/e93a4323b54a311fcda6855163ffe14c2c146412))\n\n\n### Bug Fixes\n\n* **cc-plugin:** restore missing skills to es6kr plugin in marketplace manifest ([6ab94b0](https://github.com/es6kr/skills/commit/6ab94b0278d626012be3378d44c634621be1fd8b))\n\n## [0.7.2](https://github.com/es6kr/skills/compare/cc-plugin-v0.7.1...cc-plugin-v0.7.2) (2026-09-20)\n\n\n### Bug Fixes\n\n* address code review feedback ([0c08bfb](https://github.com/es6kr/skills/commit/0c08bfbf2b5b737fdce685c8f15ead56c64290f4))\n* **cc-plugin:** eliminate eval-based command injection in dev-reflect.sh ([097aafe](https://github.com/es6kr/skills/commit/097aafea4adcdf39df8c4825d69ea83a66fbd4fa))\n* **cc-plugin:** sync dev-reflect.sh changes into cached plugin version dirs ([#510](https://github.com/es6kr/skills/issues/510)) ([28824f6](https://github.com/es6kr/skills/commit/28824f643b32ab05b766cdf99ddb626ffc5e3f95))\n\n## [0.7.1](https://github.com/es6kr/skills/compare/cc-plugin-v0.7.0...cc-plugin-v0.7.1) (2026-09-18)\n\n\n### Bug Fixes\n\n* **cleanup:** make the session-end report table self-sufficient ([#487](https://github.com/es6kr/skills/issues/487)) ([c4a0255](https://github.com/es6kr/skills/commit/c4a02557fb8de3b32cf337c549f62535dabf824b))\n\n## [0.7.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.6.2...cc-plugin-v0.7.0) (2026-09-06)\n\n\n### Features\n\n* **cc-plugin:** implement post-commit dev-reflect and cache drift guard ([3f78c05](https://github.com/es6kr/skills/commit/3f78c054e7c00e7c33730d3378c5aff6575566e4))\n* **hooks:** migrate standalone hooks into plugin resources and fix test regressions ([d7b0060](https://github.com/es6kr/skills/commit/d7b0060ddffdd4a7b5f4f9751039ee9a79e049db))\n\n## [0.6.2](https://github.com/es6kr/skills/compare/cc-plugin-v0.6.1...cc-plugin-v0.6.2) (2026-09-01)\n\n\n### Bug Fixes\n\n* staging branch next-fix sync into main ([bbbd460](https://github.com/es6kr/skills/commit/bbbd460bf3b6b1cba4c6d07b3641afa734c89860))\n\n## [0.6.1](https://github.com/es6kr/skills/compare/cc-plugin-v0.6.0...cc-plugin-v0.6.1) (2026-08-29)\n\n\n### Bug Fixes\n\n* **cc-plugin:** remove duplicate cache-cleanup.sh from scripts/ ([1a64d24](https://github.com/es6kr/skills/commit/1a64d2421d6b8f42bd149c6c4bb3b1af0b146965))\n* **hook-kit:** resolve RAG receiver from workspace config instead of mandating --rag ([58e85ec](https://github.com/es6kr/skills/commit/58e85ecbb437557544cd528281aa30b804bd2532))\n* **hook-kit:** scope PR-URL bare-ref check to per-number match, allow force-push in worktrees ([dd50dce](https://github.com/es6kr/skills/commit/dd50dced989eed4847daaf9a0cd4be12a04426e1))\n\n## [0.6.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.5.3...cc-plugin-v0.6.0) (2026-08-20)\n\n\n### Features\n\n* promote next-feat staging (lifecycle guards, triage automation, and workflow safety procedures) ([77d58ac](https://github.com/es6kr/skills/commit/77d58ac3a771a4897043c9eea8b149ea1e8ba2ff))\n\n## [0.5.3](https://github.com/es6kr/skills/compare/cc-plugin-v0.5.2...cc-plugin-v0.5.3) (2026-08-17)\n\n\n### Bug Fixes\n\n* **wip:** cross-ref PR-URL and TaskCreate subject repo-qualifier rules ([#186](https://github.com/es6kr/skills/issues/186)) ([4982364](https://github.com/es6kr/skills/commit/49823641a7b08123ebd0325273892bee41bc3280))\n\n## [0.5.2](https://github.com/es6kr/skills/compare/cc-plugin-v0.5.1...cc-plugin-v0.5.2) (2026-08-05)\n\n\n### Bug Fixes\n\n* **wip:** cross-ref PR-URL and TaskCreate subject repo-qualifier rules ([#186](https://github.com/es6kr/skills/issues/186)) ([951c1e6](https://github.com/es6kr/skills/commit/951c1e6871e78e226757c6a7ae5ae53efeb7bfb0))\n\n## [0.5.1](https://github.com/es6kr/skills/compare/cc-plugin-v0.5.0...cc-plugin-v0.5.1) (2026-07-23)\n\n\n### Bug Fixes\n\n* **cc-plugin:** relocate cache-cleanup hook to resources/ and restore exec bit ([810c3d6](https://github.com/es6kr/skills/commit/810c3d6ee0e049c280609a194f90a0cb65118f30))\n* hook relocation + Korean-pattern externalization (cc-plugin, fix, wip) ([f4af5b5](https://github.com/es6kr/skills/commit/f4af5b564b2d43387a5d004f875e56b30a36ce13))\n* **next-fix:** accumulate bug fixes for docxport, wip, fix-plan, and hook-kit ([6eec083](https://github.com/es6kr/skills/commit/6eec083b7fbc429bdabcfcc89d7778b185dd7497))\n\n## [0.5.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.4.2...cc-plugin-v0.5.0) (2026-07-07)\n\n\n### Features\n\n* **cc-plugin:** add troubleshoot topic + expand create guidance ([6df1e6e](https://github.com/es6kr/skills/commit/6df1e6e430d715cdd3adf87e525d5b0f4118e52f))\n* **docxport:** promote initial registration to main ([8265ba3](https://github.com/es6kr/skills/commit/8265ba33b13ab6054c3595943d068f5c1c13625a))\n* **skills:** drift sync bundle — cc-plugin/github-flow/wip/next/check-hangul ([ac5d15d](https://github.com/es6kr/skills/commit/ac5d15d7231e67b3b53cae3861bb6132a2f3beff))\n\n## [0.4.2](https://github.com/es6kr/skills/compare/cc-plugin-v0.4.1...cc-plugin-v0.4.2) (2026-06-30)\n\n\n### Bug Fixes\n\n* **skills:** add procedural guards + standardize description scalar ([#66](https://github.com/es6kr/skills/issues/66)) ([fcc921f](https://github.com/es6kr/skills/commit/fcc921fba3928aad7421ecff888d5dcee5ae5655))\n\n## [0.4.1](https://github.com/es6kr/skills/compare/cc-plugin-v0.4.0...cc-plugin-v0.4.1) (2026-06-25)\n\n\n### Bug Fixes\n\n* apply PR [#62](https://github.com/es6kr/skills/issues/62) AI review findings (14) ([8132a2b](https://github.com/es6kr/skills/commit/8132a2b001fbd10e3db618decf989f8cf84b1b6b))\n* **fix:** split Step 2 medium by content type — case history to failed-attempts.md ([#62](https://github.com/es6kr/skills/issues/62)) ([747b3f9](https://github.com/es6kr/skills/commit/747b3f957ca0fefdbc5044eb08f66b8aafc1e26a))\n\n## [0.4.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.3.0...cc-plugin-v0.4.0) (2026-06-12)\n\n\n### Features\n\n* decompose workflow/git rules + rename web-ui-test→web-browser ([#50](https://github.com/es6kr/skills/issues/50)) ([e10d48f](https://github.com/es6kr/skills/commit/e10d48fea4e507b95888de44812b53484d32128d))\n\n## [0.3.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.2.0...cc-plugin-v0.3.0) (2026-06-03)\n\n\n### Features\n\n* **cc-plugin:** add cache miss assertion guardrail to troubleshoot ([0ab4d27](https://github.com/es6kr/skills/commit/0ab4d27f2719f476ca73948c3767f1889f3e4f8b))\n* **cc-plugin:** import published baseline (ClawHub drumrobot/cc-plugin) ([9658945](https://github.com/es6kr/skills/commit/9658945df431f9a743d7855eab91919d80e58fb6))\n* **cc-plugin:** publish Claude Code plugin lifecycle skill ([012556a](https://github.com/es6kr/skills/commit/012556aaaeae14d5df17f0d202426b10a86d1ab9))\n\n\n### Bug Fixes\n\n* **cc-plugin:** address PR review actionable findings ([2d77ac3](https://github.com/es6kr/skills/commit/2d77ac3289db20dab35110b11ad3e111915aade9))\n* **cc-plugin:** translate remaining Korean phrase to English (CI hangul-check) ([dd3cf99](https://github.com/es6kr/skills/commit/dd3cf998e823d4291c775862c94ba3f6058de746))\n\n\n### Documentation\n\n* **cc-plugin:** add Symlink-Based Dual-Environment Setup troubleshoot section ([916f2be](https://github.com/es6kr/skills/commit/916f2be41fcefe2c9982b6e944f78e6ecdf7202b))\n\n## [0.2.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.1.0...cc-plugin-v0.2.0) (2026-05-24)\n\n\n### Features\n\n* **cc-plugin:** publish Claude Code plugin lifecycle skill ([012556a](https://github.com/es6kr/skills/commit/012556aaaeae14d5df17f0d202426b10a86d1ab9))\n\n\n### Bug Fixes\n\n* **cc-plugin:** address PR review actionable findings ([2d77ac3](https://github.com/es6kr/skills/commit/2d77ac3289db20dab35110b11ad3e111915aade9))\n* **cc-plugin:** translate remaining Korean phrase to English (CI hangul-check) ([dd3cf99](https://github.com/es6kr/skills/commit/dd3cf998e823d4291c775862c94ba3f6058de746))\n\n\n### Documentation\n\n* **cc-plugin:** add Symlink-Based Dual-Environment Setup troubleshoot section ([916f2be](https://github.com/es6kr/skills/commit/916f2be41fcefe2c9982b6e944f78e6ecdf7202b))\n\nFile v0.8.0:clustering.md\n\n# Plugin Clustering Recommendation\n\nScore the **affinity between skills** across the ecosystem and recommend which\nskills should be bundled into a shared plugin. High mutual affinity → ship\ntogether; low affinity → keep standalone. The output of this topic feeds\ndirectly into the [create](./create.md) topic (which becomes the `plugins/<name>`\nmembership list) and the [marketplace](./marketplace.md) topic (where bundled\nplugins are published).\n\n## When to Use\n\n- \"Which of these skills belong in the same plugin?\"\n- Before publishing a plugin bundle — decide membership by signal, not by guesswork\n- After a cluster of skills grows cross-references organically and you want to formalize the boundary\n\n**Pre-flight (MANDATORY)**: before authoring any new scoring/clustering tooling\nhere, run a remote ecosystem search via `Skill(\"skill-kit\", \"route\")` Step 2b\n(this skill's own `find` topic / ClawHub) for an existing affinity/clustering\nskill. Reuse over rebuild applies to this capability too.\n\n## Two Modes — Discovery vs Candidate-set Audit\n\nClustering is invoked in two different shapes. The scoring model is the same;\nthe *scope of iteration* and the *handling of references that point outside\nthat scope* differ. Pick the mode before measuring.\n\n| Mode | Input | Iteration scope | What to do with references to skills outside the scope |\n|------|-------|-----------------|-------------------------------------------------------|\n| **Discovery** | None — scan all installed skills | All `~/.claude/skills/*/` | N/A (scope = universe; nothing is \"outside\") |\n| **Candidate-set audit** | A given list of N skills (e.g., a dependency-diagram subgraph, a proposed plugin's tentative membership) | The N candidates | **Surface separately as cluster-expansion candidates and external-bundle signals** (see \"Outside-set references\" below). Do not silently drop them |\n\nIn audit mode, an edge from candidate A to a non-candidate skill X is a real\nsignal — it means either X belongs in the cluster (expand the candidate set) or\nX is an external dependency the bundle must track (Dim 2-style). Dropping these\nedges by restricting both loops to the candidate set produces an\nunder-recommended cluster.\n\n## Scoring Model\n\nThree dimensions feed a pairwise affinity score. The first two pull skills\n*together*; the third gates whether bundling is *worth it at all*.\n\n| # | Dimension | Weight | Pulls toward | Signal source |\n|---|-----------|--------|--------------|---------------|\n| 1 | Cross-skill topic coupling | High | Bundling A+B | Directed topic→topic references between two skills (`Skill(\"B\", \"topic\")`, `B/topic.md`, `/B <topic>` inside A's topic files) |\n| 2 | Shared external dependency | Medium | Bundling A+B (and/or co-locating the dependency) | `depends-on` overlap, esp. on external skills/plugins (e.g., `superpowers`). Two skills depending on the same external surface have aligned release/version needs |\n| 3 | Command + hook footprint | Low (gate, not pull) | Whether *any* plugin is justified | Count of installed command aliases + `resources/*.sh` hooks + hook criticality (see below). **Low hook footprint lowers the need to convert at all** — a skill that installs no hooks works fine standalone and gains little from plugin packaging |\n\n### Dimension 1 — Cross-skill topic coupling (primary)\n\nThe strongest bundling signal. Count **directed topic-level edges** between every\npair of skills (the same data the dependency graphs are built from). Edge sources\nto extract:\n\n| Edge source | Pattern | Example |\n|-------------|---------|---------|\n| `Skill()` tool call in topic body | `Skill(\"<name>\", \"<topic>\")` | `Skill(\"github-flow\", \"merge\")` |\n| Topic markdown link | `<name>/<topic>.md` | `github-flow/pr.md` |\n| Slash-command reference | `/<name> <topic>` | `/cleanup retrospect` |\n| **Frontmatter `depends-on`** (inline) | `depends-on: [a, b, c]` | `depends-on: [github-flow, tdd]` |\n| **Frontmatter `depends-on`** (YAML block) | `depends-on:` then `  - <name>` lines | `depends-on:\\n  - commit-tidy` |\n\n```bash\n# For skill A, find which other skills its topics reference (topic + depends-on)\n# Patterns are intentionally narrow to avoid false positives from filesystem\n# paths like `org/repo` and shell commands like `/repo remote`.\nSKILLS_DIR=~/.claude/skills\n\nextract_refs() {\n  local A=\"$1\" a; a=$(basename \"$A\")\n  # 1. Skill() tool call — most specific, high precision\n  grep -rhoE 'Skill\\(\"[a-z][a-z-]*\"' \"$A\" 2>/dev/null \\\n    | grep -oE '\"[a-z][a-z-]*\"' | tr -d '\"'\n  # 2. Markdown link to a topic file: require boundary char before <skill>/<topic>.md\n  #    (excludes `/works/group/repo/file.md` style paths)\n  grep -rhoE '(^|[[:space:](\"`./])([a-z][a-z-]+)/([a-z][a-z-]+)\\.md' \"$A\" 2>/dev/null \\\n    | grep -oE '[a-z][a-z-]+/[a-z][a-z-]+\\.md' | cut -d/ -f1\n  # 3. Slash-command reference: require boundary so `~/path/repo remote` is excluded\n  grep -rhoE '(^|[[:space:]\"`(])/[a-z][a-z-]+ +[a-z][a-z-]+' \"$A\" 2>/dev/null \\\n    | grep -oE '/[a-z][a-z-]+' | tr -d '/'\n  # 4. frontmatter depends-on — inline AND YAML block\n  awk '/^---$/{f=!f; next} f' \"$A/SKILL.md\" 2>/dev/null | awk '\n    /^depends-on: *\\[/ { gsub(/.*\\[|\\].*/, \"\"); gsub(/,/, \" \"); print; next }\n    /^depends-on:/    { block=1; next }\n    block && /^  *- / { gsub(/^  *- */, \"\"); print; next }\n    block && /^[^ ]/  { block=0 }\n  '\n}\n\nfor A in \"$SKILLS_DIR\"/*/; do\n  a=$(basename \"$A\")\n  extract_refs \"$A\" | sort -u | while read tok; do\n    [ -d \"$SKILLS_DIR/$tok\" ] && [ \"$tok\" != \"$a\" ] && echo \"$a -> $tok\"\n  done\ndone | sort | uniq -c | sort -rn\n```\n\n**False-positive verification (MANDATORY before publishing results)**: any edge\nthe extractor reports must be confirmed by reading the cited file:line. A skill\nname that also exists as a common shell-command word (`repo`, `next`, `wip`,\n`fix`, `run`) is at high risk of matching a literal path or command fragment.\nFor every outside-set edge in the result, open the source file and verify the\nmatch is a real `Skill()` call, markdown link, slash-command, or `depends-on`\nentry — not `~/path/repo remote`, `gh pr view -R owner/repo`, or similar\nplaceholder. Failing to verify the top hits before reporting will produce a\nworked example that is partly wrong.\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | Trust the grep output for skills whose name is a common word (`repo`, `next`, `wip`, `fix`, `run`) | Open every cited file:line for these skills before classifying. Strip matches that are path placeholders, gh CLI URLs, git command fragments |\n| 2 | Loose patterns like `/[a-z-]+ [a-z-]+` without boundary | Require boundary char (`(^|[[:space:]\"`(])`) before `/` so `~/works/group/repo remote` does not match `/repo remote` |\n| 3 | Pattern `[a-z-]+/[a-z-]+\\.md` against full text | Require boundary before the first segment so `/works/group/repo/file.md` does not look like `repo/file.md` |\n| 4 | Sample-of-1 verification (\"I checked git-repo and the count looked right\") | Sample-of-5+ verification across skills whose names collide with shell words; do not report results until all 5 verify |\n\n- **Score**: `coupling(A,B) = edges(A→B) + edges(B→A)`. Mutual (bidirectional) coupling scores higher than one-way.\n- A `depends-on` declaration that is *also* exercised by an actual topic reference counts double — declared + used.\n\n#### Outside-set references (candidate-set audit mode only)\n\nWhen clustering is run in **audit mode** (Two Modes table above), every edge\n`A → X` where `X` is **not in the candidate set** must be captured and\nclassified, not dropped. There are two valid classifications:\n\n| Classification | When | Action |\n|----------------|------|--------|\n| **Cluster-expansion candidate** | Most candidates in the set reference `X`, OR `X` itself heavily references candidates back (mutual coupling) | Propose adding `X` to the candidate set and re-score. Re-run the audit with the expanded set |\n| **External bundle signal** | Only one or two candidates reference `X`, and `X` doesn't reciprocate (one-way, narrow) | Treat like Dim 2's shared external dep: either vendor `X` into the plugin, or pin `X` as a cross-plugin dependency. Do not pull `X` into the cluster |\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | Restrict both loops to the candidate set and call the result \"the cluster's couplings\" | Iterate inner loop over **all** skills; report inside-set edges as coupling and outside-set edges in a separate \"outside refs\" section |\n| 2 | Treat a single outside reference (e.g., `git-repo → commit-tidy` alone) as noise and discard | Surface it. The user decides if `commit-tidy` should expand the set or be a bundle/dep signal — that decision is part of the audit |\n| 3 | Conflate outside refs with Dim 2 only when **N** candidates share them | Even **1** candidate's outside ref is a signal in audit mode. Dim 2's \"shared\" threshold is about *which dependency to vendor*, not whether the edge exists |\n| 4 | Hide outside refs from the AskUserQuestion options | Add an explicit \"Expand cluster with `<X>`\" option when outside refs cross the cluster-expansion threshold (≥half the candidates reference `X`, or `X` reciprocates) |\n\n### Dimension 2 — Shared external dependency\n\n```bash\n# Map each skill's depends-on (inline OR YAML block), then find shared external dep\nfor S in ~/.claude/skills/*/; do\n  s=$(basename \"$S\")\n  dep=$(awk '/^---$/{f=!f; next} f' \"$S/SKILL.md\" 2>/dev/null | awk '\n    /^depends-on: *\\[/ { gsub(/.*\\[|\\].*/, \"\"); gsub(/,/, \" \"); print; next }\n    /^depends-on:/    { block=1; next }\n    block && /^  *- / { gsub(/^  *- */, \"\"); printf \"%s \", $0; next }\n    block && /^[^ ]/  { block=0; print \"\" }\n    END { if (block) print \"\" }\n  ')\n  [ -n \"$dep\" ] && echo \"$s: $dep\"\ndone\n```\n\nThe parser handles both forms — a skill that uses YAML block style (`depends-on:\\n  - x`) instead of inline `[x, y]` is otherwise silently invisible to Dim 2, and any external-dep shared via the block form gets undercounted.\n\n- Two skills sharing an **external** dependency (a plugin not in this repo — e.g., `superpowers`) score higher than two sharing an internal one, because they must track that external surface's versions together.\n- Output also flags: if N skills all depend on the same external skill, consider whether that external surface should be **vendored into the plugin** (see `skill-kit/portability` topic) rather than left as a cross-plugin dead reference.\n\n### Dimension 3 — Command + hook footprint (the gate)\n\n```bash\n# Per-skill hook + command footprint\nfor S in ~/.claude/skills/*/; do\n  s=$(basename \"$S\")\n  hooks=$(ls \"$S\"/resources/*.sh 2>/dev/null | wc -l | tr -d ' ')\n  cmd=$(ls ~/.claude/commands/\"$s\".md 2>/dev/null | wc -l | tr -d ' ')\n  echo \"$s: hooks=$hooks cmd=$cmd\"\ndone\n```\n\nHook **criticality** weighting (read matcher type from `~/.claude/settings.json`):\n\n| Hook type | Criticality | Plugin-conversion value |\n|-----------|-------------|-------------------------|\n| `PreToolUse` blocking (exit 2 / deny) | High | High — guard machinery benefits from versioned plugin packaging |\n| `SessionStart` context injection | High | High — always-on behavior shipped as a unit |\n| `PostToolUse` warning (non-blocking) | Medium | Medium |\n| `Stop` / `UserPromptSubmit` advisory | Low | Low |\n| No hooks at all | — | **Low — standalone skill is sufficient; do not force a plugin** |\n\nThis dimension does **not** pull two skills together. It scales the final\nrecommendation: a tightly-coupled pair with zero hooks may still be fine as two\nstandalone skills; a pair that also installs critical guard hooks gains real\nvalue from plugin packaging (shared install/version/settings registration).\n\n**Measurement caveat — count by ownership, not keyword match**: a skill's hook\nfootprint is the hooks it *owns* (`<skill>/resources/*.sh`), not every installed\n`~/.claude/hooks/*.sh` whose name matches the skill's domain. An installed hook may be:\n\n- **UNMANAGED / ORPHAN** — no `resources/` owner (a `Skill(\"hook-kit\", \"audit\")` cleanup item, not this skill's footprint)\n- **cross-cutting general guard** — fires on a broad matcher (e.g., \"all UI file edits\", \"any SSH-config Read\") rather than this skill's own workflow\n\nNeither counts toward plugin-conversion value. Verify both ownership and matcher\nscope before crediting a hook to a skill:\n\n```bash\n# OWNERSHIP: resources/ is the source of truth — does this skill own the hook?\nls ~/.claude/skills/<skill>/resources/*.sh 2>/dev/null\n# An installed hook with a domain-matching name but no resources/ owner is\n# UNMANAGED (cross-check `Skill(\"hook-kit\", \"audit\")`) — it is NOT this skill's footprint.\n```\n\n## Forming Clusters\n\n1. Build a pairwise `affinity(A,B) = coupling*w1 + sharedExternalDep*w2` matrix (dimensions 1–2).\n2. Group skills whose mutual affinity exceeds a threshold (transitive: A–B and B–C with no A–C still cluster via B).\n3. **Process outside-set references** (audit mode only — see \"Outside-set references\" subsection): for each `A → X` where `X` is outside the candidate set, classify as cluster-expansion candidate or external-bundle signal. If any `X` qualifies as expansion, surface it as an option *before* finalizing the cluster.\n4. Apply the dimension-3 gate per candidate cluster: compute total hook/command footprint + max criticality. Low footprint → annotate \"bundling optional, standalone OK\"; high-criticality hooks → annotate \"bundling recommended\".\n5. Name each cluster after its highest-coupling hub skill.\n\n## Present Results via AskUserQuestion\n\n```\nAskUserQuestion {\n  question: \"Affinity scoring suggests these plugin clusters. Which should be bundled?\",\n  multiSelect: true,\n  options: [\n    { label: \"Bundle {hub} + {a} + {b}\", description: \"Coupling N edges, shared dep {X}, critical hooks {H} → high value\" },\n    { label: \"Keep {c} standalone\", description: \"Couples to {hub} but installs no hooks → low conversion value\" },\n    { label: \"Vendor {ext} into the plugin\", description: \"M skills share external dep {ext}; bundling avoids dead cross-refs\" }\n  ]\n}\n```\n\nAfter the user selects a cluster, hand off to [create](./create.md) to author\nthe `plugins/<name>/` directory with the chosen membership.\n\n## Optional d3 export — affinity graph dispatch\n\nRender the clustering result as a force-directed d3 graph for visual review of\ncluster boundaries, outside-set bundle signals, and ownership-gate failures.\n**Companion to `skill-kit/graph` Step 4** — both topics expose the same\n`--render=<skill>:<topic>` abstract dispatch contract so a single d3 receiver\ncan render either dependency edges (graph) or affinity-weighted clusters\n(clustering).\n\n### Inputs\n\n| Input | Form | Example |\n|-------|------|---------|\n| Candidate set | list of slugs (audit mode) or omitted (discovery mode) | `code-workflow github-flow consolidate git-repo tdd web-browser` |\n| `--render=<skill>:<topic>` (optional) | abstract dispatch contract for d3 receiver | `--render=es6kr:force-graph` |\n| `--threshold=<N>` (optional) | minimum coupling score to emit a link (default: 1) | `--threshold=2` |\n\n### Nodes / links conversion\n\nThe clustering result (Dim 1/2/3 + outside-set) maps to a `{nodes, links}` JSON\npayload the d3 receiver consumes. Each node carries cluster membership +\nownership-gate metadata so the receiver can color/group consistently with the\naudit decision.\n\n```json\n{\n  \"nodes\": [\n    {\n      \"id\": \"<slug>\",\n      \"cluster\": \"<hub-skill>|standalone|outside\",\n      \"hooks\": <int — owned resources/*.sh count>,\n      \"criticality\": \"high|medium|low|none\",\n      \"role\": \"candidate|outside-bundle-signal|cluster-expansion\"\n    }\n  ],\n  \"links\": [\n    {\n      \"source\": \"<slug>\",\n      \"target\": \"<slug>\",\n      \"value\": <coupling score — Dim 1 inside-set edges A→B + B→A>,\n      \"kind\": \"inside|outside|shared-dep\",\n      \"shared_dep\": \"<external skill name — only when kind=shared-dep>\"\n    }\n  ]\n}\n```\n\nField semantics:\n\n| Field | Source dimension | Notes |\n|-------|------------------|-------|\n| `nodes[].cluster` | Forming Clusters Step 5 | Outside-set bundle signals get `cluster: \"outside\"` so the receiver can hull-separate them from inside-set clusters |\n| `nodes[].hooks` + `nodes[].criticality` | Dim 3 ownership gate | Count `<skill>/resources/*.sh` only — **UNMANAGED / cross-cutting general guards do not count** (per the \"Measurement caveat\" subsection) |\n| `nodes[].role` | Outside-set classification | `candidate` = inside the audit set; `outside-bundle-signal` = single-source narrow outside ref (vendor/pin); `cluster-expansion` = outside ref that crosses the ≥half candidates / reciprocation threshold |\n| `links[].value` | Dim 1 coupling | `value = edges(A→B) + edges(B→A)` — bidirectional coupling sums |\n| `links[].kind` | Mode separation | `inside` = both endpoints in candidate set; `outside` = audit-mode candidate → non-candidate; `shared-dep` = Dim 2 shared external dep edge (synthetic, not a direct `Skill()` call) |\n\n### Dispatch\n\n```bash\n/cc-plugin clustering <slugs> --render=<receiver-skill>:<receiver-topic>\n```\n\nWhen the flag is supplied, the clustering topic invokes the receiver with the\n`{nodes, links}` JSON. The receiver owns the HTML template, force-tuning\ncontrols (charge / link distance / collision radius), and convex-hull rendering\nthat visually groups each cluster. **Do NOT hardcode a specific receiver name**\n— see `skill-kit/portability` Rule B (Generic skills must expose abstract\ndispatch, not vendor-specific calls).\n\nWhen the flag is omitted, the procedure stops at the AskUserQuestion result +\nWorked Example deliverable.\n\n### Don't / Do\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | Hardcode a specific render receiver (e.g., `es6kr:force-graph`) in clustering topic body | Use abstract `--render=<skill>:<topic>` dispatch — caller chooses the receiver (Rule B of `skill-kit/portability`) |\n| 2 | Emit only inside-set links in the JSON payload | Audit mode emits `kind: \"outside\"` links separately so the receiver can hull-separate outside-bundle-signal nodes from inside-set clusters (Outside-set Don't/Do #1) |\n| 3 | Include keyword-matched but UNMANAGED hooks in `nodes[].hooks` count | Count only `<skill>/resources/*.sh` ownership (per the \"Measurement caveat\" subsection) — UNMANAGED / cross-cutting guards inflate plugin-conversion value falsely |\n| 4 | Reuse `skill-kit/graph`'s edge JSON directly as clustering links | Graph emits raw dependency edges; clustering links carry **affinity score** (coupling sums + Dim 2 synthetic edges). They are companion outputs, not interchangeable |\n| 5 | Drop the `--threshold` filter and emit every pair | Default `--threshold=1` filters zero-coupling pairs; raise the threshold when the graph is dense (audit mode with many outside refs) so visualization stays legible |\n\n### Outputs\n\n| Output | Always | When `--render` |\n|--------|--------|------------------|\n| AskUserQuestion options (clusters + outside-set decisions) | ✅ | ✅ |\n| Worked Example summary table (Cluster / Members / Rationale) | ✅ | ✅ |\n| `{nodes, links}` JSON payload | — | ✅ |\n| d3 force-directed graph (via receiver) | — | ✅ |\n\n### Self-check (before invoking dispatch)\n\n1. Did the audit run produce a final cluster assignment (Forming Clusters Step 5)? — dispatch must follow scoring, not precede it\n2. Are outside-set edges classified per \"Outside-set references\" (cluster-expansion vs external-bundle-signal) before mapping to `nodes[].role`?\n3. Is the dispatch flag abstract (`--render=<skill>:<topic>`) — no hardcoded receiver in topic body?\n4. Does the JSON payload schema match the receiver's contract? Receivers may extend the schema, but the four fields above (`cluster`, `hooks`, `criticality`, `role` on nodes; `value`, `kind` on links) are MANDATORY for hull/color/size mapping\n5. Is `--threshold` set appropriately for graph density? Discovery mode often needs `--threshold=2+` to avoid hairball\n\n## Worked Example — code-workflow dependency cluster\n\nApplying the model in **candidate-set audit mode** to the skills in the\ncode-workflow dependency graph (code-workflow, github-flow, tdd, web-browser,\nconsolidate, git-repo; superpowers external).\n\n- **Dim 1 (coupling — inside-set, grep + diagram edges)**: github-flow ↔ consolidate = 11 (gf→co 8 Step-9 follow-up, co→gf 3) strongest bidirectional; code-workflow ↔ github-flow = 5+ (companion/deps/plan-to-issue/pr/merge, depends-on both ways); code-workflow→tdd 2, →web-browser 1, consolidate→git-repo 1 (depends-on, one-way).\n- **Dim 1 (outside-set references — audit-mode surfacing)**: `git-repo → commit-tidy` (frontmatter `depends-on`, one-way, narrow); `consolidate/next → next` and `→ wip` (`Skill()` calls, one-way, narrow). None of `commit-tidy / next / wip` are in the candidate set, and each reference is single-source + non-reciprocated → classify as **external bundle signal** (Dim 2-style), not cluster-expansion candidate. The bundle either vendors them or pins them as cross-plugin deps. Without the Outside-set Don't/Do #2 rule, these edges would have been silently dropped by inner-loop restriction.\n- **Dim 2 (shared external dep)**: code-workflow, consolidate, github-flow all pull `superpowers` → bundling signal.\n- **Dim 3 (ownership gate)**: code-workflow owns 1 hook, consolidate owns 1; github-flow / tdd / web-browser / git-repo own 0. tdd/web-browser/git-repo matched `ui-change`/`ssh-config` installed hooks by keyword, but those are **UNMANAGED cross-cutting guards** → footprint 0 (per the caveat above).\n\n**Result:**\n\n| Cluster | Members | Rationale |\n|---------|---------|-----------|\n| Core PR-workflow plugin (hub = github-flow) | code-workflow + github-flow + consolidate | strong bidirectional coupling + shared `superpowers` + owns guard hooks |\n| Standalone | tdd, web-browser, git-repo | depends-on targets but one-way + zero **owned** hooks → Dim-3 gate keeps them standalone |\n| External bundle signals (vendor or pin) | superpowers (shared by 3 — Dim 2), commit-tidy (narrow from git-repo `depends-on`), next + wip (narrow from `consolidate/next` `Skill()` handoff) | Dim 2 + outside-set surfacing |\n\nTwo discriminators kept the cluster honest:\n- **Dim-3 ownership gate** for tdd/web-browser/git-repo (heavily referenced but own no hooks → standalone).\n- **Outside-set surfacing** for `commit-tidy`, `next`, `wip` (would have been dropped by inner-loop restriction — the audit must report them as bundle signals even though no inside-set member matches).\n\n## Notes\n\n- Affinity scoring is a **recommendation aid**, not an automatic action — never create/move a plugin without the AskUserQuestion above.\n- Dimension 3 is the discriminator most often ignored: do not recommend a plugin for a coupled pair that installs no hooks/commands and gains nothing from packaging.\n- Reuse the cross-skill edge data already produced for dependency diagrams if one exists (e.g., `~/.agents/docs/skill-dependencies*.md`) instead of recomputing.\n\nFile v0.8.0:create.md\n\n# Plugin Creation\n\nGuide for authoring Claude Code plugins.\n\n## Structure\n\n```\nplugin-name/\n├── .claude-plugin/\n│   └── plugin.json          # Required: plugin metadata\n├── commands/                 # Slash commands (optional)\n│   └── my-command.md\n├── agents/                   # Specialized agents (optional)\n│   └── my-agent.md\n├── skills/                   # Agent Skills (optional)\n│   └── my-skill/\n│       └── SKILL.md\n├── hooks/                    # Event handlers (optional)\n├── .mcp.json                 # MCP server config (optional)\n└── README.md\n```\n\n## plugin.json\n\n```json\n{\n  \"name\": \"plugin-name\",\n  \"description\": \"What the plugin does\",\n  \"version\": \"1.0.0\",\n  \"author\": {\n    \"name\": \"Author Name\",\n    \"email\": \"email@example.com\"\n  }\n}\n```\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `name` | string | yes | Lowercase, hyphens only. Must match directory name |\n| `description` | string | yes | Plugin functionality description |\n| `version` | string | yes | Semver (e.g., \"1.0.0\") |\n| `author.name` | string | no | Author name |\n| `author.email` | string | no | Author email |\n\n## Marketplace entry: narrowing components with `strict`\n\nA marketplace.json plugin entry may point `source` at a directory that already\n**auto-discovers** components (`commands/`, `agents/`, `skills/`, `hooks/`). This is\ncommon with `source: \"./\"`, where the repo root is the marketplace root and its\n`skills/` directory is auto-discovered.\n\nWhen such an entry *also* lists explicit component paths (`skills`, `hooks`,\n`commands`, `agents`) — typically to expose only a **subset** of what the source root\nholds — you MUST set `\"strict\": true` on the entry. `strict: true` makes the\nmarketplace entry the **authoritative** component source: the explicit paths take\nover and only the listed components load.\n\nWith the default `strict: false`, the explicit paths and the auto-discovered\ncomponents are treated as two competing manifests → Claude Code rejects the plugin\nwith a `conflicting manifests` load error (see `troubleshoot.md`).\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | Add `skills`/`hooks` paths to a `source: \"./\"` entry and leave `strict` unset (defaults to false) | Set `\"strict\": true` so the entry's component list is authoritative |\n| 2 | Resolve the resulting conflict by deleting the entry's component paths | Deleting them re-broadens the plugin to the whole auto-discovered set (e.g., the entire `skills/` collection) — the opposite of the narrowing intent. Use `strict: true` instead |\n| 3 | Assume two plugins sharing `source: \"./\"` can each auto-discover a different subset | Auto-discovery yields the same full set for both. The narrowed plugin must declare explicit paths **and** `strict: true` |\n\nExample — expose only one skill plus its hooks from a multi-skill repo root:\n\n```jsonc\n{\n  \"name\": \"ralph\",\n  \"source\": \"./\",\n  \"skills\": [\"./skills/ralph\"],   // narrowed subset\n  \"hooks\": { /* SessionStart / PreToolUse ... */ },\n  \"strict\": true                   // entry is authoritative — required when narrowing on an auto-discovering source\n}\n```\n\n## Validation Checklist\n\n- [ ] `.claude-plugin/plugin.json` exists\n- [ ] `name` matches directory name\n- [ ] `version` is valid semver\n- [ ] All component files have frontmatter\n- [ ] README.md present\n\n## Plugin Locations\n\n| Location | Purpose |\n|----------|---------|\n| `~/.claude/plugins/my-plugin/` | Personal |\n| `.claude/plugins/my-plugin/` | Project-scoped |\n\nFile v0.8.0:dev-reflect.md\n\n# Dev Reflect\n\nReflect a **local dev source repo**'s plugin/skill changes directly into the **registered Claude Code marketplace clone** (`~/.claude/plugins/marketplaces/<marketplace>/`) for local testing **before** commit/push.\n\n## When to Use\n\n- You develop a skill/plugin in a local source repo (e.g. `~/ghq/github.com/<org>/<repo>`) and want to test it in this Claude Code install before pushing to GitHub.\n- The marketplace clone is normally synced from GitHub by Claude Code. This bypasses that round-trip for fast local iteration.\n- A new skill/topic/hook is not detected because the clone (and `~/.claude/skills/`) does not yet contain it.\n\n## Direction\n\n```\ndev source repo (SoT)                 registered marketplace clone (test target)\n~/ghq/github.com/<org>/<repo>   ──►   ~/.claude/plugins/marketplaces/<marketplace>/\n  .claude-plugin/marketplace.json       .claude-plugin/marketplace.json  (plugin entries upserted)\n  skills/ agents/ commands/ hooks/      skills/ agents/ commands/ hooks/  (synced)\n```\n\nThe source repo is the source of truth. The clone is a disposable test target — a later GitHub re-sync overwrites it.\n\n## Precondition — the clone must not be the source repo itself (HARD STOP)\n\nSome setups register the marketplace by **symlinking it at the source repo**:\n\n```bash\n$ ls -ld ~/.claude/plugins/marketplaces/<marketplace>\nlrwxr-xr-x ... ~/.claude/plugins/marketplaces/<marketplace> -> ~/ghq/github.com/<org>/<repo>\n```\n\nWhen that holds, `--source` and the clone resolve to the **same repository**, and step 1's\n`rsync -a --delete` overwrites the very checkout you develop in — removing every file the\nchecked-out branch has but `--source` does not. If that checkout sits on an unrelated feature\nbranch, this destroys its work.\n\nCheck before every run:\n\n```bash\nCLONE=$(cd ~/.claude/plugins/marketplaces/<marketplace> && pwd -P)\nSRC=$(git -C <source> rev-parse --show-toplevel)\nSRC_ROOT=$(git -C <source> rev-parse --path-format=absolute --git-common-dir | sed 's|/\\.git$||')\n[ \"$CLONE\" = \"$SRC\" ] || [ \"$CLONE\" = \"$SRC_ROOT\" ] && echo \"SAME REPO — do not run dev-reflect\"\n```\n\nA **git worktree of the same repo also counts as \"same\"**: its `--show-toplevel` differs from\nthe clone, so a naive comparison passes, yet the clone still points at the main checkout and\nthe `--delete` still lands on another branch's tree. Compare against the common git dir too,\nas above.\n\n**When they are the same, dev-reflect has nothing to do.** The plugin already loads from the\nsource repo, so the active hook/skill files are simply whatever the checked-out branch holds.\nLand the change on that branch (merge the PR, or check the branch out) instead of copying.\n\nConfirm which path is genuinely active from the plugin's own artifacts — e.g. a hook's debug-log\nmtime — rather than assuming `plugins/cache/`. A cache copy can sit untouched for weeks while\nthe symlinked repo path is the one actually executing.\n\n## Usage\n\n```bash\nnode_or_bash=\"$HOME/.claude/skills/cc-plugin/scripts/dev-reflect.sh\"\nbash \"$node_or_bash\" \\\n  --source ~/ghq/github.com/<org>/<repo> \\\n  --marketplace <marketplace-name> \\\n  [--enable <plugin-name>] \\\n  [--dry-run]\n```\n\n| Flag | Meaning |\n|------|---------|\n| `--source` | Local dev repo (must have `.claude-plugin/marketplace.json`) |\n| `--marketplace` | Clone name under `~/.claude/plugins/marketplaces/` (the registered marketplace name) |\n| `--enable` | Optional. Enable `<plugin>@<marketplace>` in `settings.json` (backup written) |\n| `--dry-run` | Print actions without writing |\n\nFind the marketplace name: `jq -r '.name' ~/.claude/plugins/marketplaces/<dir>/.claude-plugin/marketplace.json`, or check `extraKnownMarketplaces` in `settings.json`.\n\n## What It Does\n\n1. **Sync component dirs** (`skills/ agents/ commands/ hooks/ plugins/`) source → clone (`rsync --delete` when available, else additive `cp -r`).\n2. **Upsert** the source's `marketplace.json` plugin entries into the clone by name — clone-only entries are preserved, matching/new entries from source override/add.\n3. **`chmod +x`** synced hook scripts.\n4. **Optional enable** the plugin in `settings.json` (with `settings.json.bak-dev-reflect` backup).\n5. **Print the 4-step plugin-activation verification + reload reminder.**\n\n## Don't / Do\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | Conclude \"works\" right after the clone is patched | Plugins load at session start. Restart / new session, then verify Skill-tool detection (step 4 stays \"NEXT SESSION\") |\n| 2 | Treat the clone edit as durable | Clone edits are a test shortcut; a GitHub re-sync overwrites them. Commit/push the source repo to persist |\n| 3 | Enable both the bundling plugin (`source: \"./\"`) and a sub-plugin that re-declares the same skill | Enable one. Two enabled plugins declaring the same skill name collide |\n| 4 | Overwrite the clone's `marketplace.json` wholesale | Upsert by plugin name (the script does this) so a divergent clone keeps its own entries |\n| 5 | Skip the backup when touching `settings.json` | `--enable` writes `settings.json.bak-dev-reflect` first; keep it until verified |\n| 6 | Run dev-reflect when the marketplace entry is a symlink to the source repo | Resolve both paths first (see Precondition). Identical → the reflect is unnecessary *and* destructive: land the change on the checked-out branch instead |\n\n## Verification (after reload)\n\n1. **Skill detected** — the skill appears in the available-skills list, or `Skill(\"<name>\")` resolves.\n2. **SessionStart hooks** — guard/inject markers appear in the session's `additionalContext`.\n3. **PreToolUse hooks** — the declared matcher fires on the target tool.\n\n## Manual Fallback\n\nIf the script is unavailable, the same effect, done by hand:\n\n```bash\nSRC=~/ghq/github.com/<org>/<repo>\nCLONE=~/.claude/plugins/marketplaces/<marketplace>\ncommand cp -r \"$SRC/skills/.\" \"$CLONE/skills/\"\nRALPH=$(jq '.plugins[] | select(.name==\"<plugin>\")' \"$SRC/.claude-plugin/marketplace.json\")\njq --argjson r \"$RALPH\" '.plugins += [$r]' \"$CLONE/.claude-plugin/marketplace.json\" > /tmp/mp && command cp /tmp/mp \"$CLONE/.claude-plugin/marketplace.json\"\njq '.enabledPlugins[\"<plugin>@<marketplace>\"] = true' ~/.claude/settings.json > /tmp/s && command cp /tmp/s ~/.claude/settings.json\n```\n\n## Relation to Other Topics\n\n- `marketplace` — clone/list/update marketplace repos (GitHub → clone). dev-reflect is the reverse, local-only test path (dev repo → clone).\n- `troubleshoot` — if a reflected plugin still does not load after reload (cache miss / load error), route there.\n\nFile v0.8.0:hud.md\n\n# OMC HUD Statusline Configuration\n\nConfigure the Oh My Claudecode (OMC) HUD statusline that renders via `~/.claude/hud/omc-hud.mjs`.\n\n## When to Use\n\n- Hide the `[OMC#x.x.x]` version label in the statusline\n- Toggle individual HUD segments (ralph, autopilot, agents, todos, contextBar, etc.)\n- Switch HUD presets (`minimal`, `focused`, `full`, `dense`, `analytics`, `opencode`)\n- Tune color thresholds for context usage warnings\n- Diagnose HUD output anomalies before reaching for the wrapper sed fallback\n\n## Anatomy\n\nThe HUD pipeline has three layers:\n\n```\n~/.claude/settings.json (statusLine.command)\n  └─→ ~/.claude/hud/omc-hud.mjs (wrapper, resolves dist source)\n        └─→ ~/.claude/plugins/cache/omc/oh-my-claudecode/<version>/dist/hud/index.js (renderer)\n```\n\nThe wrapper picks `dist/hud/index.js` in this priority order:\n\n1. Dev paths (only when `OMC_DEV=1`)\n2. Plugin cache under `~/.claude/plugins/cache/omc/oh-my-claudecode/<version>/`\n3. Global `oh-my-claudecode` npm install\n\nIf no source is found, the wrapper prints a `[OMC HUD]` diagnostic and exits.\n\n## Configuration Methods\n\n### A. Official `omcHud` block in settings.json\n\nPlace under the top-level `omcHud` key in `~/.claude/settings.json` (newer HUD versions read this block). The block below lists every documented key with its default and effect — toggle the ones you want and delete the rest, or paste the whole catalog and edit values in place.\n\n```jsonc\n{\n  \"omcHud\": {\n    \"preset\": \"focused\",                 // bulk selector: \"minimal\" | \"focused\" | \"full\" | \"dense\" | \"analytics\" | \"opencode\"\n    \"elements\": {\n      \"omcLabel\": true,                  // [OMC#x.x.x] version prefix at the start of the line  → set false to hide\n      \"ralph\": true,                     // Ralph autonomous-loop counter (e.g. \"ralph:3/10\")\n      \"autopilot\": true,                 // Autopilot mode indicator\n      \"prdStory\": true,                  // current PRD / story id (e.g. \"US-002 (2/5)\")\n      \"activeSkills\": true,              // names of skills currently in scope\n      \"lastSkill\": true,                 // last invoked skill name\n      \"contextBar\": true,                // visual bar showing ctx-window usage\n      \"agents\": true,                    // spawned agent panel\n      \"agentsFormat\": \"multiline\",       // agents layout: \"multiline\" | \"inline\"\n      \"backgroundTasks\": true,           // background task counter (e.g. \"bg:3/5\")\n      \"todos\": true,                     // todo counter (e.g. \"todos:2/5\")\n      \"thinking\": true,                  // thinking-mode indicator\n      \"thinkingFormat\": \"text\",          // thinking style: \"text\" | \"icon\"\n      \"permissionStatus\": false,         // current permission-mode badge\n      \"apiKeySource\": false,             // source of the active API key\n      \"profile\": true,                   // profile name segment\n      \"promptTime\": true,                // last prompt timestamp\n      \"sessionHealth\": true,             // session health dot (green/yellow/red)\n      \"useBars\": true,                   // render bars instead of plain percentages\n      \"showCallCounts\": true,            // include \"5h:14%\" style call-count rates\n      \"callCountsFormat\": \"auto\",        // rate format: \"auto\" | \"compact\" | \"verbose\"\n      \"safeMode\": true,                  // honor terminal-width / unicode-safe rendering\n      \"maxOutputLines\": 4                // hard cap on multi-line panel height\n    },\n    \"thresholds\": {\n      \"contextWarning\": 70,              // % → yellow tint on the context bar\n      \"contextCompactSuggestion\": 80,    // % → hint to run /compact\n      \"contextCritical\": 85,             // % → red tint\n      \"ralphWarning\": 7                  // ralph loop count → yellow tint\n    },\n    \"staleTaskThresholdMinutes\": 30,     // minutes since last task update → mark stale\n    \"contextLimitWarning\": {\n      \"threshold\": 80,                   // % at which the warning fires\n      \"autoCompact\": false               // run /compact automatically when threshold hit\n    }\n  }\n}\n```\n\nMinimal form (only override the keys you care about — newer HUD versions merge missing keys from the defaults above):\n\n```jsonc\n{\n  \"omcHud\": {\n    \"elements\": {\n      \"omcLabel\": false                  // hide the [OMC#x.x.x] prefix\n    }\n  }\n}\n```\n\nMost-toggled keys at a glance:\n\n| Key | Effect |\n|-----|--------|\n| `elements.omcLabel` | `[OMC#x.x.x]` version prefix |\n| `elements.ralph` | Ralph loop counter |\n| `elements.contextBar` | Context-usage bar |\n| `elements.todos` | Todo counter |\n| `elements.agents` | Spawned agent panel |\n| `preset` | Bulk-select a curated element set |\n\n### B. Compact alias under `omcHud` (older HUD builds)\n\nSome HUD versions consume a smaller schema (path-segment elements only). Use this when method A keys are not recognized but the block itself is.\n\n```jsonc\n{\n  \"omcHud\": {\n    \"preset\": \"focused\",                 // bulk selector: \"minimal\" | \"focused\" | \"full\" | \"dense\" | \"analytics\" | \"opencode\"\n    \"elements\": {\n      \"cwd\": true,                       // current working directory segment\n      \"gitRepo\": true,                   // git repo name segment\n      \"gitBranch\": true,                 // git branch segment\n      \"showTokens\": true,                // token usage segment\n      \"contextBar\": true,                // visual context-usage bar\n      \"agents\": true,                    // spawned agent panel\n      \"todos\": true,                     // todo counter\n      \"ralph\": true,                     // Ralph loop counter\n      \"autopilot\": true                  // autopilot indicator\n    },\n    \"maxWidth\": 120,                     // hard cap on total statusline width\n    \"wrapMode\": \"truncate\"               // overflow handling: \"truncate\" | \"wrap\"\n  }\n}\n```\n\n### C. Wrapper sed fallback (when settings.json schema rejects `omcHud`)\n\nClaude Code's `settings.json` schema may not yet include `omcHud` as a known field, causing post-edit validation errors (`Unrecognized field: omcHud`). In that case, post-process the wrapper output instead.\n\nPatch `~/.claude/hud/omc-hud.mjs` to strip the OMC label from stdout while preserving the rest of the statusline:\n\n```bash\n# Pipe the wrapper through sed in settings.json\n\"statusLine\": {\n  \"type\": \"command\",\n  \"command\": \"node $HOME/.claude/hud/omc-hud.mjs | sed -E 's/\\\\x1b\\\\[1m\\\\[OMC#[^]]*\\\\]\\\\x1b\\\\[0m[[:space:]]*//'\"\n}\n```\n\nThe sed expression removes the bolded `[OMC#...]` ANSI sequence plus the trailing space. Adjust the pattern if the wrapper changes how the label is escaped.\n\n### D. Disable HUD entirely\n\n```jsonc\n{\n  \"statusLine\": {\n    \"type\": \"command\",\n    \"command\": \"true\"\n  }\n}\n```\n\nThe built-in Claude Code statusline takes over (cwd + model summary).\n\n## Version Compatibility Notes\n\n| HUD source | `omcHud` config support |\n|------------|-------------------------|\n| `dist/hud/index.js` in current plugin cache | Verify with `grep -o \"omcHud\" ~/.claude/plugins/cache/omc/oh-my-claudecode/*/dist/hud/index.js` |\n| Source returns 0 hits | HUD version does not consume `omcHud` — use method C (wrapper sed) or upgrade |\n| Source returns matches | Method A / B should work after the next session start |\n\n**HUD 4.9.1** (verified 2026-05-16): `dist/hud/index.js` contains **no `omcHud` references**. Method A/B require an upgraded build; until then use method C.\n\n## Diagnostics\n\n```bash\n# Verify the wrapper output as Claude Code would receive it\necho '{\"workspace\":{\"current_dir\":\"'\"$PWD\"'\"},\"model\":{\"display_name\":\"Opus\",\"id\":\"claude-opus-4-7\"}}' \\\n  | node ~/.claude/hud/omc-hud.mjs\n\n# Inspect HUD source for known config keys\nHUD=~/.claude/plugins/cache/omc/oh-my-claudecode/*/dist/hud/index.js\ngrep -oE 'omcHud[A-Za-z]*|OMC_[A-Z_]+' $HUD | sort -u\n\n# Force the dev path (when iterating on HUD source locally)\nOMC_DEV=1 node ~/.claude/hud/omc-hud.mjs\n```\n\nIf the wrapper prints `[OMC HUD] Plugin installed but not built`, follow `troubleshoot.md` \"Plugin HUD load failed — npm install && npm run build\".\n\n## Do & Don't\n\n| # | Don't (forbidden) | Do (correct alternative) |\n|---|-------------------|-----------------------|\n| 1 | Edit `dist/hud/index.js` (minified) directly | Configure via `omcHud` settings or wrap with sed/awk |\n| 2 | Delete `~/.claude/hud/omc-hud.mjs` to \"hide OMC\" | Keep the wrapper; either configure `omcHud` or swap the `statusLine.command` |\n| 3 | Add `omcHud` block then ignore the schema validation error | If `Unrecognized field: omcHud` appears, fall back to method C (wrapper sed) — do not silently leave the unrecognized key |\n| 4 | Set `OMC_DEV=1` permanently in user env | Use it only during HUD source iteration; remove afterward |\n\n## Related\n\n- `cache.md` — clean stale `temp_*` directories before debugging HUD source paths\n- `marketplace.md` — update the `omc` marketplace to pull newer HUD builds\n- `troubleshoot.md` — HUD source missing or unbuilt\n\nFile v0.8.0:marketplace.md\n\n# Marketplace Management\n\nClone, list, and update plugin marketplace repositories.\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `clone <url>` | Clone a GitHub repo into marketplaces directory |\n| `list` | List installed marketplaces with remote URLs |\n| `update [name]` | Git pull one or all marketplaces |\n\n## Paths\n\n```\n~/.claude/plugins/marketplaces/<name>/\n```\n\n## clone\n\n```bash\ngit clone <url> ~/.claude/plugins/marketplaces/<repo-name>\n```\n\n- Extracts repo name from URL (last path segment, strips .git)\n- If already exists → AskUserQuestion (overwrite or cancel)\n\n## list\n\n```bash\n# For each marketplace directory\ngit -C <dir> remote get-url origin\n```\n\nOutput format:\n\n```\n| Name | Remote URL | Last Updated |\n|------|------------|--------------|\n```\n\n## update\n\n```bash\n# Single marketplace\ngit -C ~/.claude/plugins/marketplaces/<name> pull\n\n# All marketplaces\nfor dir in ~/.claude/plugins/marketplaces/*/; do\n  git -C \"$dir\" pull\ndone\n```\n\nAfter update: restart Claude Code to reload cached plugins.\n\nFile v0.8.0:skill-card.md\n\n## Description:\n\nClaude Code plugin lifecycle management for creating, managing, reflecting, troubleshooting, and cleaning plugin and marketplace state.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[drumrobot](https://clawhub.ai/user/drumrobot)\n\n### License/Terms of Use:\n\nMIT\n\n## Use Case:\n\nDevelopers and engineers use this skill to author Claude Code plugins, manage marketplace clones, troubleshoot plugin loading issues, configure HUD statusline behavior, and clean plugin cache state.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The dev-reflect helper can bulk-sync or delete plugin files in marketplace clones and cached plugin version directories.\n\nMitigation: Run with --dry-run first, review source and marketplace paths, and confirm the marketplace clone is not the source repository or a worktree of the same repository before syncing.\n\nRisk: The optional --enable flow persistently changes Claude Code settings.\n\nMitigation: Use --enable only when intentionally enabling a plugin, review the resulting settings.json change, and keep the generated backup until the plugin behavior is verified.\n\nRisk: Cache cleanup can remove old plugin cache versions and temporary marketplace directories.\n\nMitigation: Use --dry-run to preview deletions and confirm the cache path and retained latest version before allowing cleanup.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/drumrobot/skills/cc-plugin)\n- [SKILL.md](artifact/SKILL.md)\n- [Cache Cleanup](artifact/cache.md)\n- [Plugin Clustering Recommendation](artifact/clustering.md)\n- [Plugin Creation](artifact/create.md)\n- [Dev Reflect](artifact/dev-reflect.md)\n- [OMC HUD Statusline Configuration](artifact/hud.md)\n- [Marketplace Management](artifact/marketplace.md)\n- [Plugin Troubleshooting](artifact/troubleshoot.md)\n- [Changelog](artifact/CHANGELOG.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Code, Shell commands, Configuration, Guidance]\n\n**Output Format:** [Markdown guidance with inline shell commands, JSON examples, and configuration snippets.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May recommend or run local filesystem operations for Claude Code plugin directories when the agent is given appropriate tools.]\n\n## Skill Version(s):\n\n0.8.0 (source: server release metadata, released 2026-09-24)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v0.8.0:troubleshoot.md\n\n# Plugin Troubleshooting\n\nDiagnose and fix plugin installation failures, cache sync issues, and HUD errors.\n\n## Common Issues\n\n### \"Plugin not installed\" / HUD Error\n\n**Cause**: Cache directory missing or incomplete.\n\n**Diagnosis**:\n\n```bash\n# Check marketplace exists (plugin lives under marketplaces/<marketplace>/plugins/<plugin-name>/)\nls ~/.claude/plugins/marketplaces/<marketplace>/plugins/<plugin-name>/\n\n# Check cache exists\nls ~/.claude/plugins/cache/<marketplace>/<plugin-name>/\n\n# Check for built dist (required for HUD plugins)\nls ~/.claude/plugins/cache/<marketplace>/<plugin-name>/<version>/dist/hud/index.js\n```\n\n**Fix — Sync marketplace to cache**:\n\n```bash\nMARKET=~/.claude/plugins/marketplaces/<marketplace>/plugins/<plugin-name>\nCACHE=~/.claude/plugins/cache/<marketplace>/<plugin-name>/<version>\n\nmkdir -p \"$CACHE\"\n\n# Copy essential directories\nfor item in .claude-plugin .mcp.json agents CLAUDE.md dist hooks scripts skills; do\n  [ -e \"$MARKET/$item\" ] && cp -r \"$MARKET/$item\" \"$CACHE/\"\ndone\n```\n\nAfter syncing: **restart Claude Code** (cache loads at session start).\n\n### Plugin recognized but skills/commands not loading\n\n**Cause**: `.claude-plugin/plugin.json` missing from cache.\n\n```bash\ncp -r ~/.claude/plugins/marketplaces/<marketplace>/plugins/<name>/.claude-plugin \\\n      ~/.claude/plugins/cache/<marketplace>/<name>/<version>/\n```\n\n### \"Plugin X has conflicting manifests\" — load error\n\n**Symptom** (shown by `/plugin`, `/reload-plugins`, or `/doctor`):\n\n```\nPlugin <name> has conflicting manifests: both plugin.json and marketplace entry\nspecify components. Set strict: true in marketplace entry or remove component\nspecs from one location\n```\n\n**Cause**: The plugin's marketplace.json entry lists explicit component paths\n(`skills`, `hooks`, `commands`, `agents`) while its `source` directory *also*\nauto-discovers components — e.g. `source: \"./\"` whose root holds a `skills/`\ndirectory. With the default `strict: false`, the explicit paths and the\nauto-discovered components are two competing manifests.\n\n**Diagnosis**:\n\n```bash\nMP=~/.claude/plugins/marketplaces/<marketplace>/.claude-plugin/marketplace.json\n# 1. Does the entry specify component paths?\ngrep -nE '\"(skills|hooks|commands|agents)\"' \"$MP\"\n# 2. Does the source root auto-discover components? (source: \"./\" + a skills/ dir, etc.)\nls ~/.claude/plugins/marketplaces/<marketplace>/{skills,hooks,commands,agents} 2>/dev/null\n```\n\n**Fix — set `strict: true` on the entry** (makes the entry authoritative; only its\nlisted components load):\n\n```jsonc\n{\n  \"name\": \"<plugin>\",\n  \"source\": \"./\",\n  \"skills\": [\"./skills/<one>\"],\n  \"strict\": true        // ← was false / absent\n}\n```\n\n| # | Don't | Do |\n|---|-------|-----|\n| 1 | \"Fix\" it by removing the entry's `skills`/`hooks` paths | Removing them re-broadens the plugin to the whole auto-discovered collection (e.g. the entire `skills/`). Set `strict: true` to keep the narrowed set |\n| 2 | Edit only the cache marketplace.json | Edit **both** the cache (loaded copy) and the source repo's marketplace.json (canonical) — otherwise the next sync reverts it (see [dev-reflect.md](./dev-reflect.md)) |\n\nAfter editing run `/reload-plugins` (or restart) — the `conflicting manifests` line\ndisappears and the entry's hooks/skills load. Authoring rule + example:\n[create.md](./create.md) \"Marketplace entry: narrowing components with `strict`\".\n\n### Plugin HUD load failed — \"npm install && npm run build\"\n\n**Cause**: `dist/` not built. Plugin has TypeScript source that needs compilation.\n\n```bash\ncd ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>\nnpm install && npm run build\n```\n\n### MCP servers not connecting after plugin install\n\n**Cause**: `.mcp.json` not in cache.\n\n```bash\ncp ~/.claude/plugins/marketplaces/<marketplace>/plugins/<name>/.mcp.json \\\n   ~/.claude/plugins/cache/<marketplace>/<name>/<version>/\n```\n\n### Symlink-Based Dual-Environment Setup — `known_marketplaces.json` Corruption\n\n**Symptom**:\n\n```text\nFailed to refresh marketplace 'claude-plugins-official': Marketplace 'claude-plugins-official' has a\ncorrupted installLocation (C:\\Users\\<USER>\\.claude\\plugins\\marketplaces\\claude-plugins-official)\n— expected a path inside /home/<user>/.claude/plugins/marketplaces.\nThis can happen after cross-platform path writes or manual edits to known_marketplaces.json.\nRun: claude plugin marketplace remove \"<name>\" and re-add it.\n```\n\nAlso presents as `Plugin \"<name>\" not found in marketplace \"<marketplace>\"` even when the plugin\nclearly exists in the marketplace's `marketplace.json`.\n\n**Root Cause**:\n\nWhen `/home/<user>/.claude` is a **symlink to Windows `~/.claude`** (or any other dual-platform\nmount), both environments share the same `known_marketplaces.json` file. Claude Code writes the\nrunning environment's path into `installLocation`, but the other environment reads the same field\nand rejects the foreign path.\n\nThis is **not** a \"missing plugin\" error — it is a `known_marketplaces.json` lookup failure that\nmasks itself as a downstream plugin-not-found error. Cache directory + manifest entry can be intact\nyet the marketplace fails to resolve.\n\n| Layer | What appears | What's actually true |\n|-------|--------------|---------------------|\n| `settings.json` `enabledPlugins: true` | Plugin is enabled | ✅ Enabled, but reference is bound to a broken marketplace name |\n| `marketplaces/<name>/.claude-plugin/marketplace.json` plugin entry | Plugin listed | ✅ Listed correctly |\n| `cache/<name>/<plugin>/<ver>/` directory | Cache exists | ✅ Cache is valid |\n| `known_marketplaces.json` `installLocation` | Path string present | ❌ Path is for the **other** environment — Claude Code rejects it |\n\n**Diagnosis**:\n\n```bash\n# 1. Check filesystem topology\nreadlink ~/.cl\n\nArchive v0.7.2: 14 files, 34524 bytes\n\nFiles: cache.md (1125b), CHANGELOG.md (7659b), clustering.md (22997b), create.md (3583b), dev-reflect.md (6558b), hud.md (8900b), LICENSE (1063b), marketplace.md (1036b), resources/cache-cleanup.sh (4418b), scripts/dev-reflect.sh (6660b), skill-card.md (3129b), SKILL.md (3029b), troubleshoot.md (13707b), _meta.json (128b)\n\nArchive v0.7.1: 14 files, 33499 bytes\n\nFiles: cache.md (1125b), CHANGELOG.md (7026b), clustering.md (22997b), create.md (3583b), dev-reflect.md (6558b), hud.md (8900b), LICENSE (1063b), marketplace.md (1036b), resources/cache-cleanup.sh (4418b), scripts/dev-reflect.sh (4658b), skill-card.md (2589b), SKILL.md (3029b), troubleshoot.md (13707b), _meta.json (128b)\n\nArchive v0.7.0: 14 files, 33426 bytes\n\nFiles: cache.md (1125b), CHANGELOG.md (6696b), clustering.md (22997b), create.md (3583b), dev-reflect.md (6558b), hud.md (8900b), LICENSE (1063b), marketplace.md (1036b), resources/cache-cleanup.sh (4418b), scripts/dev-reflect.sh (4658b), skill-card.md (2618b), SKILL.md (3029b), troubleshoot.md (13707b), _meta.json (128b)\n\nArchive v0.6.2: 14 files, 33277 bytes\n\nFiles: cache.md (1125b), CHANGELOG.md (6234b), clustering.md (22997b), create.md (3583b), dev-reflect.md (6558b), hud.md (8900b), LICENSE (1063b), marketplace.md (1036b), resources/cache-cleanup.sh (4418b), scripts/dev-reflect.sh (4658b), skill-card.md (2587b), SKILL.md (3029b), troubleshoot.md (13707b), _meta.json (128b)\n\nArchive v0.6.1: 14 files, 32363 bytes\n\nFiles: cache.md (1125b), CHANGELOG.md (5981b), clustering.md (22997b), create.md (3583b), dev-reflect.md (4519b), hud.md (8900b), LICENSE (1063b), marketplace.md (1036b), resources/cache-cleanup.sh (4418b), scripts/dev-reflect.sh (4658b), skill-card.md (2657b), SKILL.md (3029b), troubleshoot.md (13707b), _meta.json (128b)\n\nArchive v0.6.0: 14 files, 32020 bytes\n\nFiles: cache.md (1125b), CHANGELOG.md (5337b), clustering.md (22997b), create.md (3583b), dev-reflect.md (4519b), hud.md (8900b), LICENSE (1063b), marketplace.md (1036b), resources/cache-cleanup.sh (4418b), scripts/dev-reflect.sh (4658b), skill-card.md (2417b), SKILL.md (3029b), troubleshoot.md (13707b), _meta.json (128b)\n\nArchive v0.5.3: 14 files, 32080 bytes\n\nFiles: cache.md (1125b), CHANGELOG.md (5028b), clustering.md (22997b), create.md (3583b), dev-reflect.md (4519b), hud.md (8900b), LICENSE (1063b), marketplace.md (1036b), resources/cache-cleanup.sh (4418b), scripts/dev-reflect.sh (4658b), skill-card.md (2725b), SKILL.md (3029b), troubleshoot.md (13707b), _meta.json (128b)\n\nArchive v0.5.2: 14 files, 31950 bytes\n\nFiles: cache.md (1125b), CHANGELOG.md (4691b), clustering.md (22997b), create.md (3583b), dev-reflect.md (4519b), hud.md (8900b), LICENSE (1063b), marketplace.md (1036b), resources/cache-cleanup.sh (4418b), scripts/dev-reflect.sh (4658b), skill-card.md (2612b), SKILL.md (3029b), troubleshoot.md (13707b), _meta.json (128b)","readmeExcerpt":"Skill: cc-plugin Owner: drumrobot Summary: Claude Code plugin lifecycle management. cache - clean old cache versions (cleanup only — NOT for cache miss diagnosis) [cache.md], clustering - skill affinity scoring (coupling/dep/hook-ownership) → plugin bundle membership [clustering.md], create - plugin authoring guide (structure, plugin.json, components) [create.md], dev-reflect - reflect local dev repo into marketplace","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"Marketplaces: ~/.claude/plugins/marketplaces/\nCache:        ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/"},{"language":"bash","snippet":"resources/cache-cleanup.sh [--dry-run] [--verbose]"},{"language":"bash","snippet":"# For skill A, find which other skills its topics reference (topic + depends-on)\n# Patterns are intentionally narrow to avoid false positives from filesystem\n# paths like `org/repo` and shell commands like `/repo remote`.\nSKILLS_DIR=~/.claude/skills\n\nextract_refs() {\n  local A=\"$1\" a; a=$(basename \"$A\")\n  # 1. Skill() tool call — most specific, high precision\n  grep -rhoE 'Skill\\(\"[a-z][a-z-]*\"' \"$A\" 2>/dev/null \\\n    | grep -oE '\"[a-z][a-z-]*\"' | tr -d '\"'\n  # 2. Markdown link to a topic file: require boundary char before <skill>/<topic>.md\n  #    (excludes `/works/group/repo/file.md` style paths)\n  grep -rhoE '(^|[[:space:](\"`./])([a-z][a-z-]+)/([a-z][a-z-]+)\\.md' \"$A\" 2>/dev/null \\\n    | grep -oE '[a-z][a-z-]+/[a-z][a-z-]+\\.md' | cut -d/ -f1\n  # 3. Slash-command reference: require boundary so `~/path/repo remote` is excluded\n  grep -rhoE '(^|[[:space:]\"`(])/[a-z][a-z-]+ +[a-z][a-z-]+' \"$A\" 2>/dev/null \\\n    | grep -oE '/[a-z][a-z-]+' | tr -d '/'\n  # 4. frontmatter depends-on — inline AND YAML block\n  awk '/^---$/{f=!f; next} f' \"$A/SKILL.md\" 2>/dev/null | awk '\n    /^depends-on: *\\[/ { gsub(/.*\\[|\\].*/, \"\"); gsub(/,/, \" \"); print; next }\n    /^depends-on:/    { block=1; next }\n    block && /^  *- / { gsub(/^  *- */, \"\"); print; next }\n    block && /^[^ ]/  { block=0 }\n  '\n}\n\nfor A in \"$SKILLS_DIR\"/*/; do\n  a=$(basename \"$A\")\n  extract_refs \"$A\" | sort -u | while read tok; do\n    [ -d \"$SKILLS_DIR/$tok\" ] && [ \"$tok\" != \"$a\" ] && echo \"$a -> $tok\"\n  done\ndone | sort | uniq -c | sort -rn"},{"language":"bash","snippet":"# Map each skill's depends-on (inline OR YAML block), then find shared external dep\nfor S in ~/.claude/skills/*/; do\n  s=$(basename \"$S\")\n  dep=$(awk '/^---$/{f=!f; next} f' \"$S/SKILL.md\" 2>/dev/null | awk '\n    /^depends-on: *\\[/ { gsub(/.*\\[|\\].*/, \"\"); gsub(/,/, \" \"); print; next }\n    /^depends-on:/    { block=1; next }\n    block && /^  *- / { gsub(/^  *- */, \"\"); printf \"%s \", $0; next }\n    block && /^[^ ]/  { block=0; print \"\" }\n    END { if (block) print \"\" }\n  ')\n  [ -n \"$dep\" ] && echo \"$s: $dep\"\ndone"},{"language":"bash","snippet":"# Per-skill hook + command footprint\nfor S in ~/.claude/skills/*/; do\n  s=$(basename \"$S\")\n  hooks=$(ls \"$S\"/resources/*.sh 2>/dev/null | wc -l | tr -d ' ')\n  cmd=$(ls ~/.claude/commands/\"$s\".md 2>/dev/null | wc -l | tr -d ' ')\n  echo \"$s: hooks=$hooks cmd=$cmd\"\ndone"},{"language":"bash","snippet":"# OWNERSHIP: resources/ is the source of truth — does this skill own the hook?\nls ~/.claude/skills/<skill>/resources/*.sh 2>/dev/null\n# An installed hook with a domain-matching name but no resources/ owner is\n# UNMANAGED (cross-check `Skill(\"hook-kit\", \"audit\")`) — it is NOT this skill's footprint."}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nmetadata:\n  author: es6kr\n  version: \"0.1.0\"\nname: cc-plugin\ndescription: |\n  Claude Code plugin lifecycle management.\n  cache - clean old cache versions (cleanup only — NOT for cache miss diagnosis) [cache.md],\n  clustering - skill affinity scoring (coupling/dep/hook-ownership) → plugin bundle membership [clustering.md],\n  create - plugin authoring guide (structure, plugin.json, components) [create.md],\n  dev-reflect - reflect local dev repo into marketplace clone for pre-push testing [dev-reflect.md],\n  hud - OMC HUD statusline (omcHud elements, omcLabel, wrapper sed fallback) [hud.md],\n  marketplace - clone/list/update marketplace repos [marketplace.md],\n  troubleshoot - cache miss/error, install fail, cache sync, HUD diagnostics — ALL plugin errors route here [troubleshoot.md].\n  \"plugin\", \"marketplace\", \"plugin install\", \"plugin not installed\",\n  \"cache miss\", \"cache error\", \"plugin error\", \"load error\", \"reload errors\",\n  \"dev reflect\", \"plugin clustering\", \"bundle skills\", \"skill affinity\",\n  \"OMC HUD\", \"omcHud\", \"omcLabel\", \"statusline\", \"[OMC#\" triggers.\n---\n\n# Plugin\n\nClaude Code plugin lifecycle management: create, install, update, cache, troubleshoot.\n\n## Topics\n\n| Topic | Description | Guide |\n|-------|-------------|-------|\n| cache | **Cleanup only** — clean old plugin cache versions and temp directories. **NOT for \"cache miss\" or load errors** — use troubleshoot instead | [cache.md](./cache.md) |\n| clustering | Score skill-to-skill affinity (coupling / shared external dep / hook-ownership gate) and recommend plugin bundle membership. Feeds into `create` | [clustering.md](./clustering.md) |\n| create | Plugin authoring guide (structure, plugin.json, components) | [create.md](./create.md) |\n| dev-reflect | Reflect a local dev source repo's plugin/skill changes into the registered marketplace clone for local testing before commit/push (helper: `scripts/dev-reflect.sh`) | [dev-reflect.md](./dev-reflect.md) |\n| hud | OMC HUD statusline configuration: omcHud elements, omcLabel toggle, wrapper sed fallback, version compatibility | [hud.md](./hud.md) |\n| marketplace | Clone, list, and update marketplace repositories | [marketplace.md](./marketplace.md) |\n| troubleshoot | **All plugin errors** — cache miss, load errors, `/reload-plugins` errors, `/doctor` failures, installation failures, cache sync, HUD diagnostics | [troubleshoot.md](./troubleshoot.md) |\n\n## Routing rule (HARD STOP)\n\n| User says | Topic |\n|-----------|-------|\n| \"cache miss\", \"cache error\", \"load error\", \"reload errors\", \"plugin not loading\", \"plugin not installed\" | **troubleshoot** (NOT cache) |\n| \"cache cleanup\", \"old versions\", \"disk space\", \"remove temp_git_*\" | cache |\n\n`cache.md` only owns deletion of stale versions. Any diagnostic of \"why isn't this plugin working\" — including the literal phrase \"cache miss\" — routes to `troubleshoot.md`.\n\n## Paths\n\n```\nMarketplaces: ~/.claude/plugins/marketplaces/\nCache:        ~/.claude/plugins/cache/<marketplace>/<plugin>/<ve"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn74k8yfvftx6f062qa8fzyd8h8373jd\",\n  \"slug\": \"cc-plugin\",\n  \"version\": \"0.8.1\",\n  \"publishedAt\": 1791273332334\n}"},{"path":"cache.md","content":"# Cache Cleanup\n\nClean old plugin cache versions and temporary git directories.\n\n> **⚠️ This topic is cleanup-only.**\n> If the user says \"cache miss\", \"cache error\", \"load error\", or any plugin diagnostic phrase — **stop and route to [troubleshoot.md](./troubleshoot.md) instead**. cache.md does not diagnose anything; it only deletes stale versions.\n\n## Usage\n\n```bash\nresources/cache-cleanup.sh [--dry-run] [--verbose]\n```\n\n- `--dry-run`: Preview deletions without removing\n- `--verbose`: Show detailed output\n\n> **Platform**: cross-platform (macOS, Linux, WSL). The script tries BSD-style birthtime\n> (`stat -f \"%B\"`) first, falls back to Linux birthtime (`stat -c \"%W\"`, often `0` on filesystems\n> that don't track it), then falls back again to modification time (`stat -c \"%Y\"`) so version\n> ordering is still correct everywhere. (This note previously said \"macOS only\" — that was stale;\n> the fallback chain is already implemented in `resources/cache-cleanup.sh`.)\n\n## What It Cleans\n\n- **Old versions**: Keeps only the latest version per plugin in `~/.claude/plugins/cache/<marketplace>/<plugin>/`\n- **Temp git dirs**: Removes `temp_git_*` directories in cache root\n\n## When to Use\n\n- After plugin updates (old versions accumulate)\n- When disk space is needed\n- Periodically as maintenance"},{"path":"CHANGELOG.md","content":"# Changelog\n\n## [0.8.1](https://github.com/es6kr/skills/compare/cc-plugin-v0.8.0...cc-plugin-v0.8.1) (2026-10-04)\n\n\n### Bug Fixes\n\n* **cc-plugin:** clarify temp_git_* lives at cache root, not nested in &lt;marketplace&gt; ([680aecd](https://github.com/es6kr/skills/commit/680aecdd06e5f753eb549aee5a2a4e147fe3d86a))\n* **cc-plugin:** document WSL temp_git_* update-swap failures, fix stale platform note ([668406e](https://github.com/es6kr/skills/commit/668406e7501eaf1534d573fcf89805e167b3bf7a))\n\n\n### Documentation\n\n* **cc-plugin:** document WSL temp_git_* update-swap failures, fix stale platform note ([9e7493d](https://github.com/es6kr/skills/commit/9e7493d13e69f46eadcdb1b90194e8c5cebd1315))\n\n## [0.8.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.7.2...cc-plugin-v0.8.0) (2026-09-24)\n\n\n### Features\n\n* **fix-plan:** add pipeline log and hook integrity check scripts ([e93a432](https://github.com/es6kr/skills/commit/e93a4323b54a311fcda6855163ffe14c2c146412))\n\n\n### Bug Fixes\n\n* **cc-plugin:** restore missing skills to es6kr plugin in marketplace manifest ([6ab94b0](https://github.com/es6kr/skills/commit/6ab94b0278d626012be3378d44c634621be1fd8b))\n\n## [0.7.2](https://github.com/es6kr/skills/compare/cc-plugin-v0.7.1...cc-plugin-v0.7.2) (2026-09-20)\n\n\n### Bug Fixes\n\n* address code review feedback ([0c08bfb](https://github.com/es6kr/skills/commit/0c08bfbf2b5b737fdce685c8f15ead56c64290f4))\n* **cc-plugin:** eliminate eval-based command injection in dev-reflect.sh ([097aafe](https://github.com/es6kr/skills/commit/097aafea4adcdf39df8c4825d69ea83a66fbd4fa))\n* **cc-plugin:** sync dev-reflect.sh changes into cached plugin version dirs ([#510](https://github.com/es6kr/skills/issues/510)) ([28824f6](https://github.com/es6kr/skills/commit/28824f643b32ab05b766cdf99ddb626ffc5e3f95))\n\n## [0.7.1](https://github.com/es6kr/skills/compare/cc-plugin-v0.7.0...cc-plugin-v0.7.1) (2026-09-18)\n\n\n### Bug Fixes\n\n* **cleanup:** make the session-end report table self-sufficient ([#487](https://github.com/es6kr/skills/issues/487)) ([c4a0255](https://github.com/es6kr/skills/commit/c4a02557fb8de3b32cf337c549f62535dabf824b))\n\n## [0.7.0](https://github.com/es6kr/skills/compare/cc-plugin-v0.6.2...cc-plugin-v0.7.0) (2026-09-06)\n\n\n### Features\n\n* **cc-plugin:** implement post-commit dev-reflect and cache drift guard ([3f78c05](https://github.com/es6kr/skills/commit/3f78c054e7c00e7c33730d3378c5aff6575566e4))\n* **hooks:** migrate standalone hooks into plugin resources and fix test regressions ([d7b0060](https://github.com/es6kr/skills/commit/d7b0060ddffdd4a7b5f4f9751039ee9a79e049db))\n\n## [0.6.2](https://github.com/es6kr/skills/compare/cc-plugin-v0.6.1...cc-plugin-v0.6.2) (2026-09-01)\n\n\n### Bug Fixes\n\n* staging branch next-fix sync into main ([bbbd460](https://github.com/es6kr/skills/commit/bbbd460bf3b6b1cba4c6d07b3641afa734c89860))\n\n## [0.6.1](https://github.com/es6kr/skills/compare/cc-plugin-v0.6.0...cc-plugin-v0.6.1) (2026-08-29)\n\n\n### Bug Fixes\n\n* **cc-plugin:** remove duplicate cache-"},{"path":"clustering.md","content":"# Plugin Clustering Recommendation\n\nScore the **affinity between skills** across the ecosystem and recommend which\nskills should be bundled into a shared plugin. High mutual affinity → ship\ntogether; low affinity → keep standalone. The output of this topic feeds\ndirectly into the [create](./create.md) topic (which becomes the `plugins/<name>`\nmembership list) and the [marketplace](./marketplace.md) topic (where bundled\nplugins are published).\n\n## When to Use\n\n- \"Which of these skills belong in the same plugin?\"\n- Before publishing a plugin bundle — decide membership by signal, not by guesswork\n- After a cluster of skills grows cross-references organically and you want to formalize the boundary\n\n**Pre-flight (MANDATORY)**: before authoring any new scoring/clustering tooling\nhere, run a remote ecosystem search via `Skill(\"skill-kit\", \"route\")` Step 2b\n(this skill's own `find` topic / ClawHub) for an existing affinity/clustering\nskill. Reuse over rebuild applies to this capability too.\n\n## Two Modes — Discovery vs Candidate-set Audit\n\nClustering is invoked in two different shapes. The scoring model is the same;\nthe *scope of iteration* and the *handling of references that point outside\nthat scope* differ. Pick the mode before measuring.\n\n| Mode | Input | Iteration scope | What to do with references to skills outside the scope |\n|------|-------|-----------------|-------------------------------------------------------|\n| **Discovery** | None — scan all installed skills | All `~/.claude/skills/*/` | N/A (scope = universe; nothing is \"outside\") |\n| **Candidate-set audit** | A given list of N skills (e.g., a dependency-diagram subgraph, a proposed plugin's tentative membership) | The N candidates | **Surface separately as cluster-expansion candidates and external-bundle signals** (see \"Outside-set references\" below). Do not silently drop them |\n\nIn audit mode, an edge from candidate A to a non-candidate skill X is a real\nsignal — it means either X belongs in the cluster (expand the candidate set) or\nX is an external dependency the bundle must track (Dim 2-style). Dropping these\nedges by restricting both loops to the candidate set produces an\nunder-recommended cluster.\n\n## Scoring Model\n\nThree dimensions feed a pairwise affinity score. The first two pull skills\n*together*; the third gates whether bundling is *worth it at all*.\n\n| # | Dimension | Weight | Pulls toward | Signal source |\n|---|-----------|--------|--------------|---------------|\n| 1 | Cross-skill topic coupling | High | Bundling A+B | Directed topic→topic references between two skills (`Skill(\"B\", \"topic\")`, `B/topic.md`, `/B <topic>` inside A's topic files) |\n| 2 | Shared external dependency | Medium | Bundling A+B (and/or co-locating the dependency) | `depends-on` overlap, esp. on external skills/plugins (e.g., `superpowers`). Two skills depending on the same external surface have aligned release/version needs |\n| 3 | Command + hook footprint | Low (gate, not pull) | Whether *any* plugin is"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1711,"uniquenessScore":41,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T19:09:11.678Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T19:09:11.678Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T03:51:36.144Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}