Channels Queues and Workflows
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, then copy.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install paperclip-channels-queues-and-workflowsWhat this does: Design and run Paperclip channel queues, inboxes, and multi-agent workflows with leases, assign, handoff, CAS labels, DAG deps, and human gates.
Manual setup by platform
Claude Code
~/.claude/skills/paperclip-channels-queues-and-workflows/SKILL.md
Instructions
Channels, Queues, and Workflows
Use Paperclip's channel, queue, lease, handoff, label, and dependency primitives to coordinate multi-agent work without heavy setup or custom glue.
Core Mental Model
Four primitives cover every queue and workflow pattern:
- Channel = lightweight folder / room of Issues.
- Created lazily on first write (
pc post,pc tasks create). Supports nested slash paths (seo/briefs,factory/build); trailing/queries the whole subtree (seo/). - Separate from Projects: a Project binds execution infrastructure (Git repos, sandboxes, secrets); a Channel is just a stream/queue. They compose cleanly (
--projectis optional per task or channel default). - Administer channel queue policy, archive state, private membership, or managed-pool auto-drain anytime with
pc channels update <path>(aliasconfig) andpc channels members list|add|remove <path>.
- Created lazily on first write (
- Post vs. Task = the same
Issueobject.pc post <channel> "<text>"creates an unassignedstatus=backlogissue (scope=channel). Defaultclaim --readyignores it.pc tasks create <channel> "<text>"creates an unassignedstatus=todoissue (scope=channel). Workers can claim it immediately.pc tasks create <existing-id>(orpc tasks assign <id> @agent) promotes abacklogpost totodoin place, keeping its ID (PAP-142) and full thread history.
- Queue = pullable slice of ready issues (Pull vs. Push).
- No separate Queue resource is required. Any channel with ready issues is a queue.
- Pull (
pc tasks claim --ready <channel>): Pops the next matching task atomically (FOR UPDATE SKIP LOCKED), setsstatus=in_progress, and grants a 5-minute TTL lease + fencedclaimToken.- Safe default:
status=todo+unassigned. - Opt-in filters: Pass
--status backlog(e.g., triage bot draining raw inbox posts) or--status in_review(review pool — automatically excludes tasks waiting on pending human interaction cards). Pass--mine(--assignee me) to claim tasks pushed to you, or--assignee anyfor unassigned + yours (never steals another agent's assigned task).
- Safe default:
- Push (
pc tasks assign <id> @agent): Assigns an existing post/task to a registered Paperclip agent (auto-promotingbacklog→todounless--keep-status) and wakes it via Paperclip's managed Runner. Use--unassignto return a task to the unassigned pool, or--forceto fence an active worker lease. - Managed Pool Auto-Drain: Bind a managed agent directly to a channel (
pc channels update factory/build --managed-pool @coder --max-concurrency 4) so Paperclip's control plane automatically assigns and wakes up toNconcurrent tasks without an external bash loop.
- Key-Value Labels (
kv_labels) = routing and lock-free state.- Slice any queue with
--label key=value(--label role=reviewer,--label stage=draft). - Guard state transitions with atomic Compare-And-Swap (
--if/--if-unset):pc label PAP-50 stage=draft --if stage=newreturns409 label_conflictif another agent already transitioned it.
- Slice any queue with
Queue & Inbox Patterns
1. Direct Work Queue (Drop & Drain)
Use when every dropped item is immediately actionable by a pool of fungible workers.
# Producers drop work in (human, cron, webhook, or lead agent)
pc tasks create triage/bugs "Fix 500 on /api/checkout" --priority high --label role=fixer
# Pool of workers drains in parallel (auto-renews lease, releases on Ctrl-C)
pc tasks run --ready triage/bugs --label role=fixer --wait 10m --as worker-1 \
-- claude -p 'Read $PAPERCLIP_TASK_ID with pc read, fix it, verify, and reply.'
2. Two-Step Inbox (Passive Drop → Triage → Promote or Assign)
Use when raw signals are noisy (alerts, external requests, ideas) and should not burn worker tokens until triaged.
# 1. Drop raw signal as passive backlog post (zero worker wakeups)
pc post errors/web "500 spike on /api/checkout (14 occurrences in 5m)"
# 2. Optional: a lightweight triage bot pops raw backlog posts with --status backlog
pc tasks claim --ready errors/web --status backlog --as triage-bot
# 3. Promote to a worker pool OR push-assign directly to a managed agent:
pc tasks create PAP-142 --priority high --label role=fixer
# ...or push to a named Paperclip agent (auto-promotes backlog -> todo and wakes @backend-eng):
pc tasks assign PAP-142 @backend-eng --comment "Confirmed nil stripeCustomerId"
Multi-Agent Workflow Patterns
Choose one of three patterns (or combine them) based on the shape of the work:
Pattern A: Single-Thread Relay (Atomic handoff Across Stages or Channels)
Use when: One unit of work (a support ticket, PR, or article) moves sequentially through specialists and every specialist needs the entire conversation history in one thread.
Use pc tasks handoff (alias move) to atomically move channels, update labels (with optional --if CAS), change status/assignee, and release the active lease in one transaction:
# Writer finishes draft and atomically hands off PAP-50 to #seo/review with CAS guard
pc tasks handoff PAP-50 --channel seo/review \
--label stage=review --if stage=draft \
--comment "Draft ready for fact-check" --as writer-1
You can also keep the issue in a single channel and omit --channel, or push-assign the next stage directly (--assignee @qa-reviewer).
Pattern B: Assembly Line (Chained Channels with 1-to-Many Fan-Out)
Use when: Stages produce distinct artifacts, have 1-to-many fan-out (1 audit → 5 fix tasks, 1 topic → 3 briefs), or need separate queue policies/permissions per stage.
- Give each stage its own channel:
#seo/topics→#seo/briefs→#seo/drafts→#seo/publish. - A worker pops from Stage $N$, produces its artifact, creates one or more
todotasks in Stage $N+1$ (linking back to the source ID), and marks its Stage $N$ taskdone. pc channels --prefix seo/surfaces queue depth and bottlenecks at every stage.
Pattern C: DAG Fan-Out / Fan-In (plan.json + Mid-Flight --needs)
Use when: The dependency graph is known up front (feature launches, multi-repo refactors) OR a worker discovers a new prerequisite mid-flight.
- Up-front DAG:
pc tasks create <channel> --file plan.json --idempotency-key <key>. Tasks with"needs": ["keyA", "keyB"]sit inWaitinguntil every dependency reachesdone, then flipReadyautomatically. - Mid-flight prerequisite: If a worker claims
PAP-142and discovers it needsPAP-150done first, park it without losing auto-wakeup:pc tasks block PAP-142 --needs PAP-150 "Waiting on schema migration" --as worker-1 # Releases lease and parks PAP-142 in todo (Waiting). Auto-becomes Ready when PAP-150 completes! - Inspect or edit dependencies anytime with
pc tasks deps list|add|remove <id>.
Lifecycle & Workflow Glue
- Non-Blocking Human Gates (
pc ask/pc confirm): Posts a typed interactive card, moves the task toin_review, and releases the worker's lease. When the human answers or clicks Approve (--human), Paperclip automatically flips the task back totodo(Ready) for the pool. - Cancel & Reopen: Cancel duplicate/obsolete tasks with
pc tasks cancel <id> "Duplicate of PAP-110"(use--forceto fence another worker's lease), and reopendone/cancelled/blockedtasks withpc tasks reopen <id>. - Typed Stage Contracts (
--schema&--result-schema): Attach--schema finding@1on posts/replies for validated JSON alongside Markdown prose, or--result-schema content-brief@1on tasks sopc tasks complete <id> --data '{...}'enforces the JSON contract beforedone.
Decision Cheat Sheet
| Goal | Primitive / Command | Example |
|---|---|---|
| Group a stream or create a distinct stage queue | Channel | #seo/drafts, #factory/build |
| Log/discuss before deciding whether to run agents | Passive Post (pc post) | #errors/web → promote or --status backlog |
| Pull next ready task from a pool (or your own assigned) | pc tasks claim | pc tasks claim --ready build/ --mine |
| Push an existing post/task to a managed Paperclip agent | pc tasks assign | pc tasks assign PAP-142 @backend-eng |
| Atomically move channel + update labels + drop lease | pc tasks handoff (move) | pc tasks handoff PAP-50 --channel seo/review --label stage=review |
| Park a task waiting on a newly discovered blocker | pc tasks block --needs | pc tasks block PAP-142 --needs PAP-150 |
| Cancel or reopen a task | pc tasks cancel / reopen | pc tasks cancel PAP-9 "Duplicate" |
| Auto-drain a channel with a managed Paperclip agent | pc channels update | pc channels update build --managed-pool @coder --max-concurrency 4 |
Manage --private channel access | pc channels members | pc channels members add sec/private @sec-bot |
| Pause for human decision without blocking a worker | pc ask / pc confirm | Drops lease → human resolves → auto-requeues |
| Bind a Git repo, sandbox, and secrets | Project (--project) | #factory/build + --project web-app |
Additional Resources
- For complete end-to-end recipes (Software Factory, Customer Service Review, SEO/AEO Content Engine, and Feature Launch Campaign), see examples.md.
Stateful context
Security
Reviews (0)
Related skills
Browse all →More from paperclip
View source →More Build skills
Browse category →Frequently asked questions about channels-queues-and-workflows
What does the channels-queues-and-workflows skill do?
Design and run Paperclip channel queues, inboxes, and multi-agent workflows with leases, assign, handoff, CAS labels, DAG deps, and human gates. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the channels-queues-and-workflows skill?
Run `npx @skills-hub-ai/cli install paperclip-channels-queues-and-workflows` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/paperclip-channels-queues-and-workflows/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does channels-queues-and-workflows work with?
channels-queues-and-workflows runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the channels-queues-and-workflows skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use channels-queues-and-workflows after installing it?
In Claude Code, type `/paperclip-channels-queues-and-workflows` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the channels-queues-and-workflows skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.
Badge for your README
Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.
[](https://skills-hub.ai/skills/paperclip-channels-queues-and-workflows)<a href="https://skills-hub.ai/skills/paperclip-channels-queues-and-workflows"><img src="https://skills-hub.ai/api/badges/skill/paperclip-channels-queues-and-workflows" alt="Install on Skills Hub"></a>More options in the badge docs.