Skip to main content
This page describes the structure, validation, and state transitions of Palyra Skills. Skills are the primary extensibility mechanism in Palyra, packaged as signed artifacts containing WebAssembly modules, static assets, and a declarative manifest.

Skill Manifest (skill.toml)

The skill.toml file is the central authority for a skill’s identity, capabilities, and security requirements. It is parsed using parse_manifest_toml crates/palyra-skills/src/manifest.rs#12-17.

Manifest Structure

A skill manifest is divided into several key sections:
SectionPurpose
MetadataDefines skill_id, version, publisher, and name.
EntrypointsLists available tools that the agent can invoke.
CapabilitiesDeclares required access to the filesystem, network, and secrets.
QuotasSets execution limits (CPU fuel, memory, wall-clock time).
CompatDefines minimum protocol and runtime version requirements.

Capability Declarations

Skills operate in a zero-trust environment and must explicitly request every capability they intend to use:

Tool Entrypoints

Each tool in the [[entrypoints.tools]] array defines its interface via JSON Schema crates/palyra-skills/examples/echo-http/skill.toml#8-22. Sources: crates/palyra-skills/src/manifest.rs#12-147, crates/palyra-skills/examples/echo-http/skill.toml#1-45, crates/palyra-skills/src/models.rs#1-100

Skill Artifact Lifecycle

The lifecycle of a skill involves packaging, verification, auditing, and eventual execution or quarantine.

1. Packaging and Signing

Skills are bundled into a .palyra-skill ZIP archive using build_signed_skill_artifact crates/palyra-skills/src/artifact.rs#11-11.

2. Verification and Trust (SkillTrustStore)

Upon installation or check, the system invokes verify_skill_artifact crates/palyra-skills/src/verify.rs#24-24.
  • SkillTrustStore: Manages trusted publisher keys. It supports “Trust On First Use” (TOFU) if enabled crates/palyra-cli/src/commands/skills.rs#117-127.
  • Integrity Check: The system verifies the Ed25519 signature against the publisher’s public key.

3. Security Audit

The audit_skill_artifact_security function performs static analysis on the Wasm modules crates/palyra-skills/src/audit.rs#12-12.

4. Runtime States

A skill’s status is tracked in the skill_status table crates/palyra-cli/tests/skills_lifecycle.rs#130-140.

Data Flow: Manifest to Runtime Policy

The following diagram bridges the “Natural Language” manifest declarations to the “Code Entities” that enforce them. Title: Skill Capability and Policy Resolution Sources: crates/palyra-skills/src/manifest.rs#12-17, crates/palyra-skills/src/runtime.rs#21-23, crates/palyra-skills/src/models.rs#1-100, crates/palyra-skills/examples/echo-http/skill.toml#1-45

Lifecycle State Machine

The following diagram illustrates the transitions an artifact undergoes from a local build to an active system skill. Title: Skill Lifecycle Transitions Sources: crates/palyra-skills/src/verify.rs#24-24, crates/palyra-skills/src/audit.rs#12-12, crates/palyra-cli/src/commands/skills.rs#106-140, crates/palyra-cli/src/args/skills.rs#138-181

Implementation Details

Trust Management

The SkillTrustStore persists publisher identities and their associated public keys.

Compatibility Checks

Before a skill is loaded, assert_runtime_compatibility ensures the daemon can support the skill’s requirements crates/palyra-skills/src/manifest.rs#149-168.

Skill Inventory

The SkillInventoryEntry struct provides a unified view of a skill’s metadata, installation state, and runtime eligibility crates/palyra-cli/src/output/skills.rs#42-55. This is used by the CLI and Dashboard to display the current state of the plugin system. Sources: crates/palyra-skills/src/manifest.rs#149-168, crates/palyra-cli/src/commands/skills.rs#106-140, crates/palyra-cli/src/output/skills.rs#25-57, crates/palyra-skills/src/lib.rs#1-33