permissions-debug
它能做什么
它说明如何检查 Kode 已批准的工具和命令限制,然后只做必要的最小权限改动。适合工具被意外阻止的 Kode 用户。
适用场景
- ✓当 Kode 阻止了你以为应该可以运行的工具时。
- ✓当 Kode 反复对同一权限发出询问时。
- ✓当辅助智能体的表现与主 Kode 智能体不同时。
技能链接
https://github.com/shareAI-lab/Kode-CLI/blob/main/packages/builtin-skills/skills/permissions-debug/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我已经批准了文件搜索工具,但 Kode 还是阻止它。为什么?该怎么修?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查被阻止的具体操作,列出已批准的工具,并查找命令限制。它会做出最小、可撤销的改动,然后重复该操作来测试效果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Permissions Debug (Kode-first, fail-closed)
Non-negotiables
- Do not auto-escalate permissions. If an action would normally require user approval, keep it interactive and explain why.
- Prefer minimal, reversible permission changes and verify immediately.
- In
dontAskcontexts, treat “would prompt” as deny (fail-closed). Do not try to bypass.
Fast triage (what to check first)
Confirm what is blocked
- Look for the exact tool name and the rejection message.
- If the failure is from a subagent, confirm whether the parent context was more restricted.
Inspect approved tools / project allowlist
- Use
SlashCommandto run/approved-tools listand confirm whether the tool (or its rule category) is present. - If the list is unexpectedly long or contains stale entries, remove only the minimum needed with
/approved-tools remove <tool>.
- Use
Check per-command constraints
- Some flows apply
commandAllowedToolsconstraints (slash command / skill execution contexts). Confirm the command’sallowed-toolsfrontmatter and whether it should be restrictive.
- Some flows apply
Verification loop (keep it tight)
- Re-run the exact action that was blocked and confirm:
- whether the prompt appears (interactive modes), or
- whether the tool is allowed/denied deterministically (headless /
dontAsk).
Forensics (when “it should have worked”)
- Inspect the latest session artifacts under
~/.kode/(messages + errors) to confirm what tool call was attempted and why it was denied. - If a background shell was involved, cross-check task output files in
~/.kode/**/tasks/for the correspondingbashId.
常见问题
智能体会自动开启权限吗?
不会。该技能不会自动批准那些通常需要你同意的操作。
在不显示提示的运行中会发生什么?
任何需要提示的操作都会被视为拒绝,以确保安全。
智能体如何确认修复有效?
它会重复被阻止的操作,看看现在是允许还是仍然被拒绝。
详情
作者的原始描述
Troubleshoot Kode permission prompts/denials (tool allowlists, commandAllowedTools, dontAsk fail-closed, subagent inheritance). Use when tools are unexpectedly blocked, permission prompts repeat, or behavior differs between main agent and subagents.
repo: shareAI-lab/Kode-CLI
热度
- GitHub 星标
- 5.2k
- 排名
- #15023
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
capabilities-manage
5.2k帮你的智能体通过简单的请求,开启、关闭或调整 Kode CLI 的功能,例如语言服务器、状态栏和插件。
doc-coauthoring
5.2k帮你的智能体把零散的笔记整理成清晰的提案、规格或决策文档,再请一位新读者来检查。
lsp-maintain
5.2k帮你的智能体查明 Kode 中代码提示缺失的原因,并设置提供语言服务器的插件。
mcp-builder
5.2k指导你的智能体构建一个 MCP 服务器,为 AI 提供清晰、命名合理的操作,用于连接外部服务,可使用 TypeScript 或 Python。