Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Add or change allowed commands in AI agent permission configs (OpenCode, Claude Code)
.claude/skills/majiayu000-allow-agent-commands/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -23% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -24% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -40% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 174% | 0% |
Use this skill when:
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.
IMPORTANT: The config files are stowed into ~ via GNU Stow symlinks. Always edit them directly from within the ai-config repository, NOT from ~. The paths below are relative to the ai-config repository root.
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.
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.
When adding new AI tools:
~/.config/ or project root)permissions, allowedCommands, or similar sectionsAfter adding the new command entries to both config files:
git statusconfig files using the git-stager subagent (be careful not to stage unrelated changes)
git-committer subagent to commit the changesAdding 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:*)",
Other measured skills in the registry, with their headline benchmark lift.