Skip to content

v1.2.0

Latest

Choose a tag to compare

@sogeisetsu sogeisetsu released this 31 Oct 19:38
· 28 commits to main since this release

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

  • list no longer reports "N skills differ across other agents" on every call.
    summary.diverged counted 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 each list. 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, and Boolean("false") === true, so inspect reported it as true while list reported
    autoinvoke: false for the same file. true/yes/on/1 and false/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 as internal_error: the
    file really changed, but the result had no changed / diff. It now returns ok: true,
    changed: true, keeps diff, sets sidecar: null, and explains itself in warnings. The config
    change is not rolled back.
  • enable is 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"
    produced config_unparsable. The hard refusal now applies only to the target config file;
    other files are reported in warnings by 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 in plugins/, it refuses and exits with code 2, leaving every
    file untouched — two sources make the host report Duplicate plugin ID and 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_DIR first).
  • The plugin exports PLUGIN_VERSION, asserted against package.json by the harness.
  • The acceptance harness grew from 260 to 326 assertions, and now validates every action's
    output against the declared JSON Schema (required fields, property types, error.code /
    error.message) and asserts that content is the same data as output.
  • 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 no allow, 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 a deny vs ask comparison 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):

{ "action": "skill", "resource": "windows-shell", "effect": "deny" } // skill_management

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.0

Compatibility 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
    and enable called in sequence, the config restored byte for byte afterwards, and every
    result accepted by the host's output validation.
  • node tools/verify.mjs: 326 assertions pass (sections A–J), entirely against a temporary
    config directory.
  • The same harness runs on ubuntu-latest and windows-latest in CI, with no secrets.
  • One file, pure Node built-ins, no runtime dependencies, no shell calls.

Full diff: v1.1.0...v1.2.0