Skip to content
Back to skills

Allow Agent Commands

ASecurity

Add or change allowed commands in AI agent permission configs (OpenCode, Claude Code)

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
ai-agentsbashgit

Works with

  • claude code

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill allow-agent-commands --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Allow Agent Commands?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Allow Agent Commands
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-allow-agent-commands/badge)](https://www.skillsdirectory.com/skills/david-li0406-allow-agent-commands)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: allow-agent-commands
description: Add or change allowed commands in AI agent permission configs (OpenCode, Claude Code)
---

# Adding/Changing Allowed Commands

## When to use this skill

Use this skill when:

- A command needs to be added to the allow list for AI agents
- Permission settings need to be modified for existing commands
- Setting up a new AI tool that requires command permissions

## How it works

Commands must be explicitly allowed in the permission configs before agents
can run them. This skill covers adding entries to both OpenCode and Claude
Code configuration files.

## OpenCode Configuration

File: `.config/opencode/opencode.json` under `permission.bash`

Format:
```json
"uname *": "allow",
```

Pattern: `"command argpatterns": "action"` where `*` matches any args

**Important**: Insert new entries in alphabetical order by command name.
When adding a new command, find the correct position to maintain sorting.
**Do NOT reorder existing entries.**

## Claude Code Configuration

File: `.claude/settings.json` under `permissions.allow`

Format:
```json
"Bash(uname:*)",
```

**Important**: Insert new entries in alphabetical order. Commands are sorted
by the command name (the part after `Bash(` and before `:`).
**Do NOT reorder existing entries.**

## General Pattern for New AI Tools

When adding new AI tools:

1. Find their config file (usually in `~/.config/` or project root)
2. Look for `permissions`, `allowedCommands`, or similar sections
3. Add the command with glob patterns for arguments
4. **Insert new entries in alphabetical order by command name**
5. **Do NOT reorder existing entries.**

## After Adding Commands

After adding the new command entries to both config files:

1. Check if there are any other staged changes with `git status`
2. If there are NO other staged changes, stage ONLY the new hunks in the two
   config files using the `git-stager` subagent (be careful not to stage
   unrelated changes)
3. Invoke the `git-committer` subagent to commit the changes

## Examples

Adding `rg` (ripgrep) to both configs:

**OpenCode** (insert after `rev *`, before `rpm -q*`):
```json
"rg *": "allow",
```

**Claude Code** (insert after `Bash(rg:*)`, before `Bash(rpm -q:*)`):
```json
"Bash(rg:*)",
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…