Skip to main content
The Skill system in Palyra provides a secure, auditable, and sandboxed mechanism for extending agent capabilities. A “Skill” is a versioned bundle containing a manifest, WebAssembly modules, and optional assets, protected by Ed25519 digital signatures and subject to automated security auditing.

1. Skill Manifest and Metadata

The SkillManifest is the central configuration file (skill.toml) for any skill. It defines the identity, requirements, and requested capabilities of the skill.

Key Manifest Components

Compatibility Enforcement

The runtime enforces versioning constraints defined in the manifest’s compat section. It checks the required_protocol_major and min_palyra_version against the current daemon metadata crates/palyra-skills/src/manifest.rs#152-171. Sources: crates/palyra-skills/src/manifest.rs#12-150, crates/palyra-skills/src/models.rs#1-100

2. Artifact Packaging and Signing

Skills are distributed as signed ZIP archives with a .palyra-skill extension crates/palyra-skills/src/constants.rs#13-17.

The Packaging Process

  1. Bundle Creation: The build_signed_skill_artifact function takes the manifest, Wasm modules, and assets crates/palyra-skills/src/artifact.rs#11-59.
  2. Sidecar Injection: The packager automatically generates and includes:
    • skill.toml: The validated manifest.
    • sbom.cyclonedx.json: Software Bill of Materials.
    • provenance.json: Build metadata.
  3. Signing: A SHA-256 hash of the payload is signed using an Ed25519 private key. The resulting signature.json contains the key_id and the signature bytes crates/palyra-skills/src/artifact.rs#50-65.

CLI Integration

The palyra skills package build command facilitates this lifecycle, allowing developers to pull signing keys from the palyra-vault or stdin crates/palyra-cli/src/commands/skills.rs#5-67. Sources: crates/palyra-skills/src/artifact.rs#11-65, crates/palyra-cli/src/commands/skills.rs#5-105

3. Trust Models and Verification

Palyra implements a multi-tiered trust model for skill installation, managed via the SkillTrustStore.

Trust Decisions

Verification Logic

The verify_skill_artifact function performs:
  1. Integrity Check: Verifies the ZIP structure and SHA-256 hashes.
  2. Signature Validation: Confirms the signature matches the payload using the publisher’s public key.
  3. Trust Evaluation: Checks the SkillTrustStore to see if the key is known or if TOFU is permitted crates/palyra-skills/src/verify.rs#25-80.
Sources: crates/palyra-skills/src/verify.rs#25-100, crates/palyra-cli/src/commands/skills.rs#106-150

4. Security Auditing

Before execution, and periodically thereafter, skills undergo an automated security audit via audit_skill_artifact_security.

Audit Checks

CheckDescription
Module SizeEnsures Wasm modules do not exceed max_module_bytes crates/palyra-skills/src/constants.rs#14.
ExportsLimits the number of exported functions to prevent complexity attacks.
ImportsScans Wasm imports to ensure they only target allowed Palyra host modules (e.g., palyra:plugin/*).
CapabilitiesValidates that requested capabilities (like wildcard HTTP hosts) match the runtime security policy.
Sources: crates/palyra-skills/src/audit.rs#12-80, crates/palyra-skills/src/constants.rs#13-17

5. Implementation Diagrams

Skill Installation and Verification Flow

This diagram bridges the palyra-cli command to the palyra-skills logic and the palyrad state.

Skill Execution Capability Resolution

Associates manifest data with the WasmPluginRunner used during tool invocation. Sources: crates/palyra-daemon/src/wasm_plugin_runner.rs#84-110, crates/palyra-skills/src/runtime.rs#21-23

6. InstalledSkillsIndex and Persistence

The daemon maintains an InstalledSkillsIndex on disk to track the state of all skills across restarts.

Index Record Structure

Each SkillInventoryEntry includes:
  • Record: The base skill metadata and trust_decision.
  • Runtime Status: Current state (Active, Quarantined, Error) crates/palyra-cli/src/output/skills.rs#42-55.
  • Eligibility: Whether the skill is compatible with the current hardware/node capabilities.

Periodic Re-audit

The palyrad scheduler triggers periodic re-audits of installed skills. If a skill’s artifact is tampered with on disk, or if a new security policy renders a previously “Safe” skill “Risky,” the skill_status is updated to Quarantined, and an event is logged to the JournalStore crates/palyra-daemon/src/transport/http/handlers/console/skills.rs#164-184. Sources: crates/palyra-daemon/src/transport/http/handlers/console/skills.rs#9-42, crates/palyra-cli/src/output/skills.rs#25-57