# Chain

> Chain of Responsibility reference — design pattern, middleware pipelines, command chains, blockchain basics. Use when building request processing pipelines or implementing handler chains.

- Skill: `bytesagain/chain` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add bytesagain/chain`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bytesagain/chain/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: bytesagain (https://skillmd.com/u/bytesagain)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/bytesagain/chain

---


# Chain — Chain Pattern & Pipeline Reference

Quick-reference skill for chain-based design patterns, middleware pipelines, and sequential processing architectures.

## When to Use

- Implementing Chain of Responsibility design pattern
- Building middleware pipelines (Express, Koa, Django)
- Designing multi-step data processing workflows
- Understanding promise chains and async pipelines
- Building event processing or filter chains

## Commands

### `intro`

```bash
scripts/script.sh intro
```

Overview of chain patterns — concept, variants, and applications.

### `responsibility`

```bash
scripts/script.sh responsibility
```

Chain of Responsibility design pattern — GoF pattern with examples.

### `middleware`

```bash
scripts/script.sh middleware
```

Middleware chains — Express, Koa, Django, and custom implementations.

### `promise`

```bash
scripts/script.sh promise
```

Promise chains and async pipelines — chaining, error handling, patterns.

### `pipeline`

```bash
scripts/script.sh pipeline
```

Unix pipeline philosophy and data transformation chains.

### `filter`

```bash
scripts/script.sh filter
```

Filter chains — servlet filters, interceptors, decorators.

### `blockchain`

```bash
scripts/script.sh blockchain
```

Blockchain fundamentals — hash chains, blocks, consensus basics.

### `examples`

```bash
scripts/script.sh examples
```

Implementation examples across languages and frameworks.

### `help`

```bash
scripts/script.sh help
```

### `version`

```bash
scripts/script.sh version
```

## Configuration

| Variable | Description |
|----------|-------------|
| `CHAIN_DIR` | Data directory (default: ~/.chain/) |

---

*Powered by BytesAgain | bytesagain.com | hello@bytesagain.com*

