runSkillCli function

Future<int> runSkillCli(
  1. List<String> args
)

CLI adapter for fdb skill [<topic>].

Without a topic, prints the core skill file (install, fdb_helper setup, and the full command index with routing to sub-topics).

With a topic, prints the corresponding sub-document: launch — Devices, launch, doctor, reload, restart, status, kill, deeplink interact — Screenshot, describe, tap, input, scroll, swipe, tree, and more data — SharedPreferences, clean, ext, grant-permission diagnostics — Logs, syslog, crash-report, websocat fallback, debugging tips memory — Heap inspection, forced GC, heap snapshots simulator — iOS simulator: appearance, text-size, location, push, defaults

Output contract: File found → stdout: full file contents (no trailing newline added), exit 0 Core file missing → stderr: ERROR: SKILL.md not found, exit 1 Unknown topic → stderr: ERROR: Unknown skill topic: topic, exit 1

Implementation

Future<int> runSkillCli(List<String> args) => runSimpleCliAdapter(
      args,
      _execute,
      helpText: '''Usage: fdb skill [<topic>]

Prints the AI agent skill documentation to stdout.

Without a topic, prints the core skill with install instructions, fdb_helper
setup, and the full command index. Use this first in any fdb session.

Available topics:
  launch       Devices, launch, doctor, reload, restart, status, kill, deeplink
  interact     Screenshot, describe, tap, input, scroll, swipe, tree, and more
  data         SharedPreferences, clean, ext (VM extensions), grant-permission
  diagnostics  Logs, syslog, crash-report, websocat fallback, debugging tips
  memory       Heap inspection, forced GC, heap snapshots
  simulator    iOS simulator: appearance, text-size, location, push, defaults

Examples:
  fdb skill               # core reference + command index
  fdb skill launch        # launch and session commands
  fdb skill interact      # UI interaction commands''',
    );