permission-patterns
Rules for evaluating, classifying, and deduplicating AI tool permissions
Best use case
permission-patterns is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Rules for evaluating, classifying, and deduplicating AI tool permissions
Teams using permission-patterns should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/permission-patterns/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How permission-patterns Compares
| Feature / Agent | permission-patterns | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Rules for evaluating, classifying, and deduplicating AI tool permissions
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Permission Patterns <!-- markdownlint-disable-file MD013 --> Unified patterns for permission safety classification and deduplication. Use these rules to evaluate permissions consistently. ## Safety Classification Classification rules for evaluating permission safety. Use these criteria to categorize permissions consistently. ### Classification Rules #### ALLOW - Read-Only and Safe Operations Keywords: `list`, `ls`, `show`, `info`, `view`, `get`, `describe`, `inspect`, `status`, `doctor`, `ping`, `check`, `--version`, `--help` Safe domains: github.com, docker.com, kubernetes.io, python.org, npmjs.com, official documentation sites #### ASK - Modifications and Risky Operations Keywords: `update`, `set`, `edit`, `patch`, `modify`, `apply`, `rm`, `delete`, `remove`, `prune`, `clean`, `exec`, `run`, `eval`, `push`, `publish`, `deploy`, `kill`, `stop` Requires user confirmation before execution. #### DENY - Irreversible Damage or Security Bypass Keywords: `sudo`, `chmod 777`, `dd`, file patterns like `**/.env`, `**/*_rsa`, `**/*.key`, `**/*secret*` Local addresses: `localhost`, `127.0.0.1`, private IP ranges ### Decision Criteria 1. **Read-only query + no secrets** → ALLOW 2. **Modifies resources + reversible** → ASK 3. **Irreversible or security risk** → DENY 4. **Uncertain** → ASK (conservative default) ### Domain Coverage Claude Code's `WebFetch(domain:X)` uses **exact host matching** — subdomains are NOT covered by a root domain entry: - **`github.com`** does NOT cover `api.github.com` or `docs.github.com` — each needs its own entry - **`github.io`** does NOT cover `github.github.io` — separate entry required - **`githubusercontent.com`** and `raw.githubusercontent.com` are separate entries (different hostnames) - **`localhost`** is separate from `localhost:3000` (ports are distinct) Each hostname that needs to be fetched must be listed explicitly. Local/private addresses always DENY: - `localhost`, `127.0.0.1`, `192.168.x.x`, `10.x.x.x` ranges --- ## Pattern Deduplication Rules for detecting when a specific permission is already covered by a broader existing pattern. ### Coverage Rules #### WebFetch Domains Each hostname must be listed exactly — there is no wildcard or subdomain coverage. Ports are also distinct: - `localhost` does NOT cover `localhost:3000` #### File Paths Broader wildcards cover more specific patterns: - `Read(**)` covers any Read permission - `Glob(**/*)` covers `Glob(**/*.js)`, `Glob(**/package.json)` ### Hostname Recommendations Since `WebFetch` uses exact host matching, list each hostname explicitly. When multiple hostnames share a common vendor, add all needed hostnames individually rather than assuming a root domain covers them. ### Related Permission Suggestions When discovering a safe permission, suggest related safe commands in the same family: - `docker volume ls` → suggest `docker volume inspect` - `aws s3 ls` → suggest `aws s3 sync --dryrun` - `npm list` → suggest `npm outdated`, `npm audit` --- ## Commands Using This Skill - `permissions-analyzer` agent - Uses classification and deduplication to filter permissions during discovery - `/sync-permissions` command - Indirectly uses this skill through the permissions-analyzer agent
Related Skills
plugin-patterns
Canvas plugin architecture patterns, best practices, and implementation templates
patterns/arena-allocator
Arena Allocator Pattern (C-Specific) pattern for C development
patterns/adapter
Adapter (Wrapper) Pattern pattern for C development
on-call-handoff-patterns
Master on-call shift handoffs with context transfer, escalation procedures, and documentation. Use when transitioning on-call responsibilities, documenting shift summaries, or improving on-call pro...
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.
nodejs-backend-patterns
Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.
nextjs-app-router-patterns
Master Next.js 14+ App Router with Server Components, streaming, parallel routes, and advanced data fetching. Use when building Next.js applications, implementing SSR/SSG, or optimizing React Serve...
n8n-workflow-patterns
Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, or scheduled tasks.
modern-javascript-patterns
Master ES6+ features including async/await, destructuring, spread operators, arrow functions, promises, modules, iterators, generators, and functional programming patterns for writing clean, effici...
moai-cc-permission-mode
Claude Code permission configuration and policy management strategies for enterprise security. Covers permission modes, tool access control, whitelist/blacklist patterns, and enterprise deployment best practices.
mcp-patterns
MCP server building, advanced patterns, and security hardening. Use when building MCP servers, implementing tool handlers, adding authentication, creating interactive UIs, hardening MCP security, or debugging MCP integrations.
mapbox-integration-patterns
Official integration patterns for Mapbox GL JS across popular web frameworks. Covers setup, lifecycle management, token handling, search integration, and common pitfalls. Based on Mapbox's create-web-app scaffolding tool.