Skip to main content

skillchain — a skillchain compiler

Compose Claude Code skills into a validated, packaged chain.

A skillchain is an ordered list of steps of two kinds:

  • skill — invoke a named skill (the compiler validates it exists on disk).
  • cor — an Attention-Chain / Chain-of-Reasoning bridge between skills: an explicit reasoning step that routes one skill's output into the next.

The compiler (1) indexes every skill under ~/.claude/skills + ~/.claude/plugins, (2) validates every referenced skill exists (errors listing any missing), (3) wires the CoR bridges, (4) exports a skill package (<out>/<name>/SKILL.md + chain.json) that, when invoked, executes the chain in order.

Install

pip install skillchain-compiler

Import it as skillchain; it installs the skillchain command and depends on nothing outside the standard library. It is one of the fifteen packages of ChainCompiler, where sccc writes its rollups through it; to work on it, clone the repository and run ./install.sh, which installs all fifteen editable.

Use

Write a chain in the .chain format below as my_chain.chain, then:

skillchain list                              # list indexed skills
skillchain validate my_chain.chain
skillchain compile  my_chain.chain --out dist
skillchain compile  my_chain.chain --install   # -> ~/.claude/skills

--install writes the compiled package straight into ~/.claude/skills/<name>/ so it becomes an invokable skill (after a reload). Otherwise it lands in ./dist/<name>/.

Spec formats

Two interchangeable formats; both parse to the same internal spec.

.chain text DSL (ergonomic)

name: my_chain
description: one line
> skill-a : args for skill-a        # '>' = skill step  (skill : args)
= result_a                          # '=' = capture last result as a var
~ Given {result_a}, reason about X, then produce Y.   # '~' = CoR / AttentionChain bridge
> skill-b : use {result_a} and Y

.json (canonical)

{
  "name": "my_chain",
  "description": "one line",
  "steps": [
    {"skill": "skill-a", "args": "args for skill-a", "capture": "result_a"},
    {"cor": "Given {result_a}, reason about X, then produce Y."},
    {"skill": "skill-b", "args": "use {result_a} and Y"}
  ]
}

What "compile" produces

<out>/<name>/SKILL.md — a real skill whose body is the ordered orchestration: each skill step says "invoke skill X with …, capture as …", each CoR step is an explicit reason-then-carry bridge, and the header lists the validated dependencies. Plus chain.json, the canonical spec.

Validation guarantees

compile refuses to emit a package if any referenced skill is missing — so a compiled chain only ever composes skills that actually exist. validate exits non-zero on any problem (missing skill, no name, malformed step), so it can gate CI.

Metadata

Release files for skillchain-compiler 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for skillchain-compiler 0.4.1
File Size Uploaded Provenance Actions
skillchain_compiler-0.4.1.tar.gz 6.5 kB Without provenance Details for skillchain_compiler-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for skillchain-compiler 0.4.1
File Interpreter ABI Platform Actions
skillchain_compiler-0.4.1-py3-none-any.whl Python 3 none any Details for skillchain_compiler-0.4.1-py3-none-any.whl

Total release size: 13.8 kB

Release files / skillchain_compiler-0.4.1.tar.gz

Download URL skillchain_compiler-0.4.1.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6e6c2d3434f4e726041fd738f252fd27fa08a224237f6b6ce7a8ed02e3d4c3b2
BLAKE2b-256 checksum
How to use checksums
14ea7a984ba3662ffe5589dc57cffd72c1d896a2188bb5cf06e01905128bcc75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.13

Release files / skillchain_compiler-0.4.1-py3-none-any.whl

Download URL skillchain_compiler-0.4.1-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fcbe8aeb01e02af9312ba89f371381b308d5bfd21d60f12be2fac4e93d54b4f0
BLAKE2b-256 checksum
How to use checksums
521f7ad513da368a8796a23698a38f32873b6fbc76dcc4183c1251736861eadd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.13

Security for skillchain-compiler 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page