opencode-permission

Manage OpenCode Bash auto-approval rules in opencode.jsonc.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/CNife/skills --skill opencode-permission
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-permission
Source: https://github.com/CNife/skills/tree/main/.archive/opencode-permission
Command: npx skills add https://github.com/CNife/skills --skill opencode-permission

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires json-five, and includes scripts (resource) components.

What problem does it solve?

OpenCode can interrupt every shell command for confirmation; this Skill centralizes permission rules so common commands can run automatically, be blocked, or still ask for confirmation without manual config editing.

Core Features & Use Cases

  • Rule Management: Add, remove, list, and format bash permission patterns in opencode.jsonc.
  • Safe Config Editing: Preserves JSONC comments, creates timestamped backups, and keeps rules formatted one per line.
  • Practical Scenarios: Allow routine commands like kubectl get *, require confirmation for git push *, or deny dangerous patterns like rm -rf *.

Quick Start

Ask me to add, remove, or list OpenCode permission rules for specific shell commands and I will update the configuration safely.

Frequently Asked Questions about opencode-permission

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

FAQPage Schema
How do I auto-approve bash commands in OpenCode without manual confirmation?

You can prevent OpenCode from interrupting shell commands by adding permission rules to opencode.jsonc. This Skill configures bash auto-approval patterns so routine commands run automatically without manual confirmation.

What is the best way to configure OpenCode permission rules for specific shell commands?

Configuring OpenCode permission rules involves editing opencode.jsonc to define bash auto-approval patterns. This Skill adds, removes, and formats rules for specific shell commands while preserving JSONC comments and creating timestamped backups.

Does editing OpenCode permissions preserve JSONC comments in the configuration file?

Yes, modifying OpenCode permissions preserves JSONC comments in opencode.jsonc. This Skill uses the json-five parser to update bash auto-approval rules while keeping existing comments intact and creating timestamped backups before changes.

Can I use wildcard matching for bash permission rules in OpenCode?

Yes, OpenCode permission rules support wildcard matching in opencode.jsonc. This Skill applies wildcard patterns to auto-approve routine commands like kubectl get *, require confirmation for git push *, or deny dangerous patterns like rm -rf *.

Do I need uv installed to manage OpenCode permission rules?

Yes, uv is required because this Skill uses uv-based execution with the json-five dependency to parse and modify opencode.jsonc. This setup ensures bash auto-approval rules are added safely without breaking JSONC syntax or losing comments.

Why do my OpenCode permission changes break the JSONC configuration format?

OpenCode permission changes break JSONC format when standard JSON parsers strip comments. This Skill uses json-five to preserve JSONC comments in opencode.jsonc, formats bash auto-approval rules one per line, and creates timestamped backups to prevent corruption.