Zum Hauptinhalt springen

Skills Library

A skill is a named, reusable workflow that your state machine can invoke as a single call. Behind the name sits a sequence of operator calls, observer emissions, and contract transitions that together solve one well-defined problem — say, "run the 7-step Wizard against inputs X and write the result envelope to chain", or "encrypt this file with HITE, archive the cold rows to HZC, and emit the provenance row."

Without skills, that sequence is many separate calls and the burden of orchestrating them is on the caller. With skills, the orchestration lives once, in your state machine, and every invocation produces identical chain rows — same operators, same compliance envelope, same proof shape.

Where it fits

LayerWhatThis page
The languageOperators — the verbs
Your computational backendState machine — your runtime
Composable workflowSkillhere
SurfaceHosted APIPOST /api/chain/:slug/skill/<name>

A skill is the highest-level reusable artefact a single state machine exposes. Every skill invocation is one chain row, one ZeqCompliance v1 envelope, one tally-token receipt — even if the skill internally fans out to 12 operator calls.

Skill shape

{
"name": "encrypt-and-archive",
"version": "1.287.5",
"description": "Encrypt a file with HITE, archive cold rows to HZC, emit provenance.",
"inputs": { "file_digest": "<sha256>", "retention_days": 60 },
"steps": [
{ "op": "compute", "operators": ["KO42", "QM5"], "inputs": "$inputs" },
{ "op": "encrypt", "scheme": "phase-locked", "ref": "$step1.digest" },
{ "op": "archive", "scheme": "hzc", "rows": "$state.cold" },
{ "op": "tally", "kind": "provenance" }
],
"envelope": "zeq.compliance.v1"
}

Skills are stored in the user's state machine (one row per skill + version). Calling a skill writes a single audit row whose payload.skill = "<name>@<version>", the inner step trace is recoverable from meta.steps.

Calling a skill

curl -X POST https://zeqapi.com/api/chain/<slug>/skill/encrypt-and-archive \
-H "Authorization: Bearer $ZSM_KEY" \
-H "Content-Type: application/json" \
-d '{ "inputs": { "file_digest": "abc…", "retention_days": 60 } }'

Response carries the entangled state row's zeqond, the rolled-up state hash, the ZeqCompliance v1 envelope, and (if the skill mints them) the tally tokens. The R1 atomic writer guarantees the row commits once; UNIQUE (origin_id, zeqond_number) makes a duplicate impossible.

Composes with

File map

  • apps/zeq-dev/public/apps/skills/ — the live UI
  • shared/api-core/src/routes/chain.tsPOST /api/chain/:slug/skill/<name> handler
  • shared/api-core/src/lib/skills.ts — skill resolver + step engine