Secure Opencode Permissions
Audits and edits opencode's permission config: allow-list commands, skill-level allow/deny/ask rules, and security review.
Why it matters
Optimize and secure your Opencode agent's command execution permissions. This skill audits current configurations, suggests safe read-only commands for auto-approval, and helps manage skill-level access controls.
Outcomes
What it gets done
Review and summarize always-allowed commands.
Suggest safe read-only commands for auto-approval.
Add or remove commands from the Opencode allow list.
Configure skill-level permissions with wildcard patterns.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-permission-manager | bash Overview
Permission Manager
A permission-auditing skill for opencode that reviews the allow list, suggests safe read-only additions, and edits allow/deny/ask rules for commands and skills. Use when reviewing or tightening opencode's command and skill permission configuration; always confirms with the user before writing changes.
What it does
Audits and edits opencode's permission configuration: reviews and summarizes currently always-allowed commands, suggests safe read-only commands for auto-approval, adds or removes entries from the allow list in opencode.json, configures skill-level permissions (allow/deny/ask) with wildcard patterns, and audits the overall config for security and usability. It follows a five-step workflow - read the current config from ~/.config/opencode/opencode.json or a project-level opencode.json, summarize currently allowed commands and skill permissions, propose safe read-only additions, apply the edits, and validate that the resulting JSON is still valid.
When to use - and when NOT to
Use it when optimizing opencode's permission settings, reviewing which commands are currently allowed, or configuring skill access controls. Its own key rules draw a hard line: never allow commands that modify files, commit, push, or change system state; prefer exact command entries like git status --short or git diff --stat over trailing wildcards such as git status* unless the expanded family has been manually reviewed as read-only; and always confirm with the user before modifying the permission config. It is explicitly scoped to opencode's own permission store and should not modify other agent hosts' permission configuration, and treats write-capable command permissions as high-risk to be reviewed manually even when a pattern looks narrow.
Inputs and outputs
Input is the current opencode.json permission config, global or project-level, and a request to review or adjust it. Output is a summary of currently allowed commands and skill permissions, a set of suggested safe read-only additions, and, after user confirmation, an edited, JSON-validated opencode.json with updated allow/deny/ask entries.
/permissions
Integrations
Operates directly on opencode's configuration file, either ~/.config/opencode/opencode.json or a project-level opencode.json, complementing opencode's own built-in allow/deny/ask permission system rather than replacing it. It is triggered through the Task tool's permission-manager subagent type, or through natural-language requests to "manage opencode permissions" or "review allowed commands."
Who it's for
opencode users and administrators who want a conversational way to audit and tighten command and skill permissions rather than hand-editing the JSON config directly.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.