GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add native skill tool with permission system by malhashemi · Pull Request #5930 · anomalyco/opencode

Conversation

@malhashemi

@malhashemi malhashemi commented Dec 22, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

  • Add native skill tool for on-demand skill loading with pattern-based access control
  • Support agent-specific permission overrides for fine-grained skill access

Features

Skill Tool

Skills are now loaded on-demand via the native skill tool. The agent sees available skills listed in <available_skills> and can load the full content when needed:

skill({ name: "pr-review" })

Skill Permissions

Control which skills agents can access using pattern-based permissions in opencode.json:

{
  "permission": {
    "skill": {
      "pr-review": "allow",
      "internal-*": "deny",
      "experimental-*": "ask",
      "*": "allow"
    }
  }
}
Permission Behavior
allow Skill loads immediately
deny Access rejected at execution time
ask User prompted for approval before loading

Patterns support wildcards: category-* matches all skills with that prefix.

Agent-Specific Overrides

Override global permissions for specific agents. Useful for giving specialized agents access to restricted skills.

For custom agents (in agent frontmatter):

---
permission:
  skill:
    "documents-*": "allow"  # override global deny
---

For built-in agents (in opencode.json):

{
  "agent": {
    "plan": {
      "permission": {
        "skill": {
          "internal-*": "allow"
        }
      }
    }
  }
}

Disabling the Skill Tool

Completely disable the skill tool for agents that shouldn't use skills:

For custom agents:

---
tools:
  skill: false
---

For built-in agents:

{
  "agent": {
    "plan": {
      "tools": {
        "skill": false
      }
    }
  }
}

When disabled, the <available_skills> section is omitted from the system prompt entirely.


Note: Skill tool responses are whitelisted from session compaction pruning to ensure loaded skill content remains available throughout the conversation.


Edited: Post-Merge Changes by Maintainer

The maintainer simplified the original implementation before merging:

  1. Removed per-agent filtering from <available_skills>: The original PR filtered skills in the tool description based on agent permissions. This was removed—all skills now appear in <available_skills> regardless of permissions.

  2. Permission checks remain at execution time only: Skills with deny permission are rejected when the agent tries to load them, but they still appear in the skill list.

  3. Skill IDs changed to names: Skills are now identified by their name field from frontmatter, not path-based IDs. Skill names must be unique.

Follow-up PR #6000 implements the per-agent filtering in the tool description by passing agent context to tool initialization.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

0serna reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
malhashemi added 2 commits December 22, 2025 12:11
@malhashemi
feat: add native skill tool with permission system
a9542e2
- Add skill tool for loading skill content on-demand
- Support pattern-based skill permissions (allow/deny/ask)
- Enable agent-specific permission overrides
- Support nested skills with path-based IDs (e.g., prompter/skill-creator)
- Filter available_skills in system prompt by agent permissions
- Preserve skill tool responses during compaction pruning
@malhashemi
fix: hide available_skills section when skill tool is disabled
22375fb
@malhashemi

malhashemi commented Dec 22, 2025

Copy link
Copy Markdown
Contributor Author

@thdxr done boss

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rekram1-node
rekram1-node requested a review from thdxr December 22, 2025 06:06
malhashemi and others added 3 commits December 23, 2025 01:07
@malhashemi
Merge branch 'dev' into feature/skill-tool
cd9eeb7
@thdxr
sync
9a5dd18
@thdxr
sync
b5a710c
@thdxr
thdxr force-pushed the feature/skill-tool branch from 67ca7cf to b5a710c Compare December 22, 2025 23:22
@thdxr
thdxr merged commit 046e351 into anomalyco:dev Dec 22, 2025
malhashemi added a commit to malhashemi/opencode that referenced this pull request Dec 23, 2025
@malhashemi
feat(skill): add per-agent filtering to skill tool description
565c46a
Pass agent context through tool initialization chain so the skill tool
can filter available_skills by agent permissions. Skills with 'deny'
permission are hidden from the tool description, preventing agents from
seeing skills they cannot access.

Changes:
- Add InitContext interface with optional agent to Tool namespace
- Update ToolRegistry.tools() to accept and pass agent to init()
- Filter skills in SkillTool.init() based on agent permissions
- Add duplicate skill name warning in Skill.all()

Follow-up to anomalyco#5930 per maintainer feedback.
@malhashemi malhashemi mentioned this pull request Dec 23, 2025
feat(skill): add per-agent filtering to skill tool description #6000
Merged
@jiyeol-lee

jiyeol-lee commented Dec 23, 2025

Copy link
Copy Markdown

omg, i've been waiting for this feature so long and @malhashemi you implemented exactly how i wished. thank you so much!!!

malhashemi reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

malhashemi added a commit to malhashemi/opencode-skills that referenced this pull request Dec 23, 2025
@malhashemi
docs!: deprecate plugin - skills now native in OpenCode v1.0.190+
396332a
BREAKING CHANGE: This plugin is deprecated. Skills functionality is now built into OpenCode natively.

- Add graduation banner and migration guide
- Document directory change (.opencode/skills/ → skill/)
- Document config migration (tools → permission.skill)
- Add Thank You section acknowledging community support
- Promote opencode-sessions as the next plugin to try
- Move original README to collapsed Historical Documentation section

Native implementation PRs:
- anomalyco/opencode#5930 (v1.0.190)
- anomalyco/opencode#6000 (v1.0.191)
@malhashemi malhashemi mentioned this pull request Dec 23, 2025
v1.0.0: Deprecate plugin - skills now native in OpenCode malhashemi/opencode-skills#54
Merged
malhashemi added a commit to malhashemi/opencode-skills that referenced this pull request Dec 23, 2025
@malhashemi
docs!: deprecate plugin - skills now native in OpenCode v1.0.190+
0b8cfbc
BREAKING CHANGE: This plugin is deprecated. Skills functionality is now built into OpenCode natively.

- Add graduation banner and migration guide
- Document directory change (.opencode/skills/ → skill/)
- Document config migration (tools → permission.skill)
- Add Thank You section acknowledging community support
- Promote opencode-sessions as the next plugin to try
- Move original README to collapsed Historical Documentation section

Native implementation PRs:
- anomalyco/opencode#5930 (v1.0.190)
- anomalyco/opencode#6000 (v1.0.191)
malhashemi added a commit to malhashemi/opencode-skills that referenced this pull request Dec 23, 2025
@malhashemi
docs!: deprecate plugin - skills now native in OpenCode v1.0.190+ (#54)
fa75b67
BREAKING CHANGE: This plugin is deprecated. Skills functionality is now built into OpenCode natively.

- Add graduation banner and migration guide
- Document directory change (.opencode/skills/ → skill/)
- Document config migration (tools → permission.skill)
- Add Thank You section acknowledging community support
- Promote opencode-sessions as the next plugin to try
- Move original README to collapsed Historical Documentation section

Native implementation PRs:
- anomalyco/opencode#5930 (v1.0.190)
- anomalyco/opencode#6000 (v1.0.191)
@taqtiqa-mark taqtiqa-mark mentioned this pull request Dec 23, 2025
Support for "Skills" #3235
Closed
@malhashemi
malhashemi deleted the feature/skill-tool branch December 23, 2025 22:42
rekram1-node pushed a commit that referenced this pull request Dec 27, 2025
@malhashemi @thdxr @rekram1-node
feat: add native skill tool with permission system (#5930)
d3eb85e
Co-authored-by: Dax Raad <[email protected]>
@zikajk zikajk mentioned this pull request Dec 30, 2025
Support skills editor-code-assistant/eca#241
Closed
@yacinehmito yacinehmito mentioned this pull request Jan 18, 2026
Skill documentation incorrectly states name validation is enforced #9294
Closed
yacinehmito added a commit to fabriq/opencode that referenced this pull request Jan 18, 2026
@yacinehmito
docs: clarify skill naming is convention, not enforced
39e6346
The documentation incorrectly stated that skill names must follow strict
validation rules (lowercase alphanumeric with hyphens, regex pattern, etc).

Looking at the actual code in skill.ts, there is no such validation - the
name field accepts any string. This validation was proposed in PR anomalyco#5930
but removed before merging because it broke backward compatibility
(see issue anomalyco#6432).

Updated the docs to present these as recommended conventions rather than
enforced requirements.

Fixes anomalyco#9294
@yacinehmito yacinehmito mentioned this pull request Jan 18, 2026
docs: clarify skill naming is convention, not enforced #9295
Closed
mdsiaofficial
mdsiaofficial reviewed Jan 20, 2026
View reviewed changes

@mdsiaofficial mdsiaofficial left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@marcusquinn marcusquinn mentioned this pull request Feb 25, 2026
feat(agent): add subagents config for per-agent task tool filtering #7271
Closed
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
@malhashemi @thdxr
feat: add native skill tool with permission system (anomalyco#5930)
cdf3ac3
Co-authored-by: Dax Raad <[email protected]>
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
@malhashemi @thdxr
feat: add native skill tool with permission system (anomalyco#5930)
a7db6e4
Co-authored-by: Dax Raad <[email protected]>
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
@malhashemi @thdxr
feat: add native skill tool with permission system (anomalyco#5930)
e59b9f6
Co-authored-by: Dax Raad <[email protected]>
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
@malhashemi @thdxr
feat: add native skill tool with permission system (#5930)
106b668
Co-authored-by: Dax Raad <[email protected]>
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 2026
@malhashemi @thdxr
feat: add native skill tool with permission system (anomalyco#5930)
d3d0ea8
Co-authored-by: Dax Raad <[email protected]>
androidand pushed a commit to androidand/opencode-skein that referenced this pull request Sep 19, 2026
@malhashemi @thdxr @rekram1-node
feat: add native skill tool with permission system (anomalyco#5930)
ae081b5
Co-authored-by: Dax Raad <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@thdxr thdxr Awaiting requested review from thdxr
1 more reviewer
@mdsiaofficial mdsiaofficial mdsiaofficial left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@malhashemi @jiyeol-lee @mdsiaofficial @thdxr
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.