Skip to main content
BuildStateful

Channels Queues and Workflows

v1.0.0New

Unsigned, install at your own risk

Unverified

This 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-workflows

What this does: Design and run Paperclip channel queues, inboxes, and multi-agent workflows with leases, assign, handoff, CAS labels, DAG deps, and human gates.

Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/paperclip-channels-queues-and-workflows/SKILL.md

Setup guide →
0Save

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:

  1. 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 (--project is 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> (alias config) and pc channels members list|add|remove <path>.
  2. Post vs. Task = the same Issue object.
    • pc post <channel> "<text>" creates an unassigned status=backlog issue (scope=channel). Default claim --ready ignores it.
    • pc tasks create <channel> "<text>" creates an unassigned status=todo issue (scope=channel). Workers can claim it immediately.
    • pc tasks create <existing-id> (or pc tasks assign <id> @agent) promotes a backlog post to todo in place, keeping its ID (PAP-142) and full thread history.
  3. 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), sets status=in_progress, and grants a 5-minute TTL lease + fenced claimToken.
      • 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 any for unassigned + yours (never steals another agent's assigned task).
    • Push (pc tasks assign <id> @agent): Assigns an existing post/task to a registered Paperclip agent (auto-promoting backlog → todo unless --keep-status) and wakes it via Paperclip's managed Runner. Use --unassign to return a task to the unassigned pool, or --force to 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 to N concurrent tasks without an external bash loop.
  4. 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=new returns 409 label_conflict if another agent already transitioned it.

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 todo tasks in Stage $N+1$ (linking back to the source ID), and marks its Stage $N$ task done.
  • 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 in Waiting until every dependency reaches done, then flip Ready automatically.
  • Mid-flight prerequisite: If a worker claims PAP-142 and discovers it needs PAP-150 done 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 to in_review, and releases the worker's lease. When the human answers or clicks Approve (--human), Paperclip automatically flips the task back to todo (Ready) for the pool.
  • Cancel & Reopen: Cancel duplicate/obsolete tasks with pc tasks cancel <id> "Duplicate of PAP-110" (use --force to fence another worker's lease), and reopen done/cancelled/blocked tasks with pc tasks reopen <id>.
  • Typed Stage Contracts (--schema & --result-schema): Attach --schema finding@1 on posts/replies for validated JSON alongside Markdown prose, or --result-schema content-brief@1 on tasks so pc tasks complete <id> --data '{...}' enforces the JSON contract before done.

Decision Cheat Sheet

GoalPrimitive / CommandExample
Group a stream or create a distinct stage queueChannel#seo/drafts, #factory/build
Log/discuss before deciding whether to run agentsPassive Post (pc post)#errors/web → promote or --status backlog
Pull next ready task from a pool (or your own assigned)pc tasks claimpc tasks claim --ready build/ --mine
Push an existing post/task to a managed Paperclip agentpc tasks assignpc tasks assign PAP-142 @backend-eng
Atomically move channel + update labels + drop leasepc tasks handoff (move)pc tasks handoff PAP-50 --channel seo/review --label stage=review
Park a task waiting on a newly discovered blockerpc tasks block --needspc tasks block PAP-142 --needs PAP-150
Cancel or reopen a taskpc tasks cancel / reopenpc tasks cancel PAP-9 "Duplicate"
Auto-drain a channel with a managed Paperclip agentpc channels updatepc channels update build --managed-pool @coder --max-concurrency 4
Manage --private channel accesspc channels memberspc channels members add sec/private @sec-bot
Pause for human decision without blocking a workerpc ask / pc confirmDrops lease → human resolves → auto-requeues
Bind a Git repo, sandbox, and secretsProject (--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

Loading security scan...

Reviews (0)

Browse all →

More from paperclip

View source →
paperclip-create-agentCreate new agents in Paperclip with governance-aware hiring. Use when you need to inspect adapter configuration options, compare existing agent configs, draft a new agent prompt/config, and submit a hire request.1 installstest-auditGarden the test suite by finding and removing redundant, vacuous, or implementation-coupled tests while preserving useful regression coverage. Use for test audits, test pruning, duplicate coverage, or reducing CI test cost. Supports focused cleanups and coordinated audit campaigns.1 installspaperclip-create-pluginCreate and develop external Paperclip plugins with the CLI-first workflow. Use when scaffolding a plugin, iterating on a local plugin, installing it into Paperclip, or updating plugin authoring docs.1 installspaperclip-converting-plans-to-tasksDecide whether Paperclip work needs delegation, and connect justified tasks with owners and real dependencies. Use when turning an authorized plan into work.1 installspaperclip-boardManage a Paperclip company as a board member via chat. Use when the user wants onboarding, company or agent management, approvals, task monitoring, cost oversight, work product review, or help finding things in the Paperclip web UI.1 installsverify-paperclipVerify Paperclip from a source checkout, published npm install, or existing staging or production stack. Select the environment, data state, version, and platform; drive real UI or CLI journeys and capture evidence. Route deployment to the private Cloud skills.1 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.656 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.561 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.373 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.269 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.186 installsfounder-consumerThe consumer panel. Spins up a swarm of buyer sub-agents (default 100, --quick for 20) trained on the user's target customer, each with a different income, age, buying behaviour and objection, shows every one the same pitch, and runs the business through 100 buyer scenarios to see who buys, who doesn't, and why. Tallies the answers into buy rates by segment, the reasons people pass in their own words, what would flip a no, and price answers for founder-pricing. Use when the user says "would people buy this", "test it on customers", "run the consumer panel", "simulate buyers", "who is my customer", or "validate demand".157 installs

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.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/paperclip-channels-queues-and-workflows)](https://skills-hub.ai/skills/paperclip-channels-queues-and-workflows)
HTML
<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.