npx skills add ...
npx skills add pulumi/agent-skills --skill pulumi-neo-handoff
npx skills add pulumi/agent-skills --skill pulumi-neo-handoff
Hand off the current thread to a new Pulumi Neo task as a one-way transfer. Use when the user explicitly asks to hand off, send, transfer, or continue current work in Pulumi Neo (e.g. "hand this to Neo", "continue in Neo", "/neo-handoff"). Do not load when the user only mentions Neo, asks what Neo can do, asks for an AI-written PR or preview explanation, or hands off to a different agent.
Transfer the current in-progress work to a new Pulumi Neo task. This is a one-way handoff: control passes to Neo and does not return to the calling agent.
When this skill activates, act as a handoff coordinator, not the operator:
The Neo task receives a single opening prompt with three sections:
Do not include diffs, full file contents, or tool output. Neo sees the local working tree directly (including uncommitted changes); duplicating that content wastes Neo's opening context.
Verify the CLI is available before drafting anything:
If preflight fails, surface the error to the user and stop. Do not assemble the prompt only to fail at launch.
The goal is one sentence describing what Neo should do next. If the user's handoff message contains it ("hand this off to Neo and apply the staging migration"), use it directly. Otherwise ask once: "What would you like Neo to do next?"
Do not restate the goal back for confirmation — the handoff should feel seamless, and if Neo receives a misread goal the user can redirect inside the Neo task.
Capture the canonical repo pointer and branch state:
If git rev-parse --show-toplevel fails the directory is not a git repo — omit the Repository section and note the working directory only. Neo can still operate, but its repo context will be limited.
If the branch reads HEAD, record the commit SHA and label the entry "detached at <sha>".
Identify 3 to 5 files most relevant to the in-progress work from the conversation (files read, edited, or repeatedly discussed). If the conversation does not clearly identify files, list none rather than guessing — wrong files mislead Neo more than missing files do.
Write a compact summary against the structure below. Sections with nothing useful to say should be omitted, not padded.
Target ~400 words for the summary. Compress aggressively. The goal is to give Neo enough to pick up cleanly, not to replay the conversation.
Combine the three sections into a single markdown document. Use mktemp for a portable temp path:
Shape:
Print the temp file path with a one-line size summary so the user can inspect on demand:
Invoke the CLI:
pulumi neo accepts the prompt as a single positional argument; it has no --file flag, and stdin redirection launches the TUI instead of consuming the prompt. The "$(cat ...)" form captures the file's bytes as data (the shell does not re-evaluate $, backticks, or \ inside command substitution) and passes them as one argument. Do not "fix" this to pulumi neo --file ... or pulumi neo < ... — both forms are broken against the current CLI.
If the CLI exits non-zero, surface its stderr verbatim and leave the prompt file in place so the user can retry. Do not pretend the handoff succeeded.
The CLI prints a task URL on success. Echo it verbatim. Then stop.
git rev-parse --show-toplevel # repo root (canonical pointer)
git rev-parse --abbrev-ref HEAD # branch; returns "HEAD" if detached
git status --short # working-tree summary## What's been done
<bullets: decisions made, code changed, dead ends ruled out>
## Open questions
<bullets: things the user has not resolved>
## Next step
<one or two sentences describing what Neo should do first>PROMPT_FILE="$(mktemp -t neo-handoff.XXXXXX.md)"# Goal
<one-sentence goal>
# Repository
- Root: <repo root>
- Branch: <branch or "detached at <sha>">
- Working directory: <cwd>
- Working tree: <clean | dirty>
- Files in play:
- <file 1>
- <file 2>
# Conversation summary
<summary from step 3>Prompt written to <PROMPT_FILE> (<line count> lines, <byte count> bytes).
Launching Neo task...pulumi neo "$(cat "$PROMPT_FILE")"