Authors composition SKILL.md files from protocol chains using Lego blocks. Validates graph.json constraints, catalogs gates, analyzes 3-axis dispositions, generates /review pipeline templates.
From epistemic-cooperativenpx claudepluginhub jongwony/epistemic-protocols --plugin epistemic-cooperativeThis skill uses the workspace's default tool permissions.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Build composition SKILL.md files from protocol chains. Validates graph constraints, catalogs gates, proposes dispositions, and generates a pipeline template following the /review structural pattern.
This is an authoring tool, not a runtime executor. The output is a SKILL.md file that the user can install and invoke independently.
SPECIFY → VALIDATE → CATALOG → DISPOSITION → GENERATE
(gated) (gated) (gated)
3 user gates across 5 phases. Phases 1-2 are autonomous (validation and collection).
Accept a protocol chain specification from the user.
Input forms:
/compose clarify → goal → bound → inquire/compose planning (resolve via Epistemic Concern Clusters in CLAUDE.md)Normalization: Accept protocol names (Hermeneia), slash commands (/clarify), skill names (clarify), or short names. Case-insensitive. Arrow separators (→, ->, ,, spaces) all accepted. Resolve to canonical (protocol_name, slash_command) pairs using the Plugins table in CLAUDE.md.
Output path: Ask the user where to write the generated SKILL.md. Default: ~/.claude/skills/{chain-name}/SKILL.md for user-level skills, or suggest a project-level path if appropriate.
Gate #1 (Qc, bounded regret — Phase 1 validates):
Present the interpreted chain with canonical protocol names, slash commands, and proposed output path. Options:
Read .claude/skills/verify/graph.json. Check three constraints:
For each precondition edge (source, target) in graph.json: if both source and target are in the chain, source must appear before target.
On violation: present the precondition edge with its satisfies description and suggest reordering. Return to Phase 0 with the corrected chain.
For each suppression edge (source, target): if both are in the chain, warn. Present the satisfies description explaining why co-activation is problematic.
Options:
For each protocol in the chain: check if any precondition source is missing. The wildcard "source": "*" (Katalepsis) is excluded from this check — it means "structurally last" not "requires all."
On missing precondition: suggest inserting the missing protocol at the correct position.
Design note — chain-position × regret interaction: The A5 concern (unbounded-regret gates positioned late in a chain degrade user judgment quality) is valid but not yet addressed. Phase 3 disposition operates per-gate without chain-position awareness. A future revision will introduce a decision load model that quantifies remaining gate cost (loop depth × regret weight) per disposition choice, replacing the removed position-ratio advisory with a structurally sound, Phase 2-integrated mechanism.
On all validations passing: proceed to Phase 2 with the validated chain.
Read all protocol SKILL.md files in parallel (paths are deterministic after Phase 1 validation). For each protocol:
{protocol}/skills/{skill}/SKILL.mdELIDABLE CHECKPOINTS sectionBuild the gate inventory:
List<{
protocol: String,
phase: Number,
kind: Qc | Qs,
label: String,
condition: always_gated | elidable | conditional,
elidable_when: String?, -- condition text for elidable/conditional gates
regret: bounded | unbounded,
safety_net: String? -- downstream catch gate reference
}>
Present the inventory as an informational summary (no gate — Phase 3 is where the user reviews):
## Gate Inventory
{protocol}: {N} gates ({M} Qs, {K} Qc)
- Phase {X} {Kind} ({label}): {condition}
...
Chain Total: {total} gates
Apply the disposition decision flow to each gate in the inventory.
For each gate G in the composition context:
1. Qs(G)? → PRESENT
2. domain(G) ∈ Dismissed? → PRUNE
3. unbounded_regret(G)? → PRESENT
4. domain(G) ∈ UserSupplies ∪ AIPropose? → PRESENT
5. Qc(G) ∧ bounded_regret(G) ∧ epistemic_access(G)? → ELIDE candidate
6. otherwise → PRESENT (conservative default)
Steps 2 and 4 are conditional — apply only when Horismos is in the chain and BoundaryMap is available. When Horismos is absent, skip steps 2 and 4 (flow reduces to steps 1, 3, 5, 6). Generate BoundaryMap-dependent steps as conditional rules in the template, not fixed dispositions.
Epistemic access in composition context — any of:
system_state(G): answer derivable from codebase/environment (AI can self-resolve)answer(G) ⊆ output(prior): prior protocol in the chain produces output that entails this gate's answer (e.g., ClarifiedIntent from Hermeneia entails Telos Phase 0 seed confirmation)BoundaryMap(domain(G)) = AIAutonomous: user delegated decision authority to AI via Horismos (only when Horismos is in the chain)RESOLVE-OR-PRESENT (for Qs gates in AIAutonomous domains): The Qs gate itself is never elided — instead, the protocol's Phase 1 context collection scope expands for AIAutonomous domains. If Phase 1 resolves the uncertainty (entropy → 0), the Qs gate is never reached. If entropy remains > 0, the Qs gate fires as PRESENT. Encode this as a conditional pipeline context rule when applicable.
For every gate marked ELIDE, verify:
elidable(G) ⟹ ¬elidable(safety_net(G))
If violated: promote the safety net gate to PRESENT. This prevents cascading elision from removing all user checkpoints.
Present per-protocol sub-tables:
### {Protocol} /{command}
| Phase | Gate | Kind | Standalone | Composed | Rationale |
|-------|------|------|-----------|----------|-----------|
| ... | ... | ... | ... | ... | ... |
Summary: {N} gates → {M} user interactions ({K} elided, {J} pruned)
After all protocol tables, present aggregate:
### Chain Summary
Total: {total} gates → {interactions} user interactions
Elided: {elided} | Pruned: {pruned} | Presented: {presented}
Interaction reduction: ~{percent}%
After Chain Summary, present cost visibility sub-section:
Gate density: {total_gates} / {protocol_count} = {density} gates/protocol
Always-gated ratio: {always_gated_count} / {presented_gates}
System 2 load — ASCII timeline per protocol:
{Protocol1} {Protocol2} ... {ProtocolN}
■ Qs ■ Qc ■ Qs
■ Qc · (elided) ■ Qc
Legend: ■ = presented, · = elided, × = pruned
Conditional entropy: Σ log₂(|options_i|) bits over presented gates — quantifies total user decision load.
O_support visibility — each elided gate's justification:
| Elided Gate | Supporting Output | Basis |
|---|
The Basis column connects to the 3-axis elidability model (docs/analysis/protocol-composition-gate-elision.md) — Axis 2 (O_support) is the primary justification source.
Gate #2 (Qc, bounded regret — Phase 4 allows regeneration):
Options:
Generate the composition SKILL.md file following the /review structural pattern.
1. YAML Frontmatter
---
name: {user-defined name}
description: "{chain description — what this composition does}"
skills:
- {protocol1}:{skill1}
- {protocol2}:{skill2}
- ...
---
The skills: field declares sub-protocol dependencies using the {plugin}:{skill} namespace.
2. Title and Purpose
Brief paragraph: what deficit pattern this composition addresses, why these protocols are composed, and what the combined output is.
3. Pipeline Overview
ASCII phase diagram showing the chain with gate annotations:
{Protocol1} → {Protocol2} → ... → {ProtocolN} → Summary
({M} gates) ({K} gates) ({J} gates)
4. Per-Protocol Sections
For each protocol in the chain, a section containing:
**Pipeline context rules** (when /{command} is called from this pipeline):
- **{gate label}**: {ELIDE|PRESENT|PRUNE} — {rationale}
- ...
5. Materialized View
Template for the final output structure. Includes:
6. Error Recovery
Suffix replay rules:
7. Rules
Standard rules section:
Present the generated template for review. Options:
On Accept: write the template using the Write tool. Present the output path and suggest running /verify if the template is placed in a plugin directory.
Predefined chain patterns based on Epistemic Concern Clusters (CLAUDE.md):
| Shortcut | Chain | Rationale |
|---|---|---|
planning | clarify → goal → bound → inquire | Planning cluster + boundary definition |
analysis | frame → ground | Analysis cluster |
decision | gap → attend | Decision + execution |
Shortcuts are convenience aliases — the user can always specify a custom chain. Shortcuts resolve to their chain at Phase 0 and proceed through normal validation.
/skill-creator/catalog or /onboardskills: frontmatter and pipeline context rules — it does not duplicate the protocol's own gate definitions