Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

permission-policy许可政策

Agent Skill

permission-policy 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

475

周安装

20

GitHub Stars

3

下载量

166
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:permission-policy(许可政策)
来源仓库:https://github.com/defrex/claude-code-permission-policy
仓库路径:skills/permission-policy
安装命令:
npx skills add https://github.com/defrex/claude-code-permission-policy --skill permission-policy
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/defrex/claude-code-permission-policy --skill permission-policy

简介

permission-policy 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 它属于研究检索类工具,适用于信息搜集和初步筛选场景。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Set up the Claude Code permission hook that uses Haiku to auto-approve safe tool invocations based on a per-repo permission policy.

Authentication: The hook automatically reuses your Claude Code login (OAuth).

Steps

Step 1 — Check runtime availability

  1. Run which bun to check if the Bun runtime is available.
  2. If bun is found, continue to Step 2. The hook command will be: bun.claude/skills/permission-policy/permission-policy.ts
  3. If bun is NOT found: a. Tell the user: "The permission-policy hook is written in TypeScript for the Bun runtime, but bun was not found on your system." b. Ask the user which option they'd prefer:

- Install Bun — They can install it from https://bun.sh and re-run /permission-policy - Port to Node.js — You'll rewrite the hook as a standalone .mjs script (no dependencies) - Port to Python — You'll rewrite the hook as a standalone .py script (no dependencies) - Port to another language — They can specify their preferred language/runtime c. If the user chooses to port: - Read the original TypeScript source from .claude/skills/permission-policy/permission-policy.ts - Rewrite it in the chosen language, preserving all behavior: stdin JSON parsing, permission policy loading, claude -p subprocess call, JSON output, logging, and fail-open error handling - Write the ported script to .claude/hooks/permission-policy.{ext} in the current project root (e.g. .mjs, .py, etc.) - Make the file executable (chmod +x) - Use this as the hook command for Step 4 instead of the default bun command (e.g. node.claude/hooks/permission-policy.mjs or python3.claude/hooks/permission-policy.py) - Add .claude/hooks/ to .gitignore (in Step 3) d. If the user chooses to install Bun, stop here and tell them to re-run /permission-policy after installing.

Step 2 — Create repo permission policy

  1. Check if .claude/PERMISSION_POLICY.md exists in the current project root.
  2. If it already exists, tell the user: "Permission policy already exists at .claude/PERMISSION_POLICY.md — skipping. Edit it to customize."
  3. If it doesn't exist, copy the contents of .claude/skills/permission-policy/PERMISSION_POLICY_TEMPLATE.md to .claude/PERMISSION_POLICY.md in the current project root.
  4. Tell the user to customize the policy for their project.

Step 3 — Gitignore log file (and hooks if ported)

  1. Check if .claude/logs/ is already covered by a .gitignore entry in the current project root (e.g. .claude/logs/ or .claude/logs).
  2. If not, append .claude/logs/ on a new line to the project root .gitignore (create the file if it doesn't exist).
  3. If the hook was ported in Step 1, also ensure .claude/hooks/ is in .gitignore.
  4. Tell the user what was added to .gitignore.

Step 4 — Configure hook in settings

  1. Read .claude/settings.json in the current project root (or treat as {} if it doesn't exist).
  2. Determine the hook command:

- If bun is available (default): bun.claude/skills/permission-policy/permission-policy.ts - If ported in Step 1, use the appropriate command (e.g. node.claude/hooks/permission-policy.mjs or python3.claude/hooks/permission-policy.py)

  1. Merge the following hook configuration, preserving all existing settings:
{
  "hooks": {
    "PermissionRequest": [
      {
        "matcher": "Bash|Read|Write|Edit|Glob|Grep|WebFetch|WebSearch",
        "hooks": [
          {
            "type": "command",
            "command": "<hook command from above>",
            "timeout": 60
          }
        ]
      }
    ]
  }
}
  1. If there's already a PermissionRequest hook entry whose matcher includes "Bash", replace it. Otherwise, add a new entry.
  2. Write the updated settings back.

Step 5 — Summary

  1. Tell the user about .claude/PERMISSION_POLICY.md — explain that this is where they control what gets auto-approved, denied outright, or deferred to the human. Read the policy file and provide a brief summary of what it currently allows, denies, and asks about.
  2. Tell the user about the log file at .claude/logs/permission-policy.log. Encourage them to run tail -f.claude/logs/permission-policy.log in a separate terminal if they want to follow the decisions being made in real time.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.78%
按下载量换算58

Claude

28.49%
按下载量换算47

Cursor

18.09%
按下载量换算30

Gemini CLI

8.84%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/defrex/claude-code-permission-policy --skill permission-policy 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills