chain-patterns

chain-patterns is a skill for Claude Code from yonatangross/orchestkit. It costs 36 tokens per session (5,151 once invoked), scanned A, original, MIT.

A set of reusable patterns for building multi-step coding-agent workflows that can pause, hand work between agents, and resume later.

In plain words
What is it for?
It helps design pipeline skills with tool checks, handoff files, checkpoints, resumable work, separate worktrees, and scheduled monitoring.
Why use it?
It provides a consistent way to manage long or failure-prone workflows instead of losing progress when a phase stops.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions subagents; names the AskUserQuestion tool.

Part of the ork plugin — 83 skills, 39 commands, 36 agents, 32 hooks shipped together

Good fit It helps design pipeline skills with tool checks, handoff files, checkpoints, resumable work, separate worktrees, and scheduled monitoring.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yonatangross/orchestkit/chain-patterns
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.

Any agent
npx skills add yonatangross/orchestkit --skill chain-patterns
Clone the repo
git clone --depth 1 https://github.com/yonatangross/orchestkit

Made for: Claude Code.

Or install ork, the plugin that ships this one along with the rest of its 83 skills, 39 commands, 36 agents, 32 hooks.

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 chain-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/yonatangross/orchestkit/chain-patterns/github.svg)](https://agentmods.dev/skills/yonatangross/orchestkit/chain-patterns)
Your own site
<a href="https://agentmods.dev/skills/yonatangross/orchestkit/chain-patterns"><img src="https://agentmods.dev/badge/skills/yonatangross/orchestkit/chain-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for chain-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/yonatangross/orchestkit/chain-patterns"><img src="https://agentmods.dev/badge/skills/yonatangross/orchestkit/chain-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,151 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 13
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
How audits are shown
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.1 $0.00036 $0.05151
Opus 5.5 $0.00014 $0.02060
Sonnet 5.5 $0.00007 $0.01030
Haiku 4.5 $0.00004 $0.00515

Measured yesterday against content hash bd7b21cdb50e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

chain-patterns 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 yesterday.

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.

plugins/ork/skills/chain-patterns/SKILL.md · 347 lines

How it starts

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

Chain Patterns

Overview

Foundation patterns for CC 2.1.71 pipeline skills. This skill is loaded via the skills: frontmatter field — it provides patterns that parent skills follow.

Pattern 1: MCP Detection (ToolSearch Probe)

Run BEFORE any MCP tool call. Probes are parallel and instant.

# FIRST thing in any pipeline skill — all in ONE message:
ToolSearch(query="select:mcp__memory__search_nodes")
ToolSearch(query="select:mcp__context7__resolve-library-id")
ToolSearch(query="select:mcp__sequential-thinking__sequentialthinking")

# Store results for all phases:
Write(".claude/chain/capabilities.json", JSON.stringify({
  "memory": true_or_false,
  "context7": true_or_false,
  "sequential": true_or_false,
  "timestamp": "ISO-8601"
}))

Usage in phases:

# BEFORE any mcp__memory__ call:
if capabilities.memory:
    mcp__memory__search_nodes(query="...")
# else: skip gracefully, no error

Load details: Read("references/mcp-detection.md")

Pattern 2: Handoff Files

Write structured JSON after every major phase. Survives context compaction and rate limits.

Write(".claude/chain/NN-phase-name.json", JSON.stringify({
  "phase": "rca",
  "skill": "fix-issue",
  "timestamp": "ISO-8601",
  "status": "completed",
  "outputs": { ... },           # phase-specific results
  "mcps_used": ["memory"],
  "next_phase": 5
}))

Location: .claude/chain/ — numbered files for ordering, descriptive names for clarity.

Load schema: Read("references/handoff-schema.md")

Pattern 3: Checkpoint-Resume

Read state at skill start. If found, skip completed phases.

# FIRST instruction after MCP probe:
Read(".claude/chain/state.json")

# If exists and matches current skill:
#   → Read last handoff file
#   → Skip to current_phase
#   → Tell user: "Resuming from Phase N"

# If not exists:
Write(".claude/chain/state.json", JSON.stringify({
  "skill": "fix-issue",
  "started": "ISO-8601",
  "current_phase": 1,
  "completed_phases": [],
  "capabilities": { ... }
}))

# After each major phase:
# Update state.json with new current_phase and append to completed_phases

Read the full file on GitHub · 347 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. yesterday Changed bd7b21cdb50e
  2. 6d ago Changed 4d56a0231f68
  3. 8d ago Changed · +1 lines 2ebb1ea7f2b9
  4. 27d ago Changed · -3 tokens per session 8ba3f5a2160b
  5. 1mo ago Changed · +2 lines 40e4c5a63a2c
  6. 2mo ago Changed e05939fa757f
  7. 2mo ago Changed badc1a5bc917
  8. 2mo ago Changed c0e325f797a3
  9. 2mo ago Changed ba1fa45cfb83
  10. 2mo ago First seen · 344 lines · 39 tokens per session scan A ede040a6ad34

Subscribe to this mod's changes

chain-patterns is a skill published in the GitHub repository yonatangross/orchestkit (312 stars, last pushed today), licensed MIT. It adds 36 tokens to every session and 5,151 once invoked, about $0.0001 per session on Opus 5.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-09-03.

Related

chain-patterns compared with skills from other repositories

chain-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
chain-patternsyonatangross/orchestkitSkill312todayMITA36Claude Code
Agent Workflow Buildereddiebelaval/squireSkill213mo agoMITA19Claude Code, Codex
implement-outlinehumanlayer/humanlayerSkill13k8d agoApache-2.0A15Claude Code, Codex
web-researchshibing624/agenticaSkill368yesterdayApache-2.0A24Claude Code, Codex
stall-resetSnowflake-Labs/cocoplusSkill72924d agoMITA14Claude Code, Codex
time-steppingHeshamFS/materials-simulation-skillsSkill9515d agoApache-2.0A108Claude Code
ai-multi-agent-systemsj4flmao/agent-skillsSkill4614d agoMITA88Claude Code, Codex