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:tools-permission-doctor:permission_doctor {command} {args}tools-permission-fix for any write operationsActivate 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 analysis of settings files for permission issues.
Workflow: Runs detect-redundant and detect-suspicious operations and consolidates results.
Input:
global_settings: ~/.claude/settings.json
local_settings: .claude/settings.json
Output (TOON):
redundant_issues:
...
suspicious_issues:
...
total_issues: 5
recommendations[2]:
- Remove 3 redundant permissions from local settings
- Review 2 suspicious permissions in global settings
Usage: Entry point for permission analysis. Consolidates multiple detection results.
| 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 executorFile Operations:
Read(~/.claude/settings.json) - Read global settingsRead(.claude/settings.json) - Read project settingsEnsuring 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
The single append-only change-ledger — one worktree_sha-stamped substrate for kind=build and kind=change entries — plus the first-class worktree-sha freshness API
development
Authoring standards for ASCII box diagrams in skill and doc source — box-drawing conventions, right-border alignment, and a deterministic check/fix validator over fenced/literal code blocks in .md and .adoc files
testing
Recipe for verifying and fixing alignment of ASCII box diagrams across .md skill source and .adoc documentation, one deliverable per offending file
development
Pure platform-agnostic terminal-title composition consumed by platform-runtime via PYTHONPATH