Back to Skills

update-permissions

verified

Add bash command permissions to project-level or user-level magenta options. Use when a command needs to be permanently allowlisted.

View on GitHub

Repository

dlants/magenta.nvim
419stars

node/skills/update-permissions/skill.md

Last Verified

January 23, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/dlants/magenta.nvim/blob/f7ed15d129b8c9df65c71aee9b464f34bde447ad/node/skills/update-permissions/skill.md -a claude-code --skill update-permissions

Installation paths:

Claude
.claude/skills/update-permissions/
Powered by add-skill CLI

Instructions

# 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

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
4032 chars