AO Answer
Find and answer pending questions or approvals waiting in Orchestrator sessions.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/ao-answer-orchestratorinc/— the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Works for every skill.What this command does
- Makes a new, empty temporary folder.
- Downloads the skill's folder,
integrations/grok-bot/skills/ao-answer, fromgithub.com/OrchestratorInc/agent-orchestrator(branchmain), the GitHub repository it's listed from. You get the version that is there now, not a copy we keep. - Copies that folder to
~/.claude/skills/ao-answer-orchestratorinc/. - Deletes the temporary folder.
Installing runs none of the skill's files; it only downloads and copies them. When you later use the skill, Claude follows its SKILL.md and may run scripts that come with it. Read them first.
Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Find Orchestrator sessions that wait on the user, show each question or approval as tap-to-answer options, and send the answer back to that session, following ao-rules "Decisions" (default, away mode, standing approvals). Use for "what's waiting on me", "answer <session>", "approve it", the AO waiting check routine, and away mode.
What this skill does
Follow the ao-rules skill. Its "Decisions" section says who may answer. Answers go straight to the worker, not through the orchestrator: the user's pick must arrive exactly as given.
1. Find what's waiting
On every host, in parallel:
f(){ <aoapi helper>
aoapi GET 'sessions?active=true' | python3 -c '
import json,sys,time,calendar
now=time.time()
for s in json.load(sys.stdin)["sessions"]:
st=(s.get("activity") or {}).get("state"); t=(s.get("lastEventAt") or "")[:19]
if st in ("waiting_input","blocked"): print("W", s["id"])
elif st=="idle" and t and now-calendar.timegm(time.strptime(t,"%Y-%m-%dT%H:%M:%S"))<86400: print("I", s["id"], s.get("lastEventAt"))' |
while read -r k id at; do
if [ "$k" = W ]; then
aoapi GET "sessions/$id/conversation" | python3 -c '
import json,sys
d=json.load(sys.stdin); found=False
for a in d.get("activities") or []:
if a.get("activityKind") in ("approval","user_input") and a.get("status")=="pending":
found=True; print(json.dumps({"session":sys.argv[1],"kind":a["activityKind"],"requestId":a.get("requestId"),
"summary":a.get("summary"),"decisions":a.get("decisions") or (a.get("detail") or {}).get("decisions"),"detail":a.get("detail")}))
if not found: print(json.dumps({"session":sys.argv[1],"kind":"reply"}))' "$id" 2>/dev/null
else
aoapi GET "sessions/$id/history?offset=0&limit=1" | python3 -c '
import json,sys,re
t=(json.load(sys.stdin).get("turns") or [{}])[0]; r=(t.get("agentResponse") or "").strip()
if re.search(r"\?[\s*_`)\]]*$", r): print(json.dumps({"session":sys.argv[1],"kind":"reply","lastEventAt":sys.argv[2],"asked":r[-300:]}))' "$id" "$at" 2>/dev/null
fi
done; }; f
Each line is one thing waiting:
kind | What it is |
|---|---|
approval | Permission to run a command or change files. summary and detail.input say what; decisions are the options [{id, kind, label}] |
user_input | A question. detail.message asks it; detail.schema.properties are the fields, with choices in enum or oneOf |
reply | The agent asked in plain text: a session that waits with no request (or a terminal session), or an idle session from the last 24 hours whose last reply ends with a question (asked holds its end). Read its last reply (ao-status "One session in detail") |
In the AO waiting check routine: keep what you already showed in ~/.ao-grok/shown.txt on via, one line per item (<host> <session> <requestId>, or <host> <session> reply <lastEventAt> for a reply), and message only about new items. Send nothing when nothing new is waiting.
2. Show it
Per session, one short briefing first: <host>/<session> and its name, what it is doing, and what it asks, in one or two sentences. Don't recommend anything. Then:
approval: the command or change verbatim, the risk you judge (ao-rules), and thedecisionslabels exactly as options in one card. Mark a decision whosekindisallow_alwaysas "changes this agent's permissions for good".user_input: one card with every question in it, in order (the card pages through them). A field withoneOforenumis a question: use theoneOftitles orenumvalues as its options, exactly. A field whose_meta._askUserQuestionCustomAnswer.questionIdnames another field is that question's "Other" box: show it as a typed-answer option on that question, not as its own question. Any other free-text field is a question with a typed answer.detail.inputModeurlcan't be answered from chat: tell the user to open Orchestrator.reply: the agent's question from its last reply, with options if it gave clear ones, else ask for a typed answer.
Several sessions at once: explain them together, then cards per session.
3. Answer
On the owner host, from its via computer:
- Approval:
aoapi POST "sessions/<id>/conversation/approvals/<requestId>/resolve" "$(python3 -c 'import json,sys; print(json.dumps({"decisionId":sys.argv[1]}))' '<decision id>')" - Question:
contentmaps each field name to the pick. For a picked option use itsoneOfconst(or theenumvalue), not the title. For a typed "Other" answer, put the text under the "Other" field (for examplequestion_0_custom) and leave its question out:aoapi POST "sessions/<id>/conversation/inputs/<requestId>/resolve" "$(python3 -c 'import json,sys; print(json.dumps({"action":"accept","content":json.loads(sys.argv[1])}))' '{"<field>":"<pick>"}')"The user says no or skip:{"action":"decline"}. - reply: send the answer as a message (ao-rules "Messages to agents"):
aoapi POST "sessions/<id>/send" "$(python3 -c 'import json,sys; print(json.dumps({"message":"[via Grok Bot] "+sys.argv[1],"userAuthored":True}))' '<answer>')"
Confirm in one line. An error that says the request is not pending or not found means it was already answered or closed: say so. Then run step 1 for that session again, and deal with anything still open.
Away mode
When memory says away mode is on and its end time hasn't passed, answer as ao-rules "Decisions" allows instead of showing cards, and log each one. Tell the user afterwards in one line per answer: session, what it asked, what you picked, why. Anything you may not decide: show it as in step 2, and say away mode left it for them.
Related skills
PDF Tools & Editing
anthropics
Read, merge, split, rotate, watermark, encrypt, and extract text from PDF files.
PowerPoint Slide Decks
anthropics
Create, edit, read, and extract content from PowerPoint presentations.
Slack GIF Creator
anthropics
Create animated GIFs optimized for Slack messages and emojis.
Honest Postmortem Analyzer
alirezarezvani
Analyze what went wrong in failures without blame to find real causes.