hand_to_user — Claude Code prompt: what it does, how to install
hand_to_user — a prompt for Claude Code and ChatGPT that hands control of the screen to the user for manual steps tools cannot complete.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/hand_to_user.mdWhat hand_to_user does
This prompt tells the agent to hand the screen over to the user for actions like signing in, solving verification puzzles, or making payments. The agent writes down exact instructions and waits for control to return before checking the interface. If the outcome is skipped or times out, the agent logs the state and tries another path or ends the task.
Getting control back does not prove the step succeeded, so the agent reads the screen first to verify order status or sign-in state. If the result remains unclear, the agent calls ask_user with options like Done or Stop. Verification happens even when input count is zero since the user might have completed the action independently.
What it helps with
- hand over the screen for user sign-in
- handle payment verification steps manually
- verify the screen state after user action
- trigger
ask_userwhen the outcome is unclear
Example prompts for the agent
- Hand the screen to the user for login
- Ask the user if the payment is done using
ask_user - Check order status on screen after user returns control
How to install hand_to_user
Manually: put the files in place
.claude/commands/hand_to_user.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about hand_to_user
How to install hand_to_user in Claude Code?
Create the file .claude/commands/hand_to_user.md in your project root.
What does hand_to_user do?
It transfers screen control to the user for manual actions like sign-in or payment and verifies the outcome.
What happens on outcome skip or timeout?
The agent treats the step as not handled, reports what happened, and switches to another method or ends the task.
Source text
hand_to_user.md · Apache-2.0
Hand the screen to the user for a step only they can do (signing in, a verification puzzle, a payment or another step the tools cannot complete). Say in message exactly what they need to do. Getting control back does not prove the step worked. With outcome complete, read the screen first and check the result (for a payment, the order status; for a sign-in, that you are signed in). If it checks out, go on or report. If you cannot tell, call ask_user with options such as "Done" / "Not done, let me take over again" / "Stop" (in the user's language). Check even when inputCount is 0, since the user may have done it some other way; only when you see no sign of it, treat the step as not started and ask whether to hand over again. Never go by durationMs, and never say a step succeeded without checking. Outcome skipped or timeout means nothing was handed back: do not claim the user handled it; say what happened, then try another way or end the task. Once the user hands back, continue the task.
© wangzan101 · Apache-2.0 · wangzan101/Mika