qwen-code-permission
Qwen Code Permission Manager
Manage Qwen Code's permissions.allow / permissions.ask / permissions.deny in settings.json.
Workflow
- Identify the rule string from user request (e.g.,
"Bash(. ~/.x-cmd.root/X)") - Determine the action:
allow(default) /ask/deny - Run the bundled script (find it at
scripts/add_permission.pyrelative to this skill):uv run --script <skill-path>/scripts/add_permission.py "Bash(. ~/.x-cmd.root/X)" --action allow - Confirm the change was written
- Remind user: 配置更改需要重启 Qwen Code(
/exit后重新运行)才能生效
Rule Reference
Tool name aliases
| Alias | Canonical tool |
|---|---|
Bash / Shell |
run_shell_command |
Read / ReadFile |
read_file |
Edit / EditFile |
edit |
Write / WriteFile |
write_file |
Grep / SearchFiles |
grep_search |
Glob / FindFiles |
glob |
ListFiles |
list_directory |
WebFetch |
web_fetch |
Agent |
task |
Skill |
skill |
Meta-categories
| Rule name | Tools covered |
|---|---|
Read |
read_file + grep_search + glob + list_directory |
Edit |
edit + write_file |
Read(/path/**)matches all four read tools. To restrict only file reading, useReadFile(/path/**)orread_file(/path/**).
Path pattern prefixes
| Prefix | Meaning | Example |
|---|---|---|
// |
Absolute path from filesystem root | //etc/passwd |
~/ |
Relative to home directory | ~/Documents/*.pdf |
/ |
Relative to project root | /src/**/*.ts |
./ |
Relative to current working directory | ./secrets/** |
| (none) | Same as ./ |
secrets/** |
Rule examples
| Rule | Meaning |
|---|---|
"Bash" |
All shell commands |
"Bash(git *)" |
Commands starting with git (word boundary) |
"Bash(npm run *)" |
Any npm run script |
"WebFetch(api.example.com)" |
That domain and all subdomains |
"mcp__puppeteer" |
All tools from the puppeteer MCP server |
Configuration
Qwen Code reads ~/.qwen/settings.json (user) or .qwen/settings.json (project).
The permissions section:
{
"permissions": {
"allow": ["Bash(git *)"],
"ask": ["Bash(git push *)"],
"deny": ["Bash(rm -rf *)"]
}
}
Decision priority: deny > ask > allow > default. First matching rule wins.
allow rules merge across all scopes (user + project + system).
More from cnife/skills
obsidian-diary
将会话内容总结并写入 Obsidian 工作日志或个人日记,管理待办事项。当用户说「记录一下」「保存这个」「记一笔」「总结工作」「更新日志」「写日记」「记录会议」「更新待办」,或会话末尾有多个可记录的事件/结论/决策时,必须加载此技能。工作相关(代码开发、方案设计、运维部署、正式会议)用 work 变体;个人方向(技术探索、学习笔记、投资复盘、生活记录)用 personal 变体。不要等用户明确说「写日记」——会话中出现结构化结论、技术选型决策、部署结果、调研成果时就应该主动检查是否需要记录。
18skill-evaluator
>
17optimize-agents-md
AGENTS.md 编写与优化指南,遵循渐进式披露原则。当用户创建、修改或重构 AGENTS.md,讨论 AI agent 指令结构、规则放置位置,或提到「渐进式披露」「模块化」「AGENTS.md 最佳实践」时,务必加载此 skill。即使用户只是说「帮我写个 AGENTS.md」「优化一下这个配置文件」「拆分一下规则」,也应该使用此 skill。
13audit-hermes-agent-skills
>
10git-master
MUST USE for ANY git operations. Atomic commits, rebase/squash, history search (blame, bisect, log -S). Use when the user mentions commit, rebase, squash, git blame, bisect, who wrote, when was X added, find the commit that, git history, or any git-related operations.
8arch-wsl-cleanup
>-
5