Skip to content
Development
Skill

/local-cli-testing

Guide local HumanLayer CLI login and create local test tasks and sessions

BOOST
From plugin
humanlayer
12k56 skills
Install
$ npx -y skills add humanlayer/humanlayer --skill local-cli-testing --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/local-cli-testing

Context preview

The summary Claude sees to decide when to auto-load this skill.

Guide local HumanLayer CLI login and create local test tasks and sessions

SKILL.md

local-cli-testing.SKILL.md
name: local-cli-testing
description: Guide local HumanLayer CLI login and create local test tasks and sessions

Local CLI Testing

Test Riptide API flows through `apps/cli` without the UI.

Login (Interactive)

The local CLI defaults to WorkOS device auth, so no callback URL is required. Loopback PKCE is opt-in with `HUMANLAYER_CLI_AUTH_METHOD=loopback`; if using it, add the exact redirect URI `http://localhost:39173/callback` in WorkOS, or set `HUMANLAYER_CLI_AUTH_PORT=<port>` and add the matching exact URI.

Ask the user to run:

WORKOS_CLIENT_ID="$(grep '^WORKOS_CLIENT_ID=' .env | cut -d= -f2-)" \
DEV_API_ORIGIN=http://localhost:8700 \
DEV_SYNC_ORIGIN=http://localhost:8888 \
bun --bun apps/cli/src/index.ts --dev login

If `400 invalid client`, confirm `WORKOS_CLIENT_ID` is the public WorkOS client id for the target environment.

Verify:

WORKOS_CLIENT_ID="$(grep '^WORKOS_CLIENT_ID=' .env | cut -d= -f2-)" \
DEV_API_ORIGIN=http://localhost:8700 \
DEV_SYNC_ORIGIN=http://localhost:8888 \
bun --bun apps/cli/src/index.ts --dev api sync online-hosts --limit 5

Create Task

WORKOS_CLIENT_ID="$(grep '^WORKOS_CLIENT_ID=' .env | cut -d= -f2-)" \
DEV_API_ORIGIN=http://localhost:8700 \
DEV_SYNC_ORIGIN=http://localhost:8888 \
bun --bun apps/cli/src/index.ts --dev api tasks create \
  --name "Task Name" \
  --slug "task-slug" \
  --default-working-directory "$PWD" \
  --workflow-type outline_only \
  --worktree-timing later

Workflow types: `rpi`, `outline_only`, `prd_tdd`, `oneshot` (omit for freeform) Worktree timing: `now`, `later`, `never`

Upload Artifact

WORKOS_CLIENT_ID="$(grep '^WORKOS_CLIENT_ID=' .env | cut -d= -f2-)" \
DEV_API_ORIGIN=http://localhost:8700 \
DEV_SYNC_ORIGIN=http://localhost:8888 \
bun --bun apps/cli/src/index.ts --dev api uploads upsert-text \
  --task-id "TASK_ID" \
  --file-name "ticket.md" \
  --content "Ticket content here"

Launch Session

WORKOS_CLIENT_ID="$(grep '^WORKOS_CLIENT_ID=' .env | cut -d= -f2-)" \
DEV_API_ORIGIN=http://localhost:8700 \
DEV_SYNC_ORIGIN=http://localhost:8888 \
bun --bun apps/cli/src/index.ts --dev api sessions launch \
  --task-id '"TASK_ID"' \
  --title '"Session Title"' \
  --text "use the rpi:create-structure-outline skill" \
  --working-directory "$PWD" \
  --host-id "HOST_ID" \
  --coding-agent claude \
  --provider anthropic \
  --model haiku \
  --permissions-mode bypass

Inspect Results

WORKOS_CLIENT_ID="$(grep '^WORKOS_CLIENT_ID=' .env | cut -d= -f2-)" \
DEV_API_ORIGIN=http://localhost:8700 \
DEV_SYNC_ORIGIN=http://localhost:8888 \
bun --bun apps/cli/src/index.ts --dev api sync sessions --task-id "TASK_ID" --limit 10

SQL for debugging:

docker compose exec postgres psql -U postgres electric -c \
  "SELECT s.id, s.status, t.workflow_type, t.worktree_timing FROM sessions s JOIN tasks t ON t.id = s.task_id WHERE s.id = 'SESSION_ID';"

Troubleshooting

  • `invalid client` → use `WORKOS_CLIENT_ID` instead of `VITE_PUBLIC_WORKOS_CLIENT_ID`
  • No online host → launch local daemon first
  • Session stays queued → verify `--host-id` is online
Read more
Ships withhumanlayer

HumanLayer runs coding agents (Claude Code, Codex, OpenCode, Pi) on your machines and lets your team steer them from one place: tasks, sessions, plans, and reviews, synced between a desktop app, a web app, and a daemon on each host. This repo holds all of it.

Get the whole plugin

Other skills on humanlayer.