Skip to main content

Module skill_asset

Module skill_asset 

Source
Expand description

The two opencode-ctl skills, embedded as templates and rendered per host.

The canonical templates live INSIDE this crate (skill/), so include_str! needs no .. traversal. render strips the maintainer header, substitutes the host placeholders and returns the exact bytes emit-skill <name> --host <h> prints; the committed per-plugin copies are pinned against this output.

Enums§

SkillName

Constants§

DOCTOR_SKILL
The doctor skill template, embedded at compile time.
DRIVER_SKILL
The driver skill template, embedded at compile time (version-locked to this binary).

Functions§

argument_hint 🔒
binary 🔒
host_name 🔒
install_clause 🔒
install_section 🔒
The whole “Installing opencode-pair” section, without a trailing newline; it still carries {{BINARY}}.
render
The bytes emit-skill prints for (name, host): header stripped, every token substituted, exactly one final newline. A leftover {{ is an error rather than silently shipped.
strip_header 🔒
Remove the leading HTML-comment header (the same rule as shared/ghidra-mcp/src/skill_asset.rs:20-40: only when the template starts with <!--, resuming after whatever line ending follows the --> line).