composable-pipelines

composable-pipelines is a skill for Claude Code, Codex from MacPaw/ComposablePipelines. It costs 109 tokens per session (1,586 once invoked), scanned A, original, Apache-2.0.

A Swift package for defining AI workflows as pipelines, compiling them into execution graphs, and running them through an executor you provide. A pipeline is a sequence or graph of tasks, such as model calls, loops, and checks.

In plain words
What is it for?
Use it to write or debug Swift pipelines containing models, guardrails, loops, repeated tasks, client tasks, and shared state, then compile and run them.
Why use it?
It helps organize data flow between AI steps and makes the workflow structure observable and encodable.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/macpaw/composablepipelines/composable-pipelines
Any agent
npx skills add MacPaw/ComposablePipelines --skill composable-pipelines
Clone the repo
git clone --depth 1 https://github.com/MacPaw/ComposablePipelines

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for composable-pipelines

README.md
[![agentmods](https://agentmods.dev/badge/skills/macpaw/composablepipelines/composable-pipelines.svg)](https://agentmods.dev/skills/macpaw/composablepipelines/composable-pipelines)
Your own site
<a href="https://agentmods.dev/skills/macpaw/composablepipelines/composable-pipelines"><img src="https://agentmods.dev/badge/skills/macpaw/composablepipelines/composable-pipelines.svg" alt="Measured on agentmods" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,586 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00109 $0.01586
Opus 5 $0.00055 $0.00793
Sonnet 5 $0.00022 $0.00317
Haiku 4.5 $0.00011 $0.00159

Measured 5d ago against content hash 1192937d6fbe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

composable-pipelines scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/composable-pipelines/SKILL.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Composable Pipelines

A runtime-agnostic stack for AI pipelines in Swift: a declarative DSL lowers to a Codable AST, a compiler emits an execution graph, and an observable walker runs it — while an Executor you supply decides what "run a model" means.

Quick start

import ComposablePipelines

struct Summary: Pipeline {
    typealias Output = String
    let document: String

    @State var keyPoints = ""
    @State var summary = ""

    var body: some Pipeline {
        $keyPoints.set {                                    // step 1 → slot
            Model<String>().systemPrompt("Extract the 5 key points.").message(document)
        }
        $summary.set {                                      // step 2 reads step 1
            Model<String>().systemPrompt("Summarize from these points.").input { $keyPoints.get() }
        }
        $summary.get()                                      // pipeline output
    }
}

// Run it (linear flow): compile → walk.
let graph  = PipelineCompiler().compile(pipeline.loweredGraph())
let result = try await PipelineWalker(executor: MyExecutor()).run(graph: graph) { event in print(event) }
let text   = try JSONDecoder().decode(String.self, from: result)   // ExecutionValue == Data (JSON)

Authoring cheatsheet

  • Pipeline: struct X: Pipeline { typealias Output = T; @State var … ; var body: some Pipeline { … } }. The graph is inferred from the @State slots each step reads/writes — never wired by hand.
  • State: @State var s = "" → write with $s.set { <pipeline> } or $s.set(value); read with $s.get(). End body with the output slot's .get().
  • Model (output-only generic): Model<Output>() then chain .systemPrompt(_), .input { $slot.get() } or .message(staticValue), and optionally .tools([…]), .temperature(_), .maxTokens(_), .requirements(ModelSelectionRequirements(traits: […])).
  • Primitives: Guardrail(input, rules:allowed:blocked:), While(condition:) { … }, Group { … }, ForEach(in: xs) { x in … }, Summarize(text: $slot, maxTokens:), ClientTask(input: $slot) { value in … }, From(provider, query: $slot), Self.return(value).
  • Control flow: use native if / switch on produced state (e.g. if verdict == "trivial").

Read the full file on GitHub · 127 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 127 lines · 0 tokens per session scan A 1192937d6fbe

Subscribe to this mod's changes

composable-pipelines is a skill published in the GitHub repository MacPaw/ComposablePipelines (24 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 109 tokens to every session and 1,586 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

copilotkit-upgrade

Use when migrating a CopilotKit v1 application to v2 -- updating package imports, replacing deprecated hooks and components, switching from GraphQL runtime to AG-UI protocol runtime, and resolving breaking API changes.

CopilotKit/CopilotKit · 48 tokens

metrics-instrumentation

Specification for instrumenting an opik-backend workflow with operational OpenTelemetry metrics — per-stage throughput/latency/error counters and native histograms, dimensioned per-customer (workspace). Use when a pipeline (scoring, ingestion, experiments, jobs) needs per-stage visibility. Covers metric emission only…

comet-ml/opik · 93 tokens

review-agents-md

Audit Dograh AGENTS.md files for drift against the live repo and for bad scope boundaries between parent and child docs. Use when the user asks to review existing AGENTS files, identify stale guidance, decide whether a subtree needs its own AGENTS.md, or update the AGENTS.md hierarchy under the repo root, api/, or ui/.

dograh-hq/dograh · 82 tokens

detecting-pv-signals

Computes disproportionality signals — PRR, ROR, EBGM, and IC (BCPNN) — over FAERS / OpenFDA drug-event data to flag potential safety signals. Use when the user wants to mine spontaneous-report data for drug-reaction associations, build a 2x2 contingency table, compute a Proportional Reporting Ratio or Reporting Odds…

maziyarpanahi/openmed · 218 tokens

evaluating-with-leakage-gates

Evaluate an OpenMed de-identification or clinical NER model against the leakage-first release gates G1a through G8, which gate releases on residual PHI leakage rather than on F1. Use when the user wants to run the OpenMed eval harness on a synthetic golden set, decide whether a de-id model is RELEASABLE or…

maziyarpanahi/openmed · 158 tokens

mapping-to-snomed

Maps clinical concept spans extracted by OpenMed to SNOMED CT concepts through a USER-SUPPLIED terminology server (the user's own Ontoserver, Snowstorm, or UMLS/UTS), never a bundled vocabulary. Use when the user wants to code findings, disorders, procedures, body structures, or substances to SNOMED CT, run an ECL…

maziyarpanahi/openmed · 205 tokens