.claude/skills/remote-task/SKILL.md
Launch a Claude task on a remote kube-coder workspace, check task status, or attach to a running session. Use when the user wants to send work to a remote workspace pod.
npx skillsauth add imran31415/kube-coder remote-taskInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Launch Claude tasks on remote kube-coder workspace pods, check their status, or view output.
This skill requires:
kubectl access to the clustermake deploy-<user>)The workspace pod runs a Python HTTP server on port 6080 that exposes a Claude Task API. Tasks launch as interactive tmux sessions running claude — users can attach to approve permissions and provide input.
Based on $ARGUMENTS, perform ONE of the following:
$ARGUMENTS is "status" — List all tasks# Port-forward if needed
kubectl port-forward -n coder svc/ws-imran 6080:6080 &
PF_PID=$!
sleep 2
TOKEN=$(kubectl exec -n coder $(kubectl get pods -n coder -l app=ws-imran -o jsonpath='{.items[0].metadata.name}') -c ide -- cat /home/dev/.claude-tasks/.api-token 2>/dev/null)
curl -s "http://localhost:6080/api/claude/tasks" \
-H "Authorization: Bearer $TOKEN" | python3 -m json.tool
kill $PF_PID 2>/dev/null
Display the results as a formatted table showing: task_id, status, prompt (truncated), and created_at (as relative time).
$ARGUMENTS starts with "attach" — Show how to attach to a taskExtract the task ID from the arguments. Then tell the user:
kubectl exec -it -n coder <pod> -c ide -- tmux attach-session -t claude-<task_id>Also show recent output:
kubectl exec -n coder <pod> -c ide -- tmux capture-pane -t claude-<TASK_ID> -p -S -30
$ARGUMENTS starts with "output" — Show task outputExtract the task ID from the arguments. Run:
kubectl exec -n coder <pod> -c ide -- tmux capture-pane -t claude-<TASK_ID> -p -S -50
$ARGUMENTS starts with "kill" — Kill a taskExtract the task ID from the arguments. Run:
kubectl port-forward -n coder svc/ws-imran 6080:6080 &
PF_PID=$!
sleep 2
TOKEN=$(kubectl exec -n coder $(kubectl get pods -n coder -l app=ws-imran -o jsonpath='{.items[0].metadata.name}') -c ide -- cat /home/dev/.claude-tasks/.api-token 2>/dev/null)
curl -s -X DELETE "http://localhost:6080/api/claude/tasks/<TASK_ID>" \
-H "Authorization: Bearer $TOKEN" | python3 -m json.tool
kill $PF_PID 2>/dev/null
The $ARGUMENTS is the prompt to send to the remote Claude. Execute:
# Ensure port-forward is active
lsof -ti:6080 | xargs kill 2>/dev/null
kubectl port-forward -n coder svc/ws-imran 6080:6080 &
PF_PID=$!
sleep 2
# Get the API token from the pod
POD=$(kubectl get pods -n coder -l app=ws-imran -o jsonpath='{.items[0].metadata.name}')
TOKEN=$(kubectl exec -n coder $POD -c ide -- cat /home/dev/.claude-tasks/.api-token 2>/dev/null)
# If no token exists, create one
if [ -z "$TOKEN" ]; then
TOKEN=$(kubectl exec -n coder $POD -c ide -- python3 -c "
import secrets, os
d = '/home/dev/.claude-tasks'
os.makedirs(d, mode=0o700, exist_ok=True)
t = secrets.token_urlsafe(36)
with open(os.path.join(d, '.api-token'), 'w') as f: f.write(t)
os.chmod(os.path.join(d, '.api-token'), 0o600)
print(t)
")
fi
# Create the task
curl -s -X POST "http://localhost:6080/api/claude/tasks" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d "$(python3 -c "import json; print(json.dumps({'prompt': $(python3 -c "import json,sys; print(json.dumps(sys.argv[1]))" "$ARGUMENTS"), 'workdir': '/home/dev'}))")" \
| python3 -m json.tool
kill $PF_PID 2>/dev/null
After launching, wait a few seconds and check the tmux pane to confirm the task started:
sleep 8
kubectl exec -n coder $POD -c ide -- tmux capture-pane -t claude-<TASK_ID> -p -S -20
Report the task_id and tmux_session name back to the user so they know how to attach.
All endpoints are under http://localhost:6080/api/claude/ (via port-forward) and require Authorization: Bearer <token> header.
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | /api/claude/tasks | List all tasks |
| POST | /api/claude/tasks | Create task. Body: {"prompt": "...", "workdir": "/home/dev"} |
| GET | /api/claude/tasks/{id} | Get task details + recent output |
| GET | /api/claude/tasks/{id}/output?tail=N | Get task output (last N lines) |
| POST | /api/claude/tasks/{id}/message | Send follow-up. Body: {"prompt": "..."} |
| DELETE | /api/claude/tasks/{id} | Kill a task |
| POST | /api/claude/tasks/{id}/prepare-terminal | Prepare terminal for one-click attach |
claude then /login in the pod terminal if needed).ws-imran in the coder namespace. Adjust pod labels/names for other users.development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.