# Harness Capsules Skill

> Procedure for fail-closed portable execution capsules, schema verification, and memory-graph instrumentation.

- Skill: `kevin-liu-01/harness-capsules-skill` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add kevin-liu-01/harness-capsules-skill`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kevin-liu-01/harness-capsules-skill/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: kevin-liu-01 (https://skillmd.com/u/kevin-liu-01)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kevin-liu-01/harness-capsules-skill

---


# cotcodec / harness/capsules

## Purpose
<!-- agent-docs:fill:purpose -->

Capsules package declared orchestration inputs, memory graphs, receipts, and
verification metadata so an execution can be checked outside its source runtime.

## Mental model & key files
<!-- agent-docs:fill:model -->

- `schema.py` defines the wire contract.
- `runtime.py` executes admitted capsule operations.
- `verification.py` validates hashes, signatures, and declared capabilities.
- `memory_graph.py` handles capsule-local memory topology.

## Patterns to follow / invariants
<!-- agent-docs:fill:patterns -->

- Fail closed on unknown fields, algorithms, identities, capabilities, or hashes.
- Bind every decision to canonical serialized bytes and explicit versioning.
- Treat capsules as instrumentation after a real agent loop exists, not as a
  universal orchestration protocol or a scientific result by themselves.

## Common tasks → first action
<!-- agent-docs:fill:tasks -->

- Schema change: add a new version plus conformance/tamper vectors.
- Runtime change: update capability declarations and negative verification tests.
- Evidence export: run capsule conformance before referencing the artifact.

## Gotchas
<!-- agent-docs:fill:gotchas -->

- Never accept a trust key shipped inside the artifact it authenticates.
- Hash-valid structure does not establish semantic correctness or model quality.

