Skip to content

feat(workos): add CLI agent-mode guidance to skill#29

Merged
nicknisi merged 4 commits into
mainfrom
nick/cli-agent-mode-guidance
May 13, 2026
Merged

feat(workos): add CLI agent-mode guidance to skill#29
nicknisi merged 4 commits into
mainfrom
nick/cli-agent-mode-guidance

Conversation

@nicknisi
Copy link
Copy Markdown
Member

@nicknisi nicknisi commented May 10, 2026

Summary

Updates the bundled workos and workos-widgets skills with explicit guidance for invoking the WorkOS CLI from coding-agent sessions. Pairs with workos/cli#143, which adds first-class interaction-mode support (WORKOS_MODE=human|agent|ci) to the CLI.

Why

The CLI now separates two axes:

Axis Question API
Output mode How should output be formatted? --json
Interaction mode Who is driving the CLI? --mode / WORKOS_MODE

Previously, --json and non-TTY auto-detection carried both meanings, and coding agents had no canonical way to opt into deterministic non-prompt behavior. The CLI's auto-detection still works, but explicit WORKOS_MODE=agent is more reliable across sandboxes and is now the recommended invocation.

The bundled WorkOS skills are where coding agents learn how to talk to the CLI, so they're the right place to teach the new contract.

Changes

plugins/workos/skills/workos/SKILL.md

  • Adds a WorkOS CLI in Coding-Agent Sessions section with:
    • Recommended preflight: WORKOS_MODE=agent workos doctor --json --skip-ai
    • The two-axis model (output formatting vs interaction behavior)
    • HOST_EXECUTION_UNTRUSTED as a hard sandbox trust boundary — auth/config/keychain/API failures from an untrusted shell are not authoritative; re-run on the host shell
    • Browser-auth fallback rules (manual URL/code, never assume browser works in a sandbox)
    • Destructive-command confirmation rules (--yes/--force in agent mode)
    • error.recovery.hints[] as the agent-readable next step
    • Legacy compatibility notes for WORKOS_NO_PROMPT and WORKOS_FORCE_TTY
  • Tightens the existing CLI guardrail to use WORKOS_MODE=agent workos --help --json and adds a new bullet pointing at the new section

plugins/workos/skills/workos-widgets/SKILL.md

  • Updates install prompts (workflow step 4 and Core Guidelines) to use WORKOS_MODE=agent npx workos@latest install so the installer behaves deterministically in agent sessions

Notes

  • Pure documentation change — no behavioral or structural changes to skill loading or routing.
  • Diff includes incidental oxfmt table column-width re-alignment in workos/SKILL.md. That re-alignment is from pnpm format and follows project convention; happy to drop it if preferred.
  • pnpm test and pnpm lint pass.

Validation

  • pnpm test (189 tests passing)
  • pnpm lint (0 warnings, 0 errors)
  • pnpm format clean

Related


Open in Devin Review

Coding agents now have explicit instructions for invoking the WorkOS CLI:

- Recommend `WORKOS_MODE=agent workos doctor --json --skip-ai` as the
  setup/debugging preflight.
- Document the two-axis model: `--json` is output formatting only;
  `WORKOS_MODE=agent` controls prompts, browser fallback, and host trust.
- Treat `HOST_EXECUTION_UNTRUSTED` from doctor as a hard sandbox trust
  boundary that requires re-running on the host shell before trusting
  auth/config/API failures.
- Note legacy compatibility for `WORKOS_NO_PROMPT` and `WORKOS_FORCE_TTY`.
- Update workos-widgets install prompts to use `WORKOS_MODE=agent` when
  asking the user to run `npx workos@latest install`.

The CLI surface (mode resolver, doctor visibility, recovery hints) is
landing in the workos/cli repo (workos/cli#143);
this skill update teaches agents to use it.
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

nicknisi added 3 commits May 10, 2026 13:49
…ance

Reframe guardrail as prohibition, explain --skip-ai flag, add --help
fallback for confirmation flags, clarify WORKOS_NO_PROMPT migration
path, and remove redundant parenthetical from widgets workflow.
- Fix broken WORKOS_NO_PROMPT migration syntax (was not a runnable fragment)
- Add CLI/agent-mode/doctor to skill description for triggering
- Drop "machine-readable" framing from widgets to avoid implying agent
  mode replaces --json
- Add --skip-ai version fallback to cli-upgrade reference
- Soften doctor JSON shape claims to resist schema rot
- Soften guardrail from "never run without" to "prefer" since the CLI
  auto-detects CLAUDECODE, CLAUDE_CODE, CURSOR_AGENT, CODEX_SANDBOX,
  CURSOR_TRACE_ID, and non-TTY
- Document the two-axis model (interaction mode vs output mode) with
  the three possible interaction values (human/agent/ci)
- Restore precise doctor field names (interactionMode, hostExecution)
  since they're stable type definitions in the CLI
- Fix recovery hints shape: describe per-hint fields (description,
  command, hostShellRequired) and note JSON is emitted on stderr
- Enumerate all known confirmation flags including debug reset
@nicknisi nicknisi merged commit a7755e9 into main May 13, 2026
2 checks passed
@nicknisi nicknisi deleted the nick/cli-agent-mode-guidance branch May 13, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant