update-permissions

Merge commandConfig entries into Magenta options.json files.

462|33|Updated Dec 2, 2024
One-click install
npx skills add https://github.com/dlants/magenta.nvim --skill update-permissions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-permissions
Source: https://github.com/dlants/magenta.nvim/tree/main/node/skills/update-permissions
Command: npx skills add https://github.com/dlants/magenta.nvim --skill update-permissions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Magenta users often need to allowlist certain Bash commands and file paths across projects and across machines. This skill provides a centralized, repeatable way to configure and merge command permissions and file access rules into Magenta's options.

Core Features & Use Cases

  • Project-wide and user-wide permissions: Manage and merge commandConfig entries across both project (.magenta/options.json) and user (~/.magenta/options.json) scopes.
  • Structured permission model: Define command patterns with the described ArgSpec types, including read/write file permissions and path constraints.
  • Use Case: When preparing a developer workstation, you can predefine allowed commands for typical workflows to avoid prompts and ensure security.

Quick Start

Use the update-permissions skill to add or merge a new commandConfig entry into the appropriate options.json to allow a safe script execution without prompts.

Frequently Asked Questions about update-permissions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I permanently allowlist bash commands and file access in Magenta?

To permanently allowlist bash commands and file access in Magenta, you configure commandConfig entries in the options.json file, defining ArgSpec patterns and read or write file permissions to prevent execution prompts.

What is the difference between project-level and user-level Magenta options.json?

Project-level Magenta options.json applies settings to a specific project directory, while user-level options.json applies permissions globally across all projects on the machine. This skill merges new rules into either scope.

How do I configure ArgSpec patterns and file permissions for Magenta commands?

You configure ArgSpec patterns and file permissions by adding entries to the commandConfig array in Magenta's options.json, specifying structured read or write access rules and path constraints for your bash commands.

Can I use update-permissions to merge new commandConfig entries without breaking built-in rules?

Yes, when merging new commandConfig entries into Magenta options, the process validates restFiles and restAny placement and ensures built-in permissions remain intact, preventing conflicts with existing configurations.

Why are my Magenta bash commands still prompting for permission after updating options.json?

Commands may still prompt if ArgSpec patterns or file permissions are incorrectly formatted. The configuration validates restFiles and restAny placement, so malformed path constraints can prevent rules from applying correctly.

Does configuring Magenta permissions work for both project and user scopes simultaneously?

Yes, configuring Magenta permissions supports both project-level and user-level scopes. You can define commandConfig entries in either the project or user home directory to manage access across different environments.