AGENT SKILL

debug-with-user

Human-in-the-loop macOS debugging checkpoints. Use when automation needs a human to confirm UI state, report observations, or proceed through manual steps.

License 许可
MIT
所属仓库
xhd2015/agent-pro
最近更新
2026-11-12
Stars
★ 1
Forks
0

01 前言 Front Matter

name
debug-with-user
description
Human-in-the-loop macOS debugging checkpoints. Use when automation needs a human to confirm UI state, report observations, or proceed through manual steps.

02 资源文件 36

03 SKILL.md 正文

debug-with-user

Human-assisted debugging for macOS workflows. Automate everything scriptable; at checkpoints, ask the user via native dialogs and parse structured JSON answers.

When to use

  • /debug-with-user or explicit human-assisted debug requests
  • macOS UI steps that need confirmation (window opened, correct app focused, etc.)
  • After automation completes a step and you need a human report

Workflow

  1. Automate first — run every scriptable step (open apps, post notifications, etc.).
  2. Checkpoint — run debug-with-user ask with a clear title, message, and absolute paths.
  3. Parse JSON — read the single-line stdout object:
    • via == "button": use affirmed (true/false) for pass/fail semantics.
    • via == "free_text": treat answer as the user's report (Customize path).
  4. Exit codes — 0 answer, 1 dismissed/cancel, 2 error (e.g. non-macOS without dry-run).

CLI examples

debug-with-user ask \
  --title "Step 1 — Did VS Code open?" \
  --message "Project folder:\n/tmp/demo" \
  --option "Yes — window opened" \
  --option "No — window did not open" \
  --affirm "Yes — window opened" \
  --cancel "Cancel"

The CLI always appends a Customize button for free-text reports.

macOS display alert allows at most 3 buttons. The CLI keeps Customize and up to 3 options total (2 --option plus Customize). More than that exits with an error suggesting multi-step confirmation (no silent truncation). Every preset returns a normal answer (affirmed true/false); press Escape to dismiss without choosing.

Aliases: confirm (--yes / --no), proceed (--proceed / --cancel).

Install

If debug-with-user is not on PATH:

go install github.com/xhd2015/agent-pro/agents/debug-with-user@latest

CI / non-macOS

Real dialogs require macOS osascript. In CI, set DEBUG_WITH_USER_DRY_RUN=1 and stage responses with DEBUG_WITH_USER_DRY_RUN_BUTTON, DEBUG_WITH_USER_DRY_RUN_TEXT, or DEBUG_WITH_USER_DRY_RUN_DISMISSED=1.

JSON contract

Preset button:

{"answer":"Yes — window opened","via":"button","affirmed":true}

Customize (free text):

{"answer":"VS Code opened but wrong workspace","via":"free_text"}

04 同仓库更多 Skills

xhd2015
xhd2015/agent-pro

verify-with-prototype

Prototype-before-production workflow for risky host integrations (sudo, privileges, system config). Use when a feature touches the real OS, when behavior must be proven with a small script before full implementation, or when the user mentions prototype verification, POC script, or verify-with-prototype. Run after investigate/followup and before doctest-TDD integration.

★ 1
xhd2015
xhd2015/agent-pro

verify-on-behalf-of-user

Run human-style scenario verification after an agent claims work is done: git status, build into ~/.sandbox/bin (default sandbox mode) or opt-in host mode (outside sandbox: wrk --reinstall-local / change-scoped install), real integration/E2E scenarios (start servers, browser-agent for UI), always-labeled depth, markdown transcript written and inlined for review. Use for "verify on my behalf", before commit. Complements doctests; does not replace them. Load a sub-topic with: agent-pro skill --show verify-on-behalf-of-user/<topic>

★ 1
xhd2015
xhd2015/agent-pro

test-case-tree-design-expert

Use when the user wants a decision-tree style test case design with inherited setup and per-leaf assertions.

★ 1
xhd2015
xhd2015/agent-pro

test-case-design-expert

Use when the user wants comprehensive user-facing end-to-end test scenarios for a feature description.

★ 1
xhd2015
xhd2015/agent-pro

tdd-expert

Use when the user has a test-case-tree output and wants runnable Go tests plus stub implementation following Test-Driven Development.

★ 1
xhd2015
xhd2015/agent-pro

summarize-a-skill

Meta-skill: distill durable high-signal guidance (worked vs failed, wrong → correct, and anything else that quickens future similar tasks) into a brief reusable skill document with YAML frontmatter. When the user does not explicitly ask for a new skill/file, prefer updating an existing skill over creating one. Writes skills/<name>/SKILL.md (or docs|doc/skills/…). Use for /summarize-a-skill, "summarize what worked", "lessons learned into a skill", or "write a skill from this session".

★ 1