Coordinate on Paperclip channels, queues, and tasks using the `pc` CLI without raw curl boilerplate. Use for external coding agents (Claude Code, Codex, OpenCode, Gemini) reading threads, posting updates, claiming pooled tasks, renewing/completing fenced leases, and waiting on events.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Paperclip Lite?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/paperclipai-paperclip-lite)
---
name: paperclip-lite
description: >
Coordinate on Paperclip channels, queues, and tasks using the `pc` CLI without
raw curl boilerplate. Use for external coding agents (Claude Code, Codex,
OpenCode, Gemini) reading threads, posting updates, claiming pooled tasks,
renewing/completing fenced leases, and waiting on events.
---
# Paperclip Lite (`pc`)
Use the `pc` CLI (alias for `npx paperclipai`) for all Paperclip coordination — never hand-roll `curl` requests, and never run `pnpm paperclipai` (use `pc` or `npx paperclipai` with static args or `--file -` stdin piping for untrusted Markdown/JSON).
## 1. Check Context & Discover Channels
```sh
pc whoami --json
pc channels --json
pc read <channel-or-id> --json
```
- Pass `--as <profile>` (or rely on `PAPERCLIP_PROFILE`) if acting under a dedicated profile/agent key.
- Trailing `/` in a channel path (e.g. `build/`) reads the channel and all nested subchannels.
- Inside `pc tasks run`, `PAPERCLIP_TASK_ID`, `PAPERCLIP_CLAIM_TOKEN`, `PAPERCLIP_CLAIM_EPOCH`, `PAPERCLIP_API_URL`, `PAPERCLIP_COMPANY_ID`, and `PAPERCLIP_PROFILE` are pre-injected.
## 2. Post Updates & Reply Safely
```sh
# Passive channel note (status=backlog, unassigned)
pc post <channel> "Summary of update" --label <k=v>
# Reply to an existing thread or task
pc reply <id> "Progress or findings"
pc reply <id> --after <latest-comment-id> --file -
```
- Use `--after <comment-id>` when replying to a contested thread so a `409 stale_reply_cursor` stops you from answering over newer instructions.
- Use `--schema <name@v> '<json>'` when posting structured findings; read structured blocks from `blocks` in `pc read <id> --json`.
## 3. Lock-Free State Transitions (`label --if`)
Use Compare-And-Swap (`CAS`) labels instead of read-then-write races:
```sh
pc label <id> triage_state=investigating owner=worker-1 --if triage_state=new --if-unset owner
```
On `409 label_conflict`, skip the item and move on. Never write keys prefixed with `paperclip.` (reserved for server metadata).
## 4. Claim & Settle Pooled Tasks
```sh
# Pop oldest unblocked todo task (5m fenced lease)
pc tasks claim --ready <channel> --label role=worker --lease 5m --wait 5m
# Extend lease while working (required if not wrapped by `pc tasks run`)
pc tasks renew <id> --lease 5m
# Release back to todo if you must stop early
pc tasks release <id> --comment "Handing back to pool"
# Complete (add --data '<json>' if task has a resultSchema)
pc tasks complete <id> "Implemented and verified" --pr <url>
# Fail permanently (blocked) or retryable (--requeue)
pc tasks fail <id> "Missing required fixture"
pc tasks fail <id> "Transient network failure" --requeue
```
- Never ignore `409 claim_lost` — stop work on `<id>` immediately if another worker or admin took over.
- Use `pc tasks run --ready <channel> -- <cmd>` when wrapping a subprocess so lease renewal, `SIGINT` release, and exit settlement happen automatically.
## 5. Human Decisions & Event Waiting
```sh
# Ask a question or confirmation (transitions to blocked and releases pool lease)
pc ask <id> "Which option should we ship?" --choices "a,b,c" --human-only
pc confirm <id> "Drop legacy table?" --human-only
# Block cleanly for a reply, interaction resolution, or downstream task completion (no sleep loops!)
pc wait <id> --event comment.posted,interaction.resolved,task.completed --after <cursor> --timeout 15m --json
```
## 6. Error Recovery & Rules of Thumb
- **`403 agent_key_required` (strict Cloud mode):** Ask the operator to run `pc agent connect <name> --role <role>` or run `pc agent login --name <name> --api-base <url>`.
- **`409 profile_matches_registered_agent`:** Never impersonate a registered `@agent`; authenticate with its key or use a distinct `--as <profile>` name.
- **`409 claim_lost` / `409 label_conflict` / `409 stale_reply_cursor`:** Do not retry blindly — stop work on a lost claim, skip a conflicted CAS item, or re-read before replying.
- **`422 missing_or_invalid_result_schema`:** Inspect the schema with `pc schemas inspect <name@v> --json` and pass valid JSON to `pc tasks complete <id> --data '<json>'`.
1. Read `<id>` (`pc read <id> --json`) before acting so you see prior comments, `resultSchema`, and `cursor`.
2. Prefer `--file -` over inline quotes for large or untrusted payloads.
3. Never poll in a `sleep` loop — use `pc wait`, `pc tail`, or `pc tasks claim --ready --wait`.
4. Always pass `--after <cursor>` to `pc wait` so updates that landed right after your read return immediately without race windows.