marketplace/bundles/plan-marshall/skills/tools-permission-doctor/SKILL.md
Diagnose permission issues across settings files (read-only analysis)
npx skillsauth add cuioss/plan-marshall tools-permission-doctorInstall 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.
Read-only permission analysis for host-platform settings. Detects redundant permissions, security anti-patterns, and validates permission syntax without making changes.
Execution mode: Run scripts exactly as documented; present analysis results without modifying files.
Prohibited actions:
Constraints:
python3 .plan/execute-script.py plan-marshall:platform-runtime:platform_runtime permission analyze --checks {checks} --scope {scope} — the runtime resolves the active platform's settings path and load. This is the preferred entry point.permission_doctor detection scripts run through python3 .plan/execute-script.py plan-marshall:tools-permission-doctor:permission_doctor {command} {args}, addressed by --scope (never a literal settings path).tools-permission-fix for any write operations.~/.claude/settings.json). Address the host platform by --scope; the runtime layer resolves the settings location for the active platform.Activate when:
Detect permissions in local settings that duplicate global settings.
Script: permission_doctor.py detect-redundant
Input:
python3 .plan/execute-script.py plan-marshall:tools-permission-doctor:permission_doctor detect-redundant \
--global-settings {global_path} \
--local-settings {local_path}
Output (TOON):
redundant[1]{permission,reason,type}:
Bash(git:*) Exact duplicate exact_duplicate
marketplace_in_local[1]{permission,reason,type}:
Skill(pm-dev-builder:*) Should be in global marketplace_permission
summary:
redundant_count: 1
marketplace_in_local_count: 1
Usage: Call before fixing to identify redundancies between global and local settings.
Detect permissions matching anti-patterns (security risks).
Script: permission_doctor.py detect-suspicious
Input:
python3 .plan/execute-script.py plan-marshall:tools-permission-doctor:permission_doctor detect-suspicious \
--settings {settings_path} \
[--approved-file {run_config_path}]
Output (TOON):
suspicious[1]{permission,reason,severity}:
Write(/tmp/**) System temp access medium
already_approved[1]:
- Bash(sudo:*)
summary:
total_suspicious: 1
by_severity:
high: 0
medium: 1
low: 0
Usage: Call to identify security anti-patterns. User-approved permissions are excluded.
Detect project:{skill} step references in marshal.json that lack matching Skill({skill}) allow rules in settings.
Script: permission_doctor.py detect-missing-project-step-permissions
Input:
python3 .plan/execute-script.py plan-marshall:tools-permission-doctor:permission_doctor detect-missing-project-step-permissions \
--marshal {marshal_path} \
(--settings {settings_path} | --scope project|global)
Scan scope: plan.phase-5-execute.steps and plan.phase-6-finalize.steps. Entries starting with project: are enumerated; the substring after project: is matched against permissions.allow as either exact Skill({skill}) or covering wildcard Skill({skill}:*).
Output (TOON):
missing[1]{skill,step,phase}:
finalize-step-plugin-doctor project:finalize-step-plugin-doctor phase-6-finalize
present[1]{skill,step,phase,covered_by}:
sync-plugin-cache project:sync-plugin-cache phase-6-finalize Skill(sync-plugin-cache)
summary:
missing_count: 1
present_count: 1
project_steps_checked: 2
Usage: Run during health check and after set-steps configuration to surface missing Skill() allow rules. Pair with tools-permission-fix:apply-project-step-permissions to auto-add missing entries.
High-level, platform-neutral analysis. The runtime resolves the active platform's settings, runs the requested checks, and consolidates results — no settings path is named in the body.
Input:
python3 .plan/execute-script.py plan-marshall:platform-runtime:platform_runtime permission analyze \
--checks redundant,suspicious,missing-steps \
--scope both \
[--marshal .plan/marshal.json]
(--marshal is required only when the missing-steps check is included.)
Output (TOON):
status: success
scope: both
checks_run[3]:
- missing-steps
- redundant
- suspicious
total_findings: 5
On a platform with no validated permission backend (e.g. OpenCode), the op returns an honest no-op with a reason and alternative instead of a fabricated finding set.
Usage: Preferred entry point for permission analysis. Consolidates the detection results across checks for the active platform.
| Script | Subcommand | Purpose |
|--------|------------|---------|
| permission_doctor.py | detect-redundant | Detects redundant permissions between global/local |
| permission_doctor.py | detect-suspicious | Detects security anti-patterns in permissions |
| permission_doctor.py | detect-missing-project-step-permissions | Detects project:{skill} steps in marshal.json without matching Skill() allow rules |
| permission_common.py | (library) | Shared utilities for settings loading and path resolution (also used by tools-permission-fix) |
standards/permission-validation-standards.md - Validation patterns, syntax rules, categorizationstandards/permission-architecture.md - Global/Local separation, universal access patternsstandards/permission-anti-patterns.md - Security patterns, suspicious permission detectionThis skill is designed to run without user prompts. Required permissions:
Script Execution:
Bash(python3 .plan/execute-script.py *) - Script execution via executorSettings access is performed inside the runtime / script layer, which resolves the active platform's settings location — the skill body reads no settings file directly.
Ensuring Non-Prompting:
The canonical argparse surface for permission_doctor.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-doctor:permission_doctor detect-redundant \
(--scope both | --global-settings GLOBAL_SETTINGS) [--local-settings LOCAL_SETTINGS]
--scope and --global-settings are mutually exclusive; --global-settings requires --local-settings.
python3 .plan/execute-script.py plan-marshall:tools-permission-doctor:permission_doctor detect-suspicious \
(--settings SETTINGS | --scope {global,project}) [--approved-file APPROVED_FILE]
--settings and --scope are mutually exclusive.
python3 .plan/execute-script.py plan-marshall:tools-permission-doctor:permission_doctor detect-missing-project-step-permissions \
--marshal MARSHAL (--settings SETTINGS | --scope {global,project})
--settings and --scope are mutually exclusive.
Read-Only:
tools-permission-fix skill for write operationsAnti-Pattern Detection:
standards/permission-anti-patterns.mdPart of: plan-marshall-core bundle
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