Connect operator session to the task management platform, pick a task, and work with Claude assistance
Connect a human operator's Claude session to the task management platform. Browse your inbox, pick a task, and work on it with Claude assistance. This is the core operator experience skill.
!source "$(git rev-parse --show-toplevel 2>/dev/null || echo .)/.env" 2>/dev/null && echo "API_URL=${NEB_TASK_API_URL:-NOT SET}" && echo "COMPANY_ID=${NEB_TASK_COMPANY_ID:-NOT SET}" && echo "AGENT_ID=${NEB_TASK_AGENT_ID:-NOT SET}" && echo "API_KEY=${NEB_TASK_API_KEY:+SET}" || echo "No .env file found"
!git config user.name 2>/dev/null || echo "no git user"
!git config user.email 2>/dev/null || echo "no git email"
!git branch --show-current 2>/dev/null || echo "detached/unknown"
!pwd
NEVER use the word "paperclip" in any user-facing output. Use "task management platform" or "platform" instead.
Determine which flow to execute based on the current context above:
.env is missing or NEB_TASK_API_URL is not set → tell user to run /neb-env-setup first and STOPNEB_TASK_AGENT_ID is not set → execute Flow 1: First-Time Registration, then continue to Flow 2NEB_TASK_AGENT_ID is set → execute Flow 2: Session Connect directlyUse /superpowers:executing-plans to follow the multi-step registration workflow below.
Run this when NEB_TASK_AGENT_ID is not set in .env. This registers the operator as an agent on the platform.
GIT_NAME=$(git config user.name)
GIT_EMAIL=$(git config user.email)
If either is empty, ask the user to configure git identity first and STOP.
Search all agents in the company for a match by name (case-insensitive) or metadata containing the email:
source "$(git rev-parse --show-toplevel)/.env"
curl -sf --max-time 10 "${NEB_TASK_API_URL}/api/companies/${NEB_TASK_COMPANY_ID}/agents"
Iterate the returned array. Match by:
agent.name equals $GIT_NAME (case-insensitive string comparison)agent.metadata contains $GIT_EMAILIf found: Write the agent's id to .env as NEB_TASK_AGENT_ID (append or update the line). Skip to step 1.4.
If not found: Continue to step 1.3.
source "$(git rev-parse --show-toplevel)/.env"
curl -sf --max-time 10 -X POST "${NEB_TASK_API_URL}/api/companies/${NEB_TASK_COMPANY_ID}/agents" \
-H "Content-Type: application/json" \
-d '{
"name": "'"${GIT_NAME}"'",
"role": "operator",
"title": "Engineer",
"adapterType": "process",
"adapterConfig": {}
}'
Extract the returned id and write it to .env as NEB_TASK_AGENT_ID.
source "$(git rev-parse --show-toplevel)/.env"
curl -sf --max-time 10 -X POST "${NEB_TASK_API_URL}/api/agents/${NEB_TASK_AGENT_ID}/keys" \
-H "Content-Type: application/json"
This returns the raw API key token once (it cannot be retrieved again). Extract the key value and write it to .env as NEB_TASK_API_KEY.
source "$(git rev-parse --show-toplevel)/.env"
curl -sf --max-time 10 "${NEB_TASK_API_URL}/api/agents/${NEB_TASK_AGENT_ID}" \
-H "Authorization: Bearer ${NEB_TASK_API_KEY}"
Confirm the agent exists and status is active. If verification fails, report the error and STOP.
Use /superpowers:verification-before-completion to verify agent exists and API key works after registration.
Print: "Registered as operator agent: {name} ({id})"
Use /superpowers:executing-plans to follow the multi-step connect workflow below.
Run this every time the skill is invoked (after registration is complete).
Source .env and confirm all four variables are set:
NEB_TASK_API_URLNEB_TASK_COMPANY_IDNEB_TASK_AGENT_IDNEB_TASK_API_KEYIf any are missing, report which ones and tell the user to run /neb-env-setup and STOP.
source "$(git rev-parse --show-toplevel)/.env"
curl -sf --max-time 10 "${NEB_TASK_API_URL}/api/agents/${NEB_TASK_AGENT_ID}" \
-H "Authorization: Bearer ${NEB_TASK_API_KEY}"
Confirm the agent is active. If the request fails (401, 404, network error), report the error with troubleshooting steps and STOP.
Make three API calls to fetch issues by status:
source "$(git rev-parse --show-toplevel)/.env"
# In-progress issues
curl -sf --max-time 10 \
"${NEB_TASK_API_URL}/api/companies/${NEB_TASK_COMPANY_ID}/issues?assigneeAgentId=${NEB_TASK_AGENT_ID}&status=in_progress" \
-H "Authorization: Bearer ${NEB_TASK_API_KEY}"
# Todo issues
curl -sf --max-time 10 \
"${NEB_TASK_API_URL}/api/companies/${NEB_TASK_COMPANY_ID}/issues?assigneeAgentId=${NEB_TASK_AGENT_ID}&status=todo" \
-H "Authorization: Bearer ${NEB_TASK_API_KEY}"
# Blocked issues
curl -sf --max-time 10 \
"${NEB_TASK_API_URL}/api/companies/${NEB_TASK_COMPANY_ID}/issues?assigneeAgentId=${NEB_TASK_AGENT_ID}&status=blocked" \
-H "Authorization: Bearer ${NEB_TASK_API_KEY}"
Display all fetched issues grouped by status, numbered sequentially:
=== Your Tasks ===
IN PROGRESS:
1. NEB-42 Fix OIDC redirect loop [high]
2. NEB-38 Update marketing site [medium]
TODO:
3. NEB-45 Add cluster health monitoring [high]
4. NEB-50 Helm chart version bump [low]
BLOCKED:
5. NEB-47 Deploy SSO (blocked by NEB-42) [urgent]
Use the issue's identifier (e.g., NEB-42), title, and priority from the API response. If a status group has no issues, omit that section. If all groups are empty, print "No tasks assigned to you." and STOP.
Use AskUserQuestion to prompt:
Pick a task (number) or 'q' to quit:
If the user enters 'q' or 'quit', print "Session ended." and STOP.
Map the number back to the corresponding issue.
Generate a UUID v4 for the run ID:
python3 -c "import uuid; print(uuid.uuid4())"
Checkout the selected issue:
source "$(git rev-parse --show-toplevel)/.env"
RUN_ID="<generated-uuid>"
curl -sf --max-time 10 -X POST \
"${NEB_TASK_API_URL}/api/issues/${ISSUE_ID}/checkout" \
-H "Authorization: Bearer ${NEB_TASK_API_KEY}" \
-H "X-Paperclip-Run-Id: ${RUN_ID}" \
-H "Content-Type: application/json"
If 409 (already checked out): Inform the user that this task is already checked out by another session. Use AskUserQuestion to ask: "This task is already checked out. Force checkout? (y/n)". If yes, retry with a force parameter or continue anyway. If no, go back to step 2.5.
If other error: Report and STOP.
source "$(git rev-parse --show-toplevel)/.env"
curl -sf --max-time 10 \
"${NEB_TASK_API_URL}/api/issues/${ISSUE_ID}/heartbeat-context" \
-H "Authorization: Bearer ${NEB_TASK_API_KEY}"
Display the complete task information:
=== NEB-42: Fix OIDC redirect loop ===
Status: in_progress | Priority: high
Description:
<full description from issue>
Acceptance Criteria:
<extracted from description if present>
Recent Comments:
<last 3 comments from heartbeat context, if any>
Write session state files for other skills to detect:
# Generate run ID (already done in 2.6)
echo "${RUN_ID}" > /tmp/neb-run-${CLAUDE_SESSION_ID:-$$}
echo "${ISSUE_ID}" > /tmp/neb-issue-${CLAUDE_SESSION_ID:-$$}
Note: CLAUDE_SESSION_ID may not be set. Fall back to $$ (process ID) or generate a unique identifier.
source "$(git rev-parse --show-toplevel)/.env"
BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
WORKSPACE=$(pwd)
curl -sf --max-time 10 -X POST \
"${NEB_TASK_API_URL}/api/issues/${ISSUE_ID}/comments" \
-H "Authorization: Bearer ${NEB_TASK_API_KEY}" \
-H "X-Paperclip-Run-Id: ${RUN_ID}" \
-H "Content-Type: application/json" \
-d '{
"body": "Session started — operator-assisted mode\nWorkspace: '"${WORKSPACE}"'\nBranch: '"${BRANCH}"'"
}'
Print:
Connected to {IDENTIFIER}. You can now work normally.
Use /neb-delegate, /neb-review, /neb-team, /neb-handoff for collaboration.
Where {IDENTIFIER} is the issue identifier (e.g., NEB-42).
After connect completes, the session is in "assisted work mode." This means:
/tmp/neb-run-{SESSION_ID} contains the active run UUID — other skills include this as X-Paperclip-Run-Id on mutations/tmp/neb-issue-{SESSION_ID} contains the active issue ID — other skills use this to post milestone commentsscripts/neb-session-*.sh) detect these files and log activity automatically/neb-delegate, /neb-review, /neb-team, and /neb-handoff read these files to know which task is activeNo additional action is needed for Flow 3 — it is purely the result of the session state written in Flow 2.
/neb-env-setup to regenerate credentials./neb-env-setup.When writing variables to .env, use this pattern to update or append:
ENV_FILE="$(git rev-parse --show-toplevel)/.env"
# Update existing variable or append new one
if grep -q '^NEB_TASK_AGENT_ID=' "$ENV_FILE" 2>/dev/null; then
sed -i '' 's|^NEB_TASK_AGENT_ID=.*|NEB_TASK_AGENT_ID='"${NEW_VALUE}"'|' "$ENV_FILE"
else
echo "NEB_TASK_AGENT_ID=${NEW_VALUE}" >> "$ENV_FILE"
fi
Apply the same pattern for NEB_TASK_API_KEY.
| Superpowers Skill | When to Use |
|---|---|
/superpowers:verification-before-completion | After registration and session setup — verify agent exists and API key works |
/superpowers:executing-plans | When following the multi-step registration or connect workflows |