
Opc Architecture
- 475 installs
- 3.9k repo stars
- Updated January 26, 2026
- parcadei/continuous-claude-v3
opc-architecture is a Claude Code reference skill that documents Orchestrated Parallel Claude hooks, subprocess agents, and PostgreSQL coordination for developers who extend Claude Code with multi-agent orchestration.
About
opc-architecture is a non-user-invocable skill in parcadei/continuous-claude-v3 explaining OPC (Orchestrated Parallel Claude), which extends Claude Code CLI without replacing it. Claude Code remains the execution engine while OPC adds four coordination layers: hooks intercepting PreToolUse, PostToolUse, and SessionStart events; skills loaded from .claude/skills/; scripts under opc/scripts/; and a PostgreSQL database storing PIDs and agent state across instances. Spawning an agent means a PreToolUse hook fires on Task, then subprocess.Popen runs claude -p as a child process that reads and writes .claude/cache/agents/ while broadcasting completion to PostgreSQL. The skill clarifies OPC is not a separate app and does not intercept API calls—it is hook registration in settings.json plus docker-compose PostgreSQL, Redis, and PgBouncer. Developers reach for opc-architecture when wiring Continuous-Claude-v3, debugging parallel agents, or avoiding duplicate spawn paths that leave Task tool and claude -p implementations running in parallel.
- Enforces the OPC (Observe-Plan-Check) architecture pattern for agentic coding
- Prevents prompt drift and architectural sprawl in multi-hour Claude sessions
- Provides layered context boundaries between observation, planning, and execution
- Includes 4 core OPC principles plus implementation templates
- Hard-gate: run before any new feature implementation or major refactor
Opc Architecture by the numbers
- 475 all-time installs (skills.sh)
- +2 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #774 of 3,282 Productivity & Planning skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill opc-architectureAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 475 |
|---|---|
| repo stars | ★ 3.9k |
| Last updated | January 26, 2026 |
| Repository | parcadei/continuous-claude-v3 ↗ |
How does Orchestrated Parallel Claude spawn agents?
Maintain clean, layered, and evolvable architecture while continuously prompting Claude across long-running projects.
Who is it for?
Developers extending Continuous-Claude-v3 who need the hook, subprocess, and PostgreSQL coordination model before editing agent spawn logic.
Skip if: Developers using stock Claude Code without custom hooks who do not maintain .claude/hooks or opc/ coordination scripts.
When should I use this skill?
The user asks how OPC agents work, where hooks register, or how Task tool spawning relates to PostgreSQL state in Continuous-Claude-v3.
What you get
Architecture diagrams, hook-to-subprocess flow notes, and .claude/ plus opc/ file layout references for multi-agent coordination.
- OPC architecture mental model
- Hook and subprocess coordination reference
By the numbers
- Defines four OPC coordination components: Hooks, Skills, Scripts, and Database
- Documents a ten-step agent coordination flow from hook fire to parent readback
Files
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 3What 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 schemaCoordination 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 -pprocess - Hooks intercept events, they don't create new functionality
- All coordination happens via files and PostgreSQL
- Claude Code is always the execution engine
Related skills
How it compares
Pick opc-architecture over generic multi-agent guides when you need Continuous-Claude-v3-specific hook and PostgreSQL wiring, not abstract agent design patterns.
FAQ
Does OPC replace Claude Code CLI?
opc-architecture states OPC extends Claude Code rather than replacing it. Claude Code CLI remains the execution engine; OPC adds hooks from .claude/hooks/, skills, opc/scripts coordination, and PostgreSQL for state shared across claude -p child processes spawned from the Task too
How does OPC track spawned agents?
opc-architecture describes a PreToolUse hook on Task that subprocess.Popen launches claude -p, stores the child PID in PostgreSQL, writes outputs under .claude/cache/agents/<id>/, and broadcasts completion so the parent reads results from files and the database.