$npx -y skills add chenhg5/agencycli --skill agencycli-usageOperate the agencycli tool — create agencies, teams, projects, and hire AI agents into working directories.
| 1 | # Skill: agencycli Usage |
| 2 | |
| 3 | `agencycli` is the CLI tool that builds and manages this agency. Use it to manage teams, projects, agents, tasks, and inter-agent communication. |
| 4 | |
| 5 | ## Workspace |
| 6 | |
| 7 | The current agency workspace is at: `$AGENCY_DIR` |
| 8 | |
| 9 | All commands auto-discover the workspace when run from inside it, or use `--dir`: |
| 10 | ```bash |
| 11 | agencycli --dir $AGENCY_DIR <command> |
| 12 | ``` |
| 13 | |
| 14 | --- |
| 15 | |
| 16 | ## Discover what exists |
| 17 | |
| 18 | ```bash |
| 19 | agencycli --dir $AGENCY_DIR list teams # all teams |
| 20 | agencycli --dir $AGENCY_DIR list projects # all projects |
| 21 | agencycli --dir $AGENCY_DIR list agents # all agents across all projects |
| 22 | agencycli --dir $AGENCY_DIR list skills # available skills |
| 23 | |
| 24 | agencycli --dir $AGENCY_DIR show team engineering |
| 25 | agencycli --dir $AGENCY_DIR show project cc-connect |
| 26 | agencycli --dir $AGENCY_DIR show agent cc-connect pm |
| 27 | agencycli --dir $AGENCY_DIR show agent cc-connect pm --raw # full merged context |
| 28 | ``` |
| 29 | |
| 30 | --- |
| 31 | |
| 32 | ## Tasks |
| 33 | |
| 34 | ### Add a task for an agent |
| 35 | |
| 36 | ```bash |
| 37 | agencycli --dir $AGENCY_DIR task add \ |
| 38 | --project <project> --agent <agent> \ |
| 39 | --title "Task title" \ |
| 40 | --prompt "Detailed instructions..." \ |
| 41 | --priority <0-3> # 0=critical 1=high 2=normal(default) 3=low |
| 42 | ``` |
| 43 | |
| 44 | ### View the task queue (sorted by priority) |
| 45 | |
| 46 | ```bash |
| 47 | agencycli --dir $AGENCY_DIR task list --project <project> --agent <agent> |
| 48 | agencycli --dir $AGENCY_DIR task list --project <project> --agent <agent> --status pending |
| 49 | ``` |
| 50 | |
| 51 | ### Control tasks |
| 52 | |
| 53 | ```bash |
| 54 | agencycli --dir $AGENCY_DIR task set <task-id> [--title T] [--status S] [--priority N] \ |
| 55 | [--due-date YYYY-MM-DD] [--estimate-duration 30m] [--parent ID] [--label L]... |
| 56 | agencycli --dir $AGENCY_DIR task stats [--since today] [--project P] [--agent A] [--assignee X] \ |
| 57 | [--label L] [--by agent|assignee|label|label:value|label:category] [--detail] [--format json] |
| 58 | agencycli --dir $AGENCY_DIR task cancel <task-id> |
| 59 | agencycli --dir $AGENCY_DIR task retry <task-id> |
| 60 | |
| 61 | # Emergency halt — cancel all pending (and optionally running) tasks |
| 62 | agencycli --dir $AGENCY_DIR task stop-all \ |
| 63 | --project <project> --all-agents |
| 64 | agencycli --dir $AGENCY_DIR task stop-all \ |
| 65 | --project <project> --agent <agent> --include-running |
| 66 | ``` |
| 67 | |
| 68 | ### View token usage and cost |
| 69 | |
| 70 | ```bash |
| 71 | # One agent |
| 72 | agencycli --dir $AGENCY_DIR task tokens \ |
| 73 | --project <project> --agent <agent> |
| 74 | |
| 75 | # All agents in a project |
| 76 | agencycli --dir $AGENCY_DIR task tokens \ |
| 77 | --project <project> --all-agents |
| 78 | |
| 79 | # Specific task |
| 80 | agencycli --dir $AGENCY_DIR task tokens \ |
| 81 | --project <project> --agent <agent> --task <task-id> |
| 82 | ``` |
| 83 | |
| 84 | ### Task done / confirm-request (called by agents inside their prompt) |
| 85 | |
| 86 | ```bash |
| 87 | # Report completion |
| 88 | agencycli --dir $AGENCY_DIR task done \ |
| 89 | --id $TASK_ID --status success --summary "Brief description of what was done" |
| 90 | |
| 91 | # Report failure |
| 92 | agencycli --dir $AGENCY_DIR task done \ |
| 93 | --id $TASK_ID --status failed --error "reason" |
| 94 | |
| 95 | # Request human input before proceeding (non-blocking) |
| 96 | agencycli --dir $AGENCY_DIR task confirm-request \ |
| 97 | --id $TASK_ID \ |
| 98 | --summary "PR #42 ready, awaiting merge approval" \ |
| 99 | --action-item "Review: gh pr view 42 --repo org/repo" \ |
| 100 | --action-item "Approve: inbox reply <msg-id> --body 'approve'" \ |
| 101 | --action-item "Hold: inbox reply <msg-id> --body 'hold <reason>'" |
| 102 | ``` |
| 103 | |
| 104 | After `confirm-request`, the task is archived (non-blocking). The human replies via `inbox reply` and the agent continues on their next wakeup. |
| 105 | |
| 106 | --- |
| 107 | |
| 108 | ## Inbox — async messages (non-blocking) |
| 109 | |
| 110 | Any participant (human or agent) can send non-blocking messages to any other participant. The recipient reads them on their next wakeup — the scheduler automatically injects unread messages at the top of the wakeup prompt. |
| 111 | |
| 112 | ### Participant address format |
| 113 | - Human: `human` |
| 114 | - Agent: `<project>/<agent>` — e.g. `cc-connect/pm`, `cc-connect/dev-claude` |
| 115 | |
| 116 | ### Send a message |
| 117 | |
| 118 | ```bash |
| 119 | # Human → agent |
| 120 | agencycli --dir $AGENCY_DIR inbox send \ |
| 121 | --to <project>/<agent> \ |
| 122 | --subject "Subject" \ |
| 123 | --body "Body" |
| 124 | |
| 125 | # Agent → human |
| 126 | agencycli --dir $AGENCY_DIR inbox send \ |
| 127 | --from <project>/<agent> --to human \ |
| 128 | --subject "Subject" --body "Body" |
| 129 | |
| 130 | # Agent → agent |
| 131 | agencycli --dir $AGENCY_DIR inbox send \ |
| 132 | --from <project>/pm --to <project>/dev \ |
| 133 | --subject "Extra context for task <id>" \ |
| 134 | --body "Details..." |
| 135 | |
| 136 | # Group send (repeat --to for multiple recipients) |
| 137 | agencycli --dir $AGENCY_DIR inbox send \ |
| 138 | --from <project>/pm \ |
| 139 | --to <project>/dev --to <project>/qa --to human \ |
| 140 | --subject "Sprint kick-off" --body "..." |
| 141 | ``` |
| 142 | |
| 143 | ### Read messages |
| 144 | |
| 145 | ```bash |
| 146 | agencycli --dir $AGENCY_DIR inbox messages # human's unread |
| 147 | agencycli --dir $AGENCY_DIR inbox messages --recipient <project>/pm # agent's mailbox |
| 148 | agencycli --dir $AGENCY_DIR inbox messages --from <project>/qa # filter by sender |
| 149 | agencycli --dir $AGENCY_DIR inbox messages --all # include read |
| 150 | agencycli --dir $AGENCY_DIR inbox messages --archived # |