Add bash command permissions to project-level or user-level magenta options. Use when a command needs to be permanently allowlisted.
View on GitHubJanuary 23, 2026
Select agents to install to:
npx add-skill https://github.com/dlants/magenta.nvim/blob/f7ed15d129b8c9df65c71aee9b464f34bde447ad/node/skills/update-permissions/skill.md -a claude-code --skill update-permissionsInstallation paths:
.claude/skills/update-permissions/# Updating Bash Command Permissions
This skill guides you to add bash command permissions to magenta's configuration files.
## Configuration Locations
- **Project-level**: `.magenta/options.json` in the project root
- **User-level**: `~/.magenta/options.json` in the home directory
User-level permissions apply across all projects. Project-level permissions only apply to the current project and are merged with user-level permissions.
## How to Update Permissions
1. Read the existing options file (if it exists)
2. Add or merge the new `commandConfig` entries
3. Write the updated JSON back to the file
If the file doesn't exist, create it with just the `commandConfig` key.
## Permission Structure
The `commandConfig` option defines which commands can run automatically without user confirmation. It has two arrays:
- **`commands`**: Patterns for standalone commands
- **`pipeCommands`**: Patterns for commands receiving pipe input (more permissive)
```json
{
"commandConfig": {
"commands": [
["npx", "tsc", "--noEmit"],
["npx", "vitest", "run", { "type": "restFiles" }],
["cat", { "type": "file" }],
["echo", { "type": "restAny" }]
],
"pipeCommands": [
["grep", { "type": "restAny" }],
["wc", { "type": "restAny" }]
]
}
}
```
Each pattern is an array where the first element is the executable and subsequent elements are the expected arguments.
## ArgSpec Types
Each element in a pattern can be:
- **String literal**: `"--noEmit"` - exact match required
- **`{ "type": "file" }`**: A single file path that must be within the project, non-hidden, and not gitignored
- **`{ "type": "restFiles" }`**: Zero or more file paths (must be last in pattern)
- **`{ "type": "restAny" }`**: Zero or more arguments of any type (must be last in pattern)
- **`{ "type": "any" }`**: Any single argument (wildcard)
- **`{ "type": "pattern", "pattern": "regex" }`**: Argument matching a regex pattern
- **`{ "type": "group", "args": [...], "op