Skip to content
cccskills
FreePublished on GitHub

skill-permissions

Skill permission analysis, one-time authorization, analyze skill permissions, batch authorization

The English summary is being prepared. Showing the original description.

See how to install

Files included (5)

  • SKILL.md6.0 KB
  • .claude-plugin/plugin.json147 B
  • .gitignore96 B
  • SKILL.ja.md6.0 KB
  • SKILL.zh-CN.md12.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Skill Permissions

Automatically analyze permissions required by all skills in Claude Code and generate one-time authorization commands.

Dangerous Operations Warning

This skill can modify other skill files. The following commands may cause widespread file changes:

CommandRisk LevelDescription
/skill-permissions injectHighBatch modify all skill SKILL.md files
/skill-permissions allow-allMediumBatch modify settings.json
/skill-permissions allow <name>LowOnly modify settings.json
/skill-permissions <name>SafeRead-only analysis, no file modifications

Recommendations:

  • Prefer explicit commands (e.g., /skill-permissions allow port-allocator)
  • Avoid inject or allow-all unless you understand the impact
  • Run /skill-permissions first to see analysis results before batch operations

Usage

CommandDescription
/skill-permissionsAnalyze all skills and show permission summary
/skill-permissions <skill-name>Analyze specific skill's permission requirements
/skill-permissions allow <skill-name>Execute one-time authorization for specific skill
/skill-permissions allow-allExecute one-time authorization for all skills
/skill-permissions injectInject allow command into all skills
/skill-permissions allowExecute one-time authorization for this skill

How It Works

1. Permission Analysis

Scan skill's SKILL.md file, identifying patterns like:

Bash Command Patterns:

find * → Bash(find *)
ls * → Bash(ls *)
cat ~/.claude/* → Bash(cat ~/.claude/*)
lsof -i:3* → Bash(lsof -i:3*)
git * → Bash(git *)
npm * → Bash(npm *)

Recognition Rules:

  • Bash commands in code blocks (bash ... )
  • Inline commands (command)
  • Explicitly mentioned system commands

2. Permission Rule Generation

Convert identified commands to permissions.allow rules:

{
  "permissions": {
    "allow": [
      "Bash(find * -name package.json *)",
      "Bash(ls -d *)",
      "Bash(cat ~/.claude/*)",
      "Bash(lsof -i:3*)"
    ]
  }
}

Execution Steps

Command: /skill-permissions

Analyze all skills and show permission summary:

  1. Scan all skills

    find ~/.claude/skills -name "SKILL.md" -type f 2>/dev/null
    
  2. Analyze permissions for each skill

    • Read SKILL.md content
    • Extract bash code blocks
    • Identify command patterns
    • Generate permission rules
  3. Output analysis results

Command: /skill-permissions <skill-name>

Analyze specific skill's permission requirements:

  1. Locate skill

    SKILL_PATH=$(find ~/.claude/skills -type d -name "<skill-name>" 2>/dev/null | head -1)
    
  2. Read and analyze SKILL.md

  3. Output detailed permission list

Command: /skill-permissions allow <skill-name>

Execute one-time authorization for specific skill:

  1. Analyze skill permission requirements
  2. Read existing config
  3. Merge permission rules (deduplicate, preserve existing rules)
  4. Write config file
  5. Output authorization result

Blocked Commands

The following command patterns are automatically blocked and won't be added to the allowlist:

Dangerous File Operations

CommandReason
rm *File deletion, may cause data loss
rm -rf *Recursive force delete, extremely dangerous
sudo *Super user privileges
chmod 777 *Opens all permissions

Dangerous Process Operations

CommandReason
kill -9 *Force kill process
pkill *Kill processes by name
curl * | bashRemote code execution
eval *Dynamic code execution

Dangerous Git Operations

CommandReason
git push --force *Force push, may overwrite remote
git reset --hard *Hard reset, loses uncommitted changes

Output Format

Analysis Result (Single Skill)

Skill: port-allocator
Location: ~/.claude/skills/port-allocator

Detected commands:
  - find ~/Codes -maxdepth 3 -name "package.json"
  - ls -d */
  - cat ~/.claude/port-registry.json
  - lsof -i:3000

Generated permission rules:
  - Bash(find * -maxdepth * -name package.json *)
  - Bash(ls -d *)
  - Bash(cat ~/.claude/*)
  - Bash(lsof -i:3*)

Run `/skill-permissions allow port-allocator` to authorize

Authorization Success

Permission authorization successful

Skill: port-allocator

Added permission rules:
  - Bash(find * -maxdepth * -name package.json *)
  - Bash(ls -d *)
  - Bash(cat ~/.claude/*)
  - Bash(lsof -i:3*)

Config file: ~/.claude/settings.json

New permissions take effect in next session, or run /clear to apply immediately

Configuration Files

  • Permission config: ~/.claude/settings.json
  • Skill directory: ~/.claude/skills/

First Use

If you encounter permission prompts, first run:

/skill-permissions allow

Command: /skill-permissions allow

Execute one-time authorization for this skill:

  1. Read ~/.claude/settings.json
  2. Merge the following permissions to permissions.allow:
{
  "permissions": {
    "allow": [
      "Bash(find ~/.claude/skills *)",
      "Bash(cat ~/.claude/*)"
    ]
  }
}
  1. Write config file (preserve existing permissions)
  2. Output authorization result

Notes

  1. Conservative analysis - Only identify explicitly appearing commands, avoid over-authorization
  2. Deduplicated merge - New permissions merge with existing, no duplicates
  3. No deletion - Only adds permissions, won't delete user's existing permission config
  4. Wildcards - Use * to match varying parameter parts
  5. Session effect - Permission updates require new session or /clear to take effect
  6. Explicit preferred - Recommend explicit commands over batch operations to reduce risks

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Intelligent project management dashboard - view all projects status, priorities, and todos from a CEO perspective

The English summary is being prepared. Showing the original description.

guo-yu/skills240Updated Jan 23, 2026

Automatically allocate and manage development server ports, avoiding port conflicts between multiple Claude Code instances

The English summary is being prepared. Showing the original description.

guo-yu/skills240Updated Jan 23, 2026

Automatically share skills, migrate local skills to code repositories, open source skills, skill version management, configure git remote

The English summary is being prepared. Showing the original description.

guo-yu/skills240Updated Jan 23, 2026

Translate SKILL.md and README.md files into multiple languages for sharing skills internationally

The English summary is being prepared. Showing the original description.

guo-yu/skills240Updated Jan 23, 2026

See all skills by guo-yu

Report a problem with this skill