Update Agent Permissions
Task: Update Agent Permissions Please analyse our entire conversation and identify all specific commands used. Update permissions for both Claude Code and Gemini CLI. Reference Files - Claude: ~/.claude/settings.json - Gemini policy: ~/.gemini/policies/tool-permissions.toml - Gemini setting
Front matter
name: Update Agent Permissions
description: # Task: Update Agent Permissions Please analyse our entire conversation and identify all specific commands used. Update permissions for both Claude Code and Gemini CLI. ## Reference Files - Claude: ~/.claude/settings.json - Gemini policy: ~/.gemini/policies/tool-permissions.toml - Gemini setting
kind: PromptUpdate Agent Permissions
Task: Update Agent Permissions
Please analyse our entire conversation and identify all specific commands used.
Update permissions for both Claude Code and Gemini CLI.
Reference Files
- Claude: ~/.claude/settings.json
- Gemini policy: ~/.gemini/policies/tool-permissions.toml
- Gemini settings: ~/.gemini/settings.json
- Gemini trusted folders: ~/.gemini/trustedFolders.json
Instructions
- Audit: Compare the identified commands against the current allowed commands in both config files.
- Filter: Only include commands that provide read-only access to resources.
- Restrict: Explicitly exclude any commands capable of modifying, deleting, or destroying data.
- Update: Add only the missing read-only commands to both config files.
- Constraint: Do not use wildcards. Each command must be listed individually for granular security.
Show me the list of commands under two categories: Read-Only, and Write
We are mostly interested in the read-only commands here that fall under the categories: Read, Get, Describe, View, or similar.
Once I have approved the list, update both config files.
Claude Format
File: ~/.claude/settings.json
Claude uses a JSON permissions object with allow, deny, and ask arrays.
Allow format: Bash(command subcommand:*)
Insert new commands in alphabetical order within the allow array.
Gemini Format
File: ~/.gemini/policies/tool-permissions.toml
Gemini uses a TOML policy engine with rules at different priority levels.
Rule types and priorities:
decision = "deny"atpriority = 200for destructive operationsdecision = "ask_user"atpriority = 150for write operations needing confirmationdecision = "allow"atpriority = 100for read-only operations
For allow rules, use commandPrefix (provides word-boundary matching). For deny and ask rules, use commandRegex (catches flag variants).
New read-only commands should be added to the appropriate existing [[rule]] block by category, or a new block if no category fits.
Example allow rule:
[[rule]]
toolName = "run_shell_command"
commandPrefix = ["command subcommand1", "command subcommand2"]
decision = "allow"
priority = 100Gemini Directories
If any new directories outside the workspace were accessed, add them to:
context.includeDirectoriesin ~/.gemini/settings.json- ~/.gemini/trustedFolders.json with value
"TRUST_FOLDER"
Exceptions
Do not suggest adding the following commands:
- git branch: The -D flag will delete branches
- git pull: Incase a merge is actioned
- git checkout: Changing branches can interrupt work
- ajira issue create: To prevent excessive creation of new issues
- find: The -delete and -exec flags are destructive (use fd instead)
Contributor: grantcarthew
Source: https://github.com/f/prompts.chat/blob/main/prompts/01302.md
Author: f, prompts.chat prompt library. License: CC0-1.0.
Shown here with formatting for the web. Keep the author and license notice when you reuse it.
Related entries
There are more like this in the members library
The Business prompt library holds 3,008 entries. Members can search all of them by meaning and read every one in full.