Ask Claude a one-off question. Use for second opinions, clarifications, and quick analysis.
Ask Claude a quick question without a full review loop.
/claude-ask "Your question here" — inline response (default)/claude-ask --json-file "Your question here" — strict JSON output to a temp file for machine parsingUse INVOC_ID (${PPID}-${RANDOM}) for invocation-unique naming. This supports concurrent skill invocations within a session. Get the literal value first via INVOC_ID="${PPID}-${RANDOM}"; echo "INVOC_ID=$INVOC_ID", then use that literal in all file paths. The Read tool does not expand shell variables — use the numeric literal in Read paths. Fallback: mktemp -d if process model changes.
claude --version to confirm the CLI is available.claude -p --permission-mode plan --output-format text --max-turns 1 \
"QUESTION. Return the complete answer inline in this terminal response. Do not ask to create/write files."
--json-file)rm -f /tmp/claude-ask-$INVOC_ID.json /tmp/claude-ask-$INVOC_ID.err
claude -p --permission-mode plan --output-format json --max-turns 1 \
"QUESTION. Return STRICT JSON with keys: answer, rationale, confidence, followups." \
> /tmp/claude-ask-$INVOC_ID.json 2>/tmp/claude-ask-$INVOC_ID.err; EC=$?; echo "Exit code: $EC"
Use the Bash tool's run_in_background parameter set to true (do NOT set timeout) in --json-file mode only.
--json-file mode/tmp/claude-ask-<INVOC_ID>.json/tmp/claude-ask-<INVOC_ID>.errrm -f /tmp/claude-ask-$INVOC_ID.json /tmp/claude-ask-$INVOC_ID.err
claude -p is the non-interactive entrypoint.--permission-mode plan keeps this review/read-only oriented.claude -p --resume <session-id>.