marketplace/bundles/plan-marshall/skills/tools-permission-fix/SKILL.md
Write operations for fixing and managing host-platform permissions - add, remove, consolidate, ensure, apply-fixes, executor migration, wildcard generation.
npx skillsauth add cuioss/plan-marshall tools-permission-fixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
PURPOSE: Write operations for fixing and managing host-platform permissions, including marketplace permission synchronization and executor pattern migration.
COMPLEMENTARY SKILL: Use plan-marshall:tools-permission-doctor for read-only analysis before applying fixes.
Execution mode: Run scripts exactly as documented; use --dry-run before applying changes.
Prohibited actions:
tools-permission-doctor)~/.claude/settings.json, no --settings <path> literal). Address the host platform by --scope / --target; the runtime layer resolves the settings location for the active platform.Constraints:
python3 .plan/execute-script.py plan-marshall:platform-runtime:platform_runtime permission {operation} {args} — the runtime owns settings path-resolution + I/O for the active platform.python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix {command} {args}, addressed by --scope / --target (never a literal settings path).--dry-run first to preview changes before applying.The common permission mutations are platform-neutral: they flow through the platform-runtime permission ops, which carry the operation's semantic intent and let the runtime resolve + write the active platform's settings. The runtime is the single home for settings path-resolution and load/save — the body never names a settings file.
| Intent | Platform-routed command |
|--------|-------------------------|
| Normalize / dedupe / sort + add defaults | platform_runtime permission fix --scope project --operation normalize [--dry-run] |
| Add a permission | platform_runtime permission fix --scope project --operation add --permissions "Bash(docker:*)" [--dry-run] |
| Remove a permission | platform_runtime permission fix --scope project --operation remove --permissions "Bash(docker:*)" [--dry-run] |
| Ensure permissions exist | platform_runtime permission fix --scope global --operation ensure --permissions "Bash(git:*)" "Bash(npm:*)" [--dry-run] |
| Consolidate enumerated entries into wildcards | platform_runtime permission fix --scope project --operation consolidate [--dry-run] |
| Set the full permission list | platform_runtime permission configure --scope project --permissions "Read(**)" "Write(.plan/**)" |
| Ensure marketplace bundle wildcards | platform_runtime permission ensure-wildcards --scope project --marketplace-dir marketplace [--dry-run] |
| Ensure project:{skill} step permissions | platform_runtime permission ensure-steps --marshal .plan/marshal.json --scope project [--dry-run] |
python3 .plan/execute-script.py plan-marshall:platform-runtime:platform_runtime permission fix \
--scope project --operation normalize --dry-run
Output (TOON):
status: success
scope: project
fix_operation: normalize
changes_applied: 3
dry_run: true
On a platform with no validated permission backend (e.g. OpenCode), each op returns an honest no-op with a reason and alternative — never a fabricated success. The body does not branch on the platform; it routes the intent and the runtime reports what it did.
These operations have no platform-runtime permission op; they run on permission_fix directly, addressed by --scope / --target so the script's settings resolver (delegating to the runtime layer) targets the active platform's settings without a literal path.
Append Skill({skill}) allow rules for every project:{skill} entry in marshal.json (under phase-5-execute.steps and phase-6-finalize.steps) that lacks a matching rule.
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix apply-project-step-permissions \
--marshal .plan/marshal.json \
--settings {settings_path} \
--dry-run
{settings_path} is the active platform's settings file; resolve it from the platform layer rather than hardcoding a .claude/ path. Pair with tools-permission-doctor:detect-missing-project-step-permissions — run doctor to detect, then fix to apply.
Output (TOON):
added[1]:
- Skill(finalize-step-plugin-doctor)
summary:
added_count: 1
already_present_count: 1
project_steps_checked: 2
dry_run: true
applied: false
Remove permissions from the project-local settings that are exact duplicates of the global settings or covered by a broader global wildcard, optionally moving marketplace permissions to global.
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix remove-redundant \
--scope both \
--dry-run
Options:
--move-marketplace (default: true): Move marketplace permissions (Skill/SlashCommand) from local to global.--no-move-marketplace: Skip moving marketplace permissions; only remove duplicates and wildcard-covered entries.--dry-run: Preview without writing.Usage: Run after tools-permission-doctor detect-redundant to clean up permission drift.
Generate Skill and SlashCommand wildcards from marketplace inventory.
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix generate-wildcards \
--marketplace-dir marketplace
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix ensure-executor \
--target global \
--dry-run
Remove individual script path permissions (redundant with the executor pattern).
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix cleanup-scripts \
--target global \
--remove-broad-python \
--dry-run
Add the executor permission and clean up redundant per-script permissions in one step.
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix migrate-executor \
--target global \
--remove-broad-python \
--dry-run
All write operations support --dry-run to preview changes without modifying any settings.
Recommended workflow:
tools-permission-doctor detect-redundant or detect-suspicious.platform_runtime permission fix; run executor-pattern operations on permission_fix.The executor pattern uses a single permission for all marketplace scripts:
Bash(python3 .plan/execute-script.py *)This replaces individual script path permissions because the executor invokes scripts via subprocess (not checked by the host platform's permission system).
ensure-executor to add the executor permission.cleanup-scripts to remove redundant individual permissions.migrate-executor to do both in one step.All operations return TOON with error details:
error: invalid_scope
status: error
The canonical argparse surface for permission_fix.py. The plugin-doctor analyzer (_analyze_manage_invocation.py) reads this section as source-of-truth for the manage-invocation-invalid and missing-canonical-block rules. Consuming docs xref this section by name instead of restating the command inline. See pm-plugin-development:plugin-script-architecture cross-skill-integration.md § "Script invocation in documentation".
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix apply-fixes \
(--settings SETTINGS | --scope {global,project}) [--dry-run]
--settings and --scope are mutually exclusive.
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix add \
--permission PERMISSION [--target {global,project}]
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix remove \
--permission PERMISSION [--target {global,project}]
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix ensure \
--permissions PERMISSIONS [--target {global,project}]
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix consolidate \
(--settings SETTINGS | --scope {global,project}) [--dry-run]
--settings and --scope are mutually exclusive.
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix ensure-wildcards \
--settings SETTINGS --marketplace-json MARKETPLACE_JSON [--dry-run]
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix remove-redundant \
(--scope both | --global-settings GLOBAL_SETTINGS) [--local-settings LOCAL_SETTINGS] \
[--move-marketplace] [--no-move-marketplace] [--dry-run]
--scope and --global-settings are mutually exclusive; --global-settings requires --local-settings.
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix apply-project-step-permissions \
--marshal MARSHAL --settings SETTINGS [--dry-run]
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix generate-wildcards \
[--marketplace-dir MARKETPLACE_DIR | --input INPUT]
--marketplace-dir and --input are mutually exclusive; --input defaults to stdin.
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix ensure-executor \
[--target {global,project}] [--dry-run]
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix cleanup-scripts \
[--target {global,project}] [--remove-broad-python] [--dry-run]
python3 .plan/execute-script.py plan-marshall:tools-permission-fix:permission_fix migrate-executor \
[--target {global,project}] [--remove-broad-python] [--dry-run]
development
Domain-owned OpenRewrite log-line finding parser for the java-cui domain — parses the
development
Domain-owned OpenRewrite marker detection for the java-cui domain — scans Java/Kotlin sources for cui-rewrite TODO markers, categorizes them by recipe, and fails the gate on any detected marker
development
Operator control surface for the marshalld build server — enrol/drop a project in the machine-global registry (the opt-in enable signal and anti-laundering wall), manage the daemon lifecycle (start, stop, drain, status, install, upgrade) version-pinned to the verified bundle copy, and inspect the daemon's per-project interaction-audit log (read-only)
tools
The tiny build-consumption client for the marshalld build server — submit a build job, bounded long-poll for its result, ping the daemon identity, and preflight registry-plus-liveness in one call; consumption only, never provisioning or enrolment