Repository navigation
v1.2.0
skill_management gives every installed OpenCode skill a switch: list what is installed, find out
why one will not load, hide it from the model, and put it back. Disabling writes one global
skill permission rule — no skill file is ever moved, edited or deleted.
No breaking changes in 1.2.0. The four actions, their inputs, the JSON envelope, the written
rule shape, the same-line marker and the single-file layout are unchanged since 1.1.0.
Fixed since v1.1.0
listno longer reports "N skills differ across other agents" on every call.
summary.divergedcounted hidden internal agents (title,summary, …), which carry
{*,*,deny}; on a real machine that made every skill look divergent (33/33) and added a noise
warning to eachlist. Only visible agents are compared now;inspect.agents[]still lists
every agent, so the detail is not lost.- Frontmatter booleans no longer contradict each other.
disable-model-invocation: "false"is a
string, andBoolean("false") === true, soinspectreported it astruewhilelistreported
autoinvoke: falsefor the same file.true/yes/on/1andfalse/no/off/0(quoted or not) are
normalized now, and both fields go through the same rule. - A failed sidecar write no longer turns a successful config change into an error. Once the
config was written and verified, a sidecar write failure used to surface asinternal_error: the
file really changed, but the result had nochanged/diff. It now returnsok: true,
changed: true, keepsdiff, setssidecar: null, and explains itself inwarnings. The config
change is not rolled back. enableis no longer blocked by an unrelated file's syntax error. It reads sidecar-recorded
config files alongside the target; before, any of them failing to parse plus "no candidate rule"
producedconfig_unparsable. The hard refusal now applies only to the target config file;
other files are reported inwarningsby name.
Also since v1.1.0
- The installer checks before writing. If
opencode.json(c)already lists this package in
plugins, or a second copy sits inplugins/, it refuses and exits with code2, leaving every
file untouched — two sources make the host reportDuplicate plugin IDand fail one of them. - New installer flags:
--check/--dry-run,--uninstall(deletes only this plugin's file),
--npm(asserts the npm channel, never writes),--force,--json.<config>resolves the way
the host resolves it ($OPENCODE_CONFIG_DIRfirst). - The plugin exports
PLUGIN_VERSION, asserted againstpackage.jsonby the harness. - The acceptance harness grew from 260 to 326 assertions, and now validates every action's
outputagainst the declared JSON Schema (required fields, property types,error.code/
error.message) and asserts thatcontentis the same data asoutput. - README is down to 51 lines; field tables, installer flags, package contents, usage and the test
workflow moved to the documentation site. - The documentation site gained Design decisions (why permission rules instead of policies, why
there is noallow, why global-only, why text edits plus a same-line marker, why the sidecar is
only an audit trail — each with its cost) and Development & verification (harness sections,
CI, the performance and release gates, npm package contents, why two copies cannot coexist).
The Permissions page now expands Effects into adenyvsaskcomparison with three real
skill examples. English and Chinese stay mirrored.
What it does
| Action | What you get | Writes config |
|---|---|---|
list |
Every registered skill and its effective state for the calling agent (available / disabled / ask) |
No |
inspect |
Why one skill is (not) usable: the matched rule, per-agent differences, how the id was derived | No |
disable |
Hidden from the model-visible list and rejected at load (effect: "ask" keeps it listed with confirmation) |
Yes |
enable |
Deletes the one blocking rule, whoever wrote it | Yes |
Permissions are evaluated for the calling agent only: last match wins (findLast, with *
and ? globs), and no match falls back to ask, not allow.
The rule disable writes is exactly this line (the trailing comment is the provenance marker
enable uses):
Writes are atomic, preserve indentation, key order, line endings (CRLF/LF) and BOM, keep one
backup, and are verified by reloading the host and polling the caller's rule set; a write the host
did not pick up is rolled back.
Usage
skill_management({ action: "list" })
skill_management({ action: "inspect", id: "windows-shell" })
skill_management({ action: "disable", id: "windows-shell" })
skill_management({ action: "disable", id: "windows-shell", dryRun: true })
skill_management({ action: "disable", id: "windows-shell", effect: "ask" })
skill_management({ action: "enable", id: "windows-shell" })
Full field tables and error codes are on the four action pages of the docs site:
https://sogeisetsu.github.io/opencode-skill-management/
Install
| Channel | Command / asset | Notes |
|---|---|---|
| npm (recommended) | opencode plugin add opencode-skill-management@1.2.0 |
Installs the package and registers it in the global config; no token needed |
| git spec | opencode plugin add github:sogeisetsu/opencode-skill-management |
Bypasses the npm registry |
| Single file | asset skill_management.js |
Drop it into <config>/plugins/; best for offline use |
| npm tarball | asset opencode-skill-management-1.2.0.tgz |
The same tarball npm publishes; for auditing or internal mirrors |
Verify it loaded in a new process:
opencode plugin list --builtin
# skill_management 1.2.0 opencode-skill-management@1.2.0Compatibility and verification
- Targets OpenCode V2. 1.1.0 was accepted on host 2.0.32 on Windows and Linux.
- 1.2.0 was re-checked on host 2.2.0 (Windows) in a new process:
list,inspect,disable
andenablecalled in sequence, the config restored byte for byte afterwards, and every
result accepted by the host'soutputvalidation. node tools/verify.mjs: 326 assertions pass (sections A–J), entirely against a temporary
config directory.- The same harness runs on
ubuntu-latestandwindows-latestin CI, with no secrets. - One file, pure Node built-ins, no runtime dependencies, no shell calls.
Full diff: v1.1.0...v1.2.0
{ "action": "skill", "resource": "windows-shell", "effect": "deny" } // skill_management