Skip to main content
skill CX Codex

opc-architecture — Claude Code skill: what it does, how to install

opc-architecture provides Claude Code with an architectural overview of Orchestrated Parallel Claude, detailing hooks, child processes, and PostgreSQL state sharing.

MIT ★ 3,951 updated 2026-01-26

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add parcadei/Continuous-Claude-v3 --skill opc-architecture -a claude-code
Open on GitHub

What opc-architecture does

This skill injects the internal architecture of Orchestrated Parallel Claude (OPC) into Claude Code. OPC does not replace the CLI; it uses Claude Code as the execution engine. Orchestration relies on TypeScript hooks in .claude/hooks/, coordinating Python scripts, and a shared database backend.

Agent execution is straightforward. When the main terminal instance triggers the Task tool, a PreToolUse hook executes subprocess.Popen(["claude", "-p", "prompt"]). Each child agent runs as an isolated process, writing output to .claude/cache/agents/<id>/ and reporting completion back to PostgreSQL.

The frontmatter specifies user-invocable: false, meaning it acts as background context rather than a user-triggered command. Orchestration expects the underlying Docker Compose environment with PostgreSQL, Redis, and PgBouncer to be running.

What it helps with

  • guide Claude Code on how OPC parallel agents spawn and coordinate
  • track child agent state and PIDs through PostgreSQL
  • inspect directory layouts across .claude/ and opc/
  • debug event interception between hooks and Python scripts

Example prompts for the agent

  • Explain how OPC spawns child Claude Code instances using subprocess.Popen
  • Where does a child agent write its cached output files in OPC?
  • Review the database coordination flow between parent and subagents

How to install opc-architecture

1Skills CLI (Vercel)

npx skills add parcadei/Continuous-Claude-v3 --skill opc-architecture -a claude-code

2Manually: put the files in place

~/.claude/skills/opc-architecture/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/opc-architecture/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about opc-architecture

How do I install opc-architecture in Claude Code?

Run npx skills add parcadei/Continuous-Claude-v3 --skill opc-architecture -a claude-code or place the file directly at ~/.claude/skills/opc-architecture/SKILL.md.

What does opc-architecture do?

It teaches Claude Code the operational model of Orchestrated Parallel Claude, including hook events, subprocess management, and storage backends.

Can I trigger this skill using a slash command?

No. The skill sets user-invocable: false, so Claude Code loads it automatically when working with OPC orchestration patterns.

Source text

SKILL.md · MIT
---
name: opc-architecture
description: OPC Architecture Understanding
user-invocable: false
---

# OPC Architecture Understanding

OPC (Orchestrated Parallel Claude) extends Claude Code - it does NOT replace it.

## Core Concept

Claude Code CLI is the execution engine. OPC adds orchestration via:
- **Hooks** - Intercept Claude Code events (PreToolUse, PostToolUse, SessionStart, etc.)
- **Skills** - Load prompts into Claude Code
- **Scripts** - Called by hooks/skills for coordination
- **Database** - Store state between Claude Code instances

## How Agents Work

When you spawn an agent:
1. Main Claude Code instance (your terminal) runs hook on Task tool
2. Hook calls `subprocess.Popen(["claude", "-p", "prompt"])`
3. A NEW Claude Code instance spawns as child process
4. Child runs independently, reads/writes to coordination DB
5. Parent tracks child via PID in DB

```
$ claude                         ← Main Claude Code (your terminal)
    ↓ Task tool triggers hook
    ↓ subprocess.Popen(["claude", "-p", "..."])
        ├── claude -p "research..."   ← Child agent 1
        ├── claude -p "implement..."  ← Child agent 2
        └── claude -p "test..."       ← Child agent 3
```

## What OPC Is NOT

- OPC is NOT a separate application
- OPC does NOT run without Claude Code
- OPC does NOT intercept Claude API calls directly
- OPC does NOT modify Claude Code's internal behavior

## What OPC IS

- OPC IS hooks that Claude Code loads from `.claude/hooks/`
- OPC IS skills that Claude Code loads from `.claude/skills/`
- OPC IS scripts that hooks/skills call for coordination
- OPC IS a database backend for state across Claude Code instances

## Key Files

```
.claude/
├── hooks/           ← TypeScript hooks that Claude Code runs
├── skills/          ← SKILL.md prompts that Claude Code loads
├── settings.json    ← Hook registration, Claude Code reads this
└── cache/           ← State files, agent outputs

opc/
├── scripts/         ← Python scripts called by hooks
├── docker-compose.yml ← PostgreSQL, Redis, PgBouncer
└── init-db.sql      ← Database schema
```

## Coordination Flow

1. User runs `claude` in terminal
2. Claude Code loads hooks from `.claude/settings.json`
3. User says "spawn a research agent"
4. Claude uses Task tool
5. PreToolUse hook fires, checks resources
6. Hook spawns `claude -p "research..."` as subprocess
7. Hook stores PID in PostgreSQL
8. Child agent runs, writes output to `.claude/cache/agents/<id>/`
9. Child completes, broadcasts "done" to PostgreSQL
10. Parent checks DB, reads child's output file

## Remember

- Every "agent" is just another `claude -p` process
- Hooks intercept events, they don't create new functionality
- All coordination happens via files and PostgreSQL
- Claude Code is always the execution engine

© parcadei · MIT · parcadei/Continuous-Claude-v3

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set161

The whole set →
channel-capacity A skill for solving information-theory problems: calculating channel capacity, mutual information, and applying the Blahut-Arimoto algorithm. Use it when working with information theory, coding, or communication channels. CX Codex +1 ★ 3,951repo stars rudin-real-complex-analysis rudin-real-complex-analysis is a Claude Code skill for solving problems and checking proofs with Walter Rudin's Real and Complex Analysis textbook, a theorem tree, and Python scripts. CX Codex +1 ★ 3,951repo stars agent-context-isolation agent-context-isolation is a Claude Code skill for routing background-agent results through files. It keeps full agent transcripts out of the main conversation context. CX Codex +1 ★ 3,951repo stars fields A skill for working with fields in abstract algebra. It verifies field axioms, computes minimal polynomials, and solves algebraic equations using Bash and Read tools. CX Codex +1 ★ 3,951repo stars modular-code The modular-code skill guides Python file splits around meaningful boundaries. Use it when a file mixes concerns or has become awkward to navigate and test. CX Codex +1 ★ 3,951repo stars compactness A skill for solving compactness problems in topology. Checks whether spaces are compact, applies the Heine-Borel and Tychonoff theorems, and computes consequences of compactness. CX Codex +1 ★ 3,951repo stars source-coding source-coding — a skill for information theory problems: optimal coding, Shannon entropy, Huffman codes, and data compression. Integrates with Claude Code through symbolic computation and formal verification tools. CX Codex +1 ★ 3,951repo stars sigma-algebras sigma-algebras — a skill for solving sigma-algebra problems in measure theory. CX Codex +1 ★ 3,951repo stars

Project sponsors

Companies that keep this analytics open