[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6J868M4DWQKVGQW3YJREZSY":3,"skill-same:01M6J868M4DWQKVGQW3YJREZSY":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":14,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":61},"01M6J868M4DWQKVGQW3YJREZSY","sync-claude-permissions",null,"Use when the user wants to update their global Claude Code permissions based on patterns found across project-level settings, sync approved permissions from local projects to user settings, or consolidate permission allow lists","thdepauw\u002Fskills","thdepauw","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6310466?v=4","01M6J860VVW43K434YM9P4NK86","Thomas De Pauw","01M6J860ZZ2Y27243TQPG13WHT",0,"MIT","https:\u002F\u002Fgithub.com\u002Fthdepauw\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fthdepauw\u002Fskills\u002Fsync-claude-permissions\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"sync claude permissions","permissions","sync","use","true","project","local","across","permission","consolidate","patterns","global","user","settings","local projects","projects","code","update","2026-11-10 10:12:30",false,"---\ndescription: Use when the user wants to update their global Claude Code permissions based on patterns found across project-level settings, sync approved permissions from local projects to user settings, or consolidate permission allow lists\nuser-invocable: true\ndisable-model-invocation: true\n---\n\n# Sync Claude Permissions\n\n## Overview\n\nScans project-level `.claude\u002Fsettings.local.json` files under `~\u002Fgit`, identifies permission patterns approved across 50%+ of repos, compares against `~\u002F.claude\u002Fsettings.json`, and proposes additions. Interactive review before any changes.\n\n## Process\n\n```dot\ndigraph sync_flow {\n    rankdir=TB;\n    \"Scan ~\u002Fgit for settings.local.json\" [shape=box];\n    \"Deduplicate worktrees\" [shape=box];\n    \"Extract + normalize permissions\" [shape=box];\n    \"Filter repo-specific patterns\" [shape=box];\n    \"Count frequency across repos\" [shape=box];\n    \"Check subsumption against user settings\" [shape=box];\n    \"Present overview to user\" [shape=box];\n    \"User approves subset?\" [shape=diamond];\n    \"Apply changes\" [shape=box];\n    \"Done\" [shape=doublecircle];\n\n    \"Scan ~\u002Fgit for settings.local.json\" -> \"Deduplicate worktrees\";\n    \"Deduplicate worktrees\" -> \"Extract + normalize permissions\";\n    \"Extract + normalize permissions\" -> \"Filter repo-specific patterns\";\n    \"Filter repo-specific patterns\" -> \"Count frequency across repos\";\n    \"Count frequency across repos\" -> \"Check subsumption against user settings\";\n    \"Check subsumption against user settings\" -> \"Present overview to user\";\n    \"Present overview to user\" -> \"User approves subset?\";\n    \"User approves subset?\" -> \"Apply changes\" [label=\"yes\"];\n    \"User approves subset?\" -> \"Done\" [label=\"no\u002Fskip\"];\n    \"Apply changes\" -> \"Done\";\n}\n```\n\n## Step-by-Step\n\n### 1. Scan for settings files\n\n```bash\n# Find all project-level Claude settings\nfind ~\u002Fgit -name \"settings.local.json\" -path \"*\u002F.claude\u002F*\" 2>\u002Fdev\u002Fnull\n```\n\n### 2. Deduplicate worktrees\n\nWorktrees of the same repo should count as ONE repo, not inflate frequency counts.\n\n**Rule:** If a path contains `.worktrees\u002F`, map it to its parent repo. For example:\n\n- `optios-client-next.worktrees\u002FCLIENT-4418-debt-recover\u002F` → belongs to `optios-client-next`\n- Merge all permissions from worktrees into the parent repo's permission set\n\n### 3. Extract and normalize permissions\n\nFor each deduplicated repo, collect all `permissions.allow` entries. Then:\n\n**Filter OUT repo-specific patterns:**\n\n- Contains absolute paths (`\u002FUsers\u002F`, `\u002Fhome\u002F`, `\u002Ftmp\u002F`)\n- Contains `git -C \u002Fspecific\u002Fpath` patterns\n- Contains project-specific file paths\n- One-off approved commands (e.g., a single `git commit -m \"...\"` approval)\n\n**Keep generic patterns:**\n\n- `Bash(git push)`, `Bash(yarn test:*)`, `Bash(npm run dev:*)`\n- `Skill(...)` references\n- `mcp__*` tool permissions\n- `WebSearch`, `WebFetch(domain:...)`, etc.\n\n### 4. Count frequency and apply threshold\n\nCount how many **deduplicated repos** have each generic pattern. Apply the 50% threshold:\n\n- If 6 out of 11 repos have `Bash(git push)` → qualifies\n- If 2 out of 11 repos have `Bash(docker exec:*)` → does not qualify\n\n### 5. Check against user settings (subsumption)\n\nBefore suggesting, check if the user-level settings already cover the pattern:\n\n**Direct match:** Pattern exists verbatim in user `permissions.allow` → skip\n\n**Wildcard subsumption:** A broader user pattern already covers the project pattern:\n\n- User has `Bash(yarn build:*)` → project's `Bash(yarn build)` is already covered\n- User has `mcp__plugin_atlassian_atlassian__*` → project's `mcp__plugin_atlassian_atlassian__getJiraIssue` is covered\n\n**Important:** `Bash(git push)` (exact) and `Bash(git push:*)` (wildcard) are different permissions. The wildcard covers `Bash(git push --force)` etc., while the exact form only covers `git push` with no args. Treat them as distinct patterns.\n\n**Generalization opportunity:** Multiple project patterns suggest a wildcard:\n\n- Projects have `Bash(git imagetag:*)` across repos → suggest `Bash(git imagetag:*)` even if no single broader pattern exists\n\n### 6. Present overview to user\n\nShow a structured overview with three sections:\n\n**Already covered** (informational):\n\n```\nBash(git push)                    [8\u002F11 repos] ✓ already in user settings\nBash(yarn test:*)                 [6\u002F11 repos] ✓ covered by existing wildcard\n```\n\n**Suggested additions** (actionable):\n\n```\nBash(git imagetag:*)              [4\u002F7 repos]  ← NEW\nBash(yarn test:unit:ci:*)         [5\u002F7 repos]  ← NEW\nmcp__plugin_sentry_sentry__*      [3\u002F7 repos]  ← NEW\nWebSearch                         [4\u002F7 repos]  ← NEW\n```\n\n**Below threshold** (FYI, not suggested):\n\n```\nBash(docker exec:*)               [2\u002F7 repos]  below 50%\nBash(kill:*)                      [1\u002F7 repos]  below 50%\n```\n\nAsk the user which suggestions to apply using `AskUserQuestion` with multiSelect.\n\n### 7. Apply changes\n\nRead current `~\u002F.claude\u002Fsettings.json`, add approved patterns to `permissions.allow`, write back. Preserve all other settings (hooks, statusLine, enabledPlugins, etc.).\n\n**Important:** Use `Read` then `Edit` on the settings file — never overwrite the entire file with `Write` since it contains hooks and other config.\n\n## Common Mistakes\n\n| Mistake                                          | Fix                                                                         |\n| ------------------------------------------------ | --------------------------------------------------------------------------- |\n| Counting worktrees as separate repos             | Deduplicate by mapping worktree paths to parent repo                        |\n| Suggesting patterns already covered by wildcards | Check if existing `foo:*` covers `foo:bar`                                  |\n| Including absolute-path permissions              | Filter patterns containing `\u002FUsers\u002F`, `-C \u002Fpath`                            |\n| Modifying settings without user approval         | Always show overview and ask first                                          |\n| Overwriting settings.json entirely               | Use Edit, preserve hooks\u002Fplugins\u002FstatusLine                                 |\n| Counting one-off command approvals               | Filter overly-specific patterns (full commit messages, specific file paths) |\n","# Sync Claude Permissions\n\n## Overview\n\nScans project-level `.claude\u002Fsettings.local.json` files under `~\u002Fgit`, identifies permission patterns approved across 50%+ of repos, compares against `~\u002F.claude\u002Fsettings.json`, and proposes additions. Interactive review before any changes.\n\n## Process\n\n```dot\ndigraph sync_flow {\n    rankdir=TB;\n    \"Scan ~\u002Fgit for settings.local.json\" [shape=box];\n    \"Deduplicate worktrees\" [shape=box];\n    \"Extract + normalize permissions\" [shape=box];\n    \"Filter repo-specific patterns\" [shape=box];\n    \"Count frequency across repos\" [shape=box];\n    \"Check subsumption against user settings\" [shape=box];\n    \"Present overview to user\" [shape=box];\n    \"User approves subset?\" [shape=diamond];\n    \"Apply changes\" [shape=box];\n    \"Done\" [shape=doublecircle];\n\n    \"Scan ~\u002Fgit for settings.local.json\" -> \"Deduplicate worktrees\";\n    \"Deduplicate worktrees\" -> \"Extract + normalize permissions\";\n    \"Extract + normalize permissions\" -> \"Filter repo-specific patterns\";\n    \"Filter repo-specific patterns\" -> \"Count frequency across repos\";\n    \"Count frequency across repos\" -> \"Check subsumption against user settings\";\n    \"Check subsumption against user settings\" -> \"Present overview to user\";\n    \"Present overview to user\" -> \"User approves subset?\";\n    \"User approves subset?\" -> \"Apply changes\" [label=\"yes\"];\n    \"User approves subset?\" -> \"Done\" [label=\"no\u002Fskip\"];\n    \"Apply changes\" -> \"Done\";\n}\n```\n\n## Step-by-Step\n\n### 1. Scan for settings files\n\n```bash\n# Find all project-level Claude settings\nfind ~\u002Fgit -name \"settings.local.json\" -path \"*\u002F.claude\u002F*\" 2>\u002Fdev\u002Fnull\n```\n\n### 2. Deduplicate worktrees\n\nWorktrees of the same repo should count as ONE repo, not inflate frequency counts.\n\n**Rule:** If a path contains `.worktrees\u002F`, map it to its parent repo. For example:\n\n- `optios-client-next.worktrees\u002FCLIENT-4418-debt-recover\u002F` → belongs to `optios-client-next`\n- Merge all permissions from worktrees into the parent repo's permission set\n\n### 3. Extract and normalize permissions\n\nFor each deduplicated repo, collect all `permissions.allow` entries. Then:\n\n**Filter OUT repo-specific patterns:**\n\n- Contains absolute paths (`\u002FUsers\u002F`, `\u002Fhome\u002F`, `\u002Ftmp\u002F`)\n- Contains `git -C \u002Fspecific\u002Fpath` patterns\n- Contains project-specific file paths\n- One-off approved commands (e.g., a single `git commit -m \"...\"` approval)\n\n**Keep generic patterns:**\n\n- `Bash(git push)`, `Bash(yarn test:*)`, `Bash(npm run dev:*)`\n- `Skill(...)` references\n- `mcp__*` tool permissions\n- `WebSearch`, `WebFetch(domain:...)`, etc.\n\n### 4. Count frequency and apply threshold\n\nCount how many **deduplicated repos** have each generic pattern. Apply the 50% threshold:\n\n- If 6 out of 11 repos have `Bash(git push)` → qualifies\n- If 2 out of 11 repos have `Bash(docker exec:*)` → does not qualify\n\n### 5. Check against user settings (subsumption)\n\nBefore suggesting, check if the user-level settings already cover the pattern:\n\n**Direct match:** Pattern exists verbatim in user `permissions.allow` → skip\n\n**Wildcard subsumption:** A broader user pattern already covers the project pattern:\n\n- User has `Bash(yarn build:*)` → project's `Bash(yarn build)` is already covered\n- User has `mcp__plugin_atlassian_atlassian__*` → project's `mcp__plugin_atlassian_atlassian__getJiraIssue` is covered\n\n**Important:** `Bash(git push)` (exact) and `Bash(git push:*)` (wildcard) are different permissions. The wildcard covers `Bash(git push --force)` etc., while the exact form only covers `git push` with no args. Treat them as distinct patterns.\n\n**Generalization opportunity:** Multiple project patterns suggest a wildcard:\n\n- Projects have `Bash(git imagetag:*)` across repos → suggest `Bash(git imagetag:*)` even if no single broader pattern exists\n\n### 6. Present overview to user\n\nShow a structured overview with three sections:\n\n**Already covered** (informational):\n\n```\nBash(git push)                    [8\u002F11 repos] ✓ already in user settings\nBash(yarn test:*)                 [6\u002F11 repos] ✓ covered by existing wildcard\n```\n\n**Suggested additions** (actionable):\n\n```\nBash(git imagetag:*)              [4\u002F7 repos]  ← NEW\nBash(yarn test:unit:ci:*)         [5\u002F7 repos]  ← NEW\nmcp__plugin_sentry_sentry__*      [3\u002F7 repos]  ← NEW\nWebSearch                         [4\u002F7 repos]  ← NEW\n```\n\n**Below threshold** (FYI, not suggested):\n\n```\nBash(docker exec:*)               [2\u002F7 repos]  below 50%\nBash(kill:*)                      [1\u002F7 repos]  below 50%\n```\n\nAsk the user which suggestions to apply using `AskUserQuestion` with multiSelect.\n\n### 7. Apply changes\n\nRead current `~\u002F.claude\u002Fsettings.json`, add approved patterns to `permissions.allow`, write back. Preserve all other settings (hooks, statusLine, enabledPlugins, etc.).\n\n**Important:** Use `Read` then `Edit` on the settings file — never overwrite the entire file with `Write` since it contains hooks and other config.\n\n## Common Mistakes\n\n| Mistake                                          | Fix                                                                         |\n| ------------------------------------------------ | --------------------------------------------------------------------------- |\n| Counting worktrees as separate repos             | Deduplicate by mapping worktree paths to parent repo                        |\n| Suggesting patterns already covered by wildcards | Check if existing `foo:*` covers `foo:bar`                                  |\n| Including absolute-path permissions              | Filter patterns containing `\u002FUsers\u002F`, `-C \u002Fpath`                            |\n| Modifying settings without user approval         | Always show overview and ask first                                          |\n| Overwriting settings.json entirely               | Use Edit, preserve hooks\u002Fplugins\u002FstatusLine                                 |\n| Counting one-off command approvals               | Filter overly-specific patterns (full commit messages, specific file paths) |\n",{"description":7,"user-invocable":42,"disable-model-invocation":42},true,"main","8f3b6ba28499694b6c1e5d3a43af66c6fec15200","plugins\u002Fthdepauw\u002Fskills\u002Fsync-claude-permissions","https:\u002F\u002Fgithub.com\u002Fthdepauw\u002Fskills","https:\u002F\u002Fgithub.com\u002Fthdepauw","2026-03-30 22:17:10",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":42},[51,54,57],{"tool":52,"command":53},"npx","npx skills add thdepauw\u002Fskills --skill sync-claude-permissions",{"tool":55,"command":56},"bunx","bunx skills add thdepauw\u002Fskills --skill sync-claude-permissions",{"tool":58,"command":59},"pnpm","pnpm dlx skills add thdepauw\u002Fskills --skill sync-claude-permissions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fthdepauw\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fthdepauw\u002Fskills\u002Fsync-claude-permissions\u002FSKILL.md",[],[63,87],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":37},"01M6J864WJVVBV1BSB75AY7CJN","run-mutation-tests","Use when the user wants to run mutation testing, verify test quality, check test coverage effectiveness, or find untested code paths in a JS\u002FTS codebase","https:\u002F\u002Fgithub.com\u002Fthdepauw\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fthdepauw\u002Fskills\u002Frun-mutation-tests\u002FSKILL.md",[],[70,71,72,73,74,75,23,76,77,78,79,22,80,81,82,83,84,35,85,86],"run mutation tests","tests","mutation","run","find","codebase","paths","mutation testing","verify test","test coverage","coverage","check","quality","js","verify","test","testing",{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":37},"01M6J862ZX8V9DHV60ZKVBM3T5","hello","Greet the user with a personalized message","https:\u002F\u002Fgithub.com\u002Fthdepauw\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fthdepauw\u002Fskills\u002Fhello\u002FSKILL.md",[],[89,94,95,96,31],"with","message","greet"]