Skill & Package Nodes

Applies to: ChengOS v0.2.0+ | Last verified: 2026-09-25 | Source: crates/cheng-nodes/src/nodes/builtin/tools

Skills as objects you can build and check, not just run. tools/skill executes one. tools/write_skill_package produces a package, and tools/validate_skill_spec checks it against the package format before anyone tries to publish or import it — validation before distribution is the whole point, since a published artifact is immutable. tools/cli_install runs the install steps a package declares.

Execute Skill — tools/skill

Find and execute registered Skill by name

Inputs

FieldTypeRequiredDefaultDescription
skill_namestring✅—Name of the skill to execute (unique slug)
input_dataany—nullInput data passed to the workflow (optional)
timeout_secondsinteger—3600Maximum wait time in seconds, default 3600
async_executionboolean—falseIf true, returns immediately after starting workflow without waiting for completion
env_varsobject—nullEnvironment variables from skill credential injection node (optional)

Outputs

FieldTypeDescription
statusstringSkill execution status (see SkillOutput::status docs for the closed enum and frontend mapping)
skill_idstringMatched skill ID
skill_namestringMatched skill name
execution_idstringWorkflow execution ID (if started)
outputsanyWorkflow output data
instructionsstringSkill usage instructions (returned when no associated workflow)
next_actionstringSuggested next action (for LLM reference)
errorstringError message
missing_binariesarrayRequired binaries that were not found on PATH; install them or run the skill on a host that has them.
missing_credentialsarrayList of credential bindings that could not be resolved; rendered into the credential-setup UI.
approval_outcomestringApproval gate outcome for high-risk skills
normalization_statusstringCanonical spec normalization status
policy_warningsarray<string>Runtime policy warnings
operationstringHub operation that produced this output
dataanyOperation-specific payload (discovery page or status report)

Write Skill Package — tools/write_skill_package

Restricted: safely writes a skill package under skills/<name>/. Respects admin locks and prevents path traversal.

Inputs

FieldTypeRequiredDefaultDescription
packageobject——Combined validated package from tools/validate_skill_spec. Prefer wiring Validate.validated_package into this single port.
skill_namestring—""Stable skill slug. Accepts either a plain string or a JSON string of the form {"skill_name": "..."} (the generator-prompt shape).
filesarray<object>——File payloads to write. Accepts either a structured array or a JSON string of the same array, so it can be wired directly to an ai/llm response that returns JSON text.
force_admin_overrideboolean—falseCaller must set this only after capturing explicit admin consent to overwrite a locked skill.
workspace_idstring—nullOwning workspace for the imported skill. When set, the writer marks the skill private to this workspace via SKILL.md import metadata. Usually resolved from the execution context rather than supplied directly.
source_snapshotobject—nullOpaque source-snapshot artifact reference from tools/fetch_repository. Forward it verbatim; never reconstruct, enumerate, or omit source bytes.

Outputs

FieldTypeDescription
successbooleanIndicates whether the package was validated, approved, and committed.
statusstringStable status: written | validation_failed | approval_rejected | approval_timed_out | target_changed | write_failed | restricted.
retryablebooleanTrue when the caller can plausibly repair and retry (e.g. a repairable validation failure or a stale target).
skill_namestringActual skill slug that was written (passed slug validation).
written_pathsarray<string>Skills-root-relative display paths of committed files (e.g. skills/<name>/SKILL.md). Absolute host paths are never returned.
package_digeststringsha256 digest of the exact committed (sanitized + trusted-metadata) package bytes. Present on success.
validationanyStructured validation result (valid, issue_fingerprint, issues, warnings) when the package failed deterministic validation.
errorstringError description when the write fails. Present only when success=false.
error_codestringStructured error code for upstream conditional branching. Present only when success=false.

Validate Skill Spec — tools/validate_skill_spec

Validates an LLM-generated skill package against the ChengOS CanonicalSkillSpec contract before files are written.

Inputs

FieldTypeRequiredDefaultDescription
name_pathstring—nullCombined skill name and package path input. This is the ergonomic single-port path for hand-built importer workflows: plain string is treated as package_path and skill_name is inferred from the final path segment; JSON string or object uses { "skill_name": "...", "package_path": "..." }.
skill_namestring—""Stable skill slug. Must match the canonical spec's name.
filesarray<object>—[]File payloads the importer would write — typically SKILL.md, skill.yaml, workflow.json, plus references. Accepts either a structured array or a JSON string of the same shape, so it can be wired directly to an ai/llm response that returns JSON text.
package_pathstring—nullOptional package path under the current workspace root. Accepts the skills/<name> path returned by fetch_repository and loads SKILL.md, skill.yaml, optional workflow.json, and optional references/*.
sandbox_rootstring—nullBase directory that package_path resolves against. Fill this with the SAME sandbox_root the file-operations tool used when it wrote the package — the absolute directory shown in that tool's [Instance Constraints] block and in its view_file/edit_file results (e.g. /home/cheng/works/chengos/chengflow/skills). Then pass just the package folder name in package_path. This is how the validator finds the files the writer created.
skip_reviewboolean—falseTrusted import: skip only the LLM/human review stage (promote to ready) for a known-safe package. Deterministic validation always runs. Honored only when the server enables CHENG_ALLOW_SKILL_SKIP_REVIEW, the package has no errors, and the tool surface is not high-risk.
skip_review_reasonstring—nullAudit reason recorded when skip_review is honored (e.g. owned-package-reimport).
trusted_sourceboolean—falseAdvisory hint that the import source is trusted; does not by itself bypass any check.

Outputs

FieldTypeDescription
validbooleanIndicates whether the skill package passed validation.
errorsarray<string>Structured list of errors returned when validation fails.
warningsarray<string>Warnings raised during validation.
skill_name_outstringRuntime-conditional validated skill name. Present only when validation succeeds.
normalization_statusstringNormalization status of the spec after validation.
canonical_specanyRuntime-conditional canonical spec object. Present only when validation succeeds.
sanitized_filesarray<object>Original file list with skill.yaml replaced by the sanitized canonical spec (normalization.status forced to needs_review, execution.auto_execute forced to false, any LLM-injected frontmatter trust knobs removed). Downstream tools/write_skill_package MUST consume sanitized_files, never the raw LLM output, so the on-disk skill.yaml reflects the validated policy.
sanitized_files_if_validarrayRuntime-conditional sanitized files. Present only when validation succeeds.
validated_packageobjectRuntime-conditional package containing skill_name and sanitized files. Present only when validation succeeds.
approval_summarystringRuntime-conditional JSON summary for admin approval. Present only when validation succeeds.
backend_typestringThe validated backend kind (workflow | cli | agentic | …). Present once skill.yaml parses.
llm_toolsanyThe LLM-visible tool surface (llm_tools.expose) for an agentic skill. Absent for non-agentic skills.
requires_tool_reviewbooleanTrue when the exposed tool surface grants broad/high-risk access and must be reviewed by an admin before the skill can be promoted to ready.
review_skippedbooleanTrue when a trusted skip-review was honored (promoted to ready without the LLM/human review stage). Deterministic validation still ran.
issuesarray<object>Structured validation issues with stable codes, severity, file/field locations, and retryability. Compatibility errors/warnings are rendered from the same collection.
issue_fingerprintstringStable fingerprint over sorted (severity, code, file, path) tuples; excludes message text and source content. Absent when there are no issues.

CLI Install Runner — tools/cli_install

Restricted: installs a CLI from the trusted package index. The LLM supplies only cli_name; this node selects the package manager, builds and validates the manifest, obtains approval for mutating steps, and executes the fixed argv commands.

Inputs

FieldTypeRequiredDefaultDescription
cli_namestring✅—Target CLI to install (for example gh, jq, or rg). It must resolve in the trusted package index.
working_subdirstring—nullOptional relative working subdirectory inside the execution boundary.
timeout_msinteger—120000Execution timeout in milliseconds.
memory_mbinteger—512Memory limit in MB.

Outputs

FieldTypeDescription
successbooleanSuccess
statusstringStable machine-readable outcome: ok, not_found, or error.
cli_namestringCli Name
provider_idstringProvider Id
package_managerstringPackage Manager
stepsarray<object>Steps
errorstringError

Next steps