AgentSkillsCN

supervisor

监控被阻塞的工作人员,并协助及时响应。循环检查 ft 工作收件箱,列出被阻塞的员工,让你能够自然、高效地作出回应。

SKILL.md
--- frontmatter
name: supervisor
description: 'Monitor blocked workers and help respond to them. Loop checks ft work inbox, shows blocked workers, lets you respond naturally.'

<role>Worker Supervisor</role>

<purpose>Poll for blocked workers. Show their questions. Let human respond. Resume worker.</purpose>


Main Loop

On first invocation, check mode:

Step 0: Detect Auto-Mode (once at start)

bash
echo $SUPERVISOR_UNATTENDED

If output is 1 or non-empty: AUTO-MODE — skip all AskUserQuestion calls, use defaults. If output is empty: ATTENDED MODE — interactive, ask user for input.

Store this mode for the entire session. Do not re-check.


Then run this loop:

Step 1: Check Inbox

bash
ft work inbox --json

Parse the JSON array. Each item has:

  • task_id: Worker ID
  • task_title: Task name
  • pending_question: What they're blocked on
  • age_seconds: How long blocked

Step 2: If No Blocked Workers

If AUTO-MODE (from Step 0):

code
Show: "No blocked workers. Exiting."
End skill (no loop, no question)

Otherwise (attended mode):

code
Show: "No blocked workers. Checking again in 30 seconds..."

Wait 30 seconds (just tell user, don't actually sleep)

Ask: "Check again now, or exit?"
  - "Check again" → Step 1
  - "Exit" → End skill

Step 3: If Blocked Workers Exist

For each blocked worker, show:

code
───────────────────────────────────────
BLOCKED: #[task_id] — [task_title]
Waiting: [age in minutes]m

Q: [pending_question]
───────────────────────────────────────

If AUTO-MODE (from Step 0):

  • Skip AskUserQuestion entirely
  • Use default response: "Continue working on the task. Try a different approach if stuck."
  • Resume worker with ft work resume [task_id] -m "[response]"
  • Return to Step 1 (check inbox again for new blocks)

Otherwise (attended mode):

Ask:

code
AskUserQuestion:
  question: "How do you want to respond to #[task_id]?"
  header: "Response"
  options:
    - label: "Continue"
      description: "Tell worker to keep trying"
    - label: "Skip for now"
      description: "Come back to this one later"

If user selects an option: Map to response message. If user types custom text: Use that as the response.

Step 4: Resume Worker

bash
ft work resume [task_id] -m "[response message]"

Show: "Resumed #[task_id]"

Return to Step 1.


Response Mappings

SelectionMessage
Continue"Continue working on the task. Try a different approach if stuck."
Skip for now(don't resume - just move to next worker)
Custom textUser's exact input

Rules

  1. Always check inbox first — don't ask what to do, just check
  2. Oldest first — workers sorted by age, address oldest first
  3. Custom text is the response — no reformatting, no prefixes
  4. Loop forever (attended mode) — only exit when user explicitly says "exit" or "quit" (auto-mode exits when inbox empty)
  5. Brief output — no explanations, just worker info and questions