Skip to content

[FEATURE]: Allow skills and commands to define scoped permission overrides #7407

Closed as not planned

Description

@rcdailey

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem:
When creating skills or commands that need specific tool permissions (e.g., a /commit command that needs git commit and git add), there's no way to scope those permissions to the skill/command invocation. Users must either:

  1. Globally allow those commands (reducing safety)
  2. Keep them as ask and manually approve every time the skill/command runs

Proposed solution:
Allow skills and commands to define permission overrides in their frontmatter that apply only during their execution:

For skills (SKILL.md):

---
name: git-commit
description: Commit workflow with conventional commits
permission:
  bash:
    "git add *": allow
    "git commit *": allow
---

For commands (.opencode/command/commit.md):

---
description: Run commit workflow
permission:
  bash:
    "git add *": allow
    "git commit *": allow
---

Behavior:

  • Permission overrides apply only while the skill is loaded or command is executing
  • Overrides merge with (and take precedence over) global/agent permissions for the duration
  • After skill/command completes, permissions revert to normal
  • Optional: require user confirmation when a skill/command requests elevated permissions (similar to ask but at skill-load time rather than per-command)

Benefits:

  • Enables safe, targeted permission elevation for specific workflows
  • Reduces friction for trusted operations without globally loosening security
  • Aligns with principle of least privilege

Use cases:

  • Git commit workflows that need git add/git commit
  • Release scripts that need gh release create
  • Build commands that need specific npm/cargo/make invocations

Activity

  1. github-actions commented on Jan 9, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. einarpersson commented on Jan 10, 2026

    @einarpersson

    What i would like is that tools would not even be visible for an agent until a skill has been loaded.

    If i have a skill "calendar/SKILL.md" then i would want that loading it would both give new prompt context AND availablity to tools. I guess this is what this Feature Request is about, but i'd like to emphasis that it should be possible to "load a skill on demand and then suddenly see new tools that it wasnt aware of before".

    Question regarding this feature request: why would the permissions be revoked after a skill has been loaded? It makes sense for a command but not for a skill. Once an agent has loaded a skill surely it should keep everything related around? or?

  3. github-actions commented on Mar 25, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  4. einarpersson commented on Mar 25, 2026

    @einarpersson

    I dont understand, why open a new issue? Feels like it would only create noise.

    I think this is still a relevant request. I suppose the main reason not to is to keep some kind of compatibility with other apps using the skill files, but i dont know what the opencode attitude is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions