GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||
GeezerVison is showing github.com — feat: add native skill tool with permission system by malhashemi · Pull Request #5930 · anomalyco/opencode Conversation
|
| 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.
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"
}
}
}
}
}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.
The maintainer simplified the original implementation before merging:
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.
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.
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.
There was an error while loading. Please reload this page.
- 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
|
@thdxr done boss |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
67ca7cf to
b5a710c
Compare
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.
|
omg, i've been waiting for this feature so long and @malhashemi you implemented exactly how i wished. thank you so much!!! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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)
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)
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)
Co-authored-by: Dax Raad <[email protected]>
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
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nice
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Dax Raad <[email protected]>
Co-authored-by: Dax Raad <[email protected]>
Co-authored-by: Dax Raad <[email protected]>
Co-authored-by: Dax Raad <[email protected]>
Co-authored-by: Dax Raad <[email protected]>
Co-authored-by: Dax Raad <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.