Home › Prompts › Community › Update Agent Permissions

Update Agent Permissions

Any chat AIAgents & automationCommunity (CC0)

Note: Review and test before use. Provided as is, without warranty. See Terms.

Prompt

Download  
# 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

1. Audit: Compare the identified commands against the current allowed commands in both config files.
2. Filter: Only include commands that provide read-only access to resources.
3. Restrict: Explicitly exclude any commands capable of modifying, deleting, or destroying data.
4. Update: Add only the missing read-only commands to both config files.
5. 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"` at `priority = 200` for destructive operations
- `decision = "ask_user"` at `priority = 150` for write operations needing confirmation
- `decision = "allow"` at `priority = 100` for 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:
```toml
[[rule]]
toolName = "run_shell_command"
commandPrefix = ["command subcommand1", "command subcommand2"]
decision = "allow"
priority = 100
```

## Gemini Directories

If any new directories outside the workspace were accessed, add them to:
- `context.includeDirectories` in ~/.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)

How to use

More: all agents & automation prompts · all community prompts · prompt library

Related prompts

Design an automation workflow (n8n/Zapier/Make)

Turn a manual process into a step-by-step automation design with triggers, nodes, error handling and an LLM step prompt.

Any chat AIAgents & automation

ChatGPT agent: multi-step web task with checkpoints

A brief for ChatGPT's agent to research, compare and compile results on the web, pausing before any purchase or submission.

ChatGPTAgents & automation

Agentic coding task brief for Claude Code

A task brief for Claude Code that defines the goal, constraints, verification and stopping point so the agent works autonomously but safely.

ClaudeAgents & automation

Gemini automation across Gmail, Docs and Calendar

A request that has Gemini gather info from email and docs and produce a draft plan, without sending anything.

GeminiAgents & automation

Grok tool-using research agent prompt

A system prompt for a Grok agent that plans, searches, verifies and writes a cited brief, with a cap on tool calls.

GrokAgents & automation

Agent Organization Expert

Agent Organization Expert: --- name: agent-organization-expert description: Multi-agent orchestration skill for team assembly, task decomposition…

Any chat AIAgents & automationCommunity (CC0)

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.