Command Palette

Search for a command to run...

Назад к скиллам
скилл № 95492

Audit Permission Grants

Report-only permission grant audit: allowed-tools frontmatter, permissions.allow, portable auto-mode durability (dropped interpreter wildcards, machine paths…

БесплатноЗапускает вложенные скрипты
melodic-softwareот melodic-software★ 34 звезды на GitHub

Установить Audit Permission Grants в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Audit permission grants

Arguments. [frontmatter|settings|plugins|all] [--unattended]. default: all

Purpose

Audit whether a repo's permission grants actually take effect. Answers a question the sibling audit skill does not: "Are our allow-rules and allowed-tools grants portable across machines and durable when the session enters auto mode, and is the operative rule in a place that can work?"

The principle, the three anti-patterns, and the correct pattern (with official-doc citations) live in the marketplace's permission-rule-hygiene convention, published at https://raw.githubusercontent.com/melodic-software/claude-code-plugins/main/docs/contracts/permission-rule-hygiene/README.md. The mechanical check definitions (P1/P2/P3, severities, detector invocation) are in reference/criteria.md, which carries every recommendation this skill needs at run time. The convention is the doctrine's owner, not a runtime dependency.

Scope boundary (route out)

This skill owns grant portability + auto-mode durability + who adds the operative rule. It does not own config-file correctness. Baseline deny/ask presence, overly broad patterns, and live plugin drift belong to the sibling audit skill. When a request is about those, route it there rather than answering here. The audit skill in the harness-memory plugin owns the instruction layer (CLAUDE.md / a natively read AGENTS.md / rules / auto-memory).

Arguments

Parse $ARGUMENTS for an optional scope filter. It narrows which checks may produce findings, never what the detector scans. One full detector run happens either way, and the filter is applied to its output:

  • frontmatter: skill/command/agent allowed-tools only
  • settings: project, local, and user-global permissions.allow only
  • plugins: plugin settings.json self-grant (P3) only
  • all: everything (default)

--unattended, anywhere in the arguments, is not a filter: the caller declares nobody is present, which changes only the /permissions offer (see "Boundary" below). Take it out before reading the filter, and never pass it to the detector.

The filter reads like a scan-scope, but a detector-side scope flag would buy nothing: the root is a git toplevel, $CLAUDE_PROJECT_DIR, or an explicitly named directory, never an unbounded sweep, and the walk takes well under a second. A second place for scope to be defined would only add drift. The coverage block still reports the whole denominator on a filtered run, so a narrowed report never implies a narrowed scan.

This skill is report-only. There is no --fix: the correct P3 remediation is inherently operator-manual (the bare-name rule must land in user-global ~/.claude/settings.json, which a skill or plugin cannot write), and P1/P2 rewrites are judgment calls the operator confirms.

Phase 1: Detect

Run the deterministic spine:

bash "${CLAUDE_PLUGIN_ROOT}/skills/audit-permission-grants/scripts/permission-rule-check.sh"

It scans frontmatter allowed-tools and settings permissions.allow across the consuming repo and the user-global settings file (${CLAUDE_CONFIG_DIR:-$HOME/.claude}/settings.json), and prints one finding per fragile grant (<severity> [<check>] <source>: <detail>). --count prints the count. Exit 2 is the environment-gap channel: report the gap rather than a clean bill. It is raised by a missing jq (its message names the platform's install command when it finds one), a missing shared pattern library, a scan root that resolves to neither a git toplevel nor $CLAUDE_PROJECT_DIR, and any argument the script does not recognize. An unresolvable user scope is not one of them: the run records it in the coverage block, says so on stderr, and continues. On an unresolvable project root, say the scan did not run and give the fix: run from inside the repository you mean to scan, pass --root <dir>, or set $PERMISSION_HYGIENE_SCAN_ROOT explicitly. That variable is a supported operator lever, not a test-only seam; $PERMISSION_HYGIENE_FIXTURE_DIR is an alias for it, and $PERMISSION_HYGIENE_SCAN_ROOT wins when both are set. Never report "no fragile permission grants found" on an exit 2. settings.local.json is parsed for its permissions.allow array only, never echoed wholesale.

Search scope. Search plugin sources with the Grep or Glob tool rooted at the installed version directory of the plugin in question (its installPath in plugins/installed_plugins.json under the config directory), never the whole plugin cache; search transcripts with Grep rooted at one session directory; bound any shell walk with timeout below the Bash tool's own. Hand this rule to any subagent this run starts: a recursive search of ~/.claude/plugins/cache walks every marketplace and cached version. The orphaned-search report behind this rule: #20533.

Report the denominator, alwa

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • evals/evals.json
  • reference/criteria.md
  • reference/native-surfaces.md
  • scripts/permission-rule-check-root.test.sh
  • scripts/permission-rule-check.sh
  • scripts/permission-rule-check.test.sh

FAQ

Что делает скилл Audit Permission Grants?

Report-only permission grant audit: allowed-tools frontmatter, permissions.allow, portable auto-mode durability (dropped interpreter wildcards, machine paths, substitution tokens, inert plugin grants, guarded helper denied despite allow rule). Use when: 'why was my allowed-tools grant ignored', 'audit allow rules', 'is this permission portable'.

Как установить скилл Audit Permission Grants?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Audit Permission Grants запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить Audit Permission Grants с