
droid-control
Control terminal TUIs, browsers, and native desktop apps for testing, demos, QA, and computer-use tasks. Use when you need to operate an app, automate a CLI, record a demo, or capture proof.
- Installs
- 112
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/factory-ai/factory-plugins --skill droid-control- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads droid-control automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Droid Control
Automate terminals, browsers, and desktop apps. Route by the user's requested method first, then load only the mechanics and evidence stages needed.
Ground rules
- Real apps, real environments. Non-deterministic behavior (LLM responses, network latency, variable output) is expected. Handle it with
wait/wait-idle. Never substitute fixtures or mocked data. - Recover from evidence. After a failed or uncertain action, observe current state before retrying. Honor method constraints and permission boundaries; a refusal does not authorize another driver or broader target.
- Atoms are files, not skills. Read each routed atom with the Read tool at
${DROID_PLUGIN_ROOT}/skills/droid-control/atoms/<atom>/ATOM.md(index under Atoms); the Skill tool cannot load them. A bold atom name in this plugin's commands and atoms means that file. Atoms link their own references with paths relative to the atom file; read them on demand. Atom files are not expanded, so wherever one writes the DROID_PLUGIN_ROOT variable, substitute this plugin root:${DROID_PLUGIN_ROOT}(quote it in shell commands). Desktop-use does not require a separately installed cua skill. tctlowns recorded terminal sessions. It wrapsasciinema recaround the PTY; browser and desktop drivers own their separate lifecycles. Never calltuistory launchdirectly. ResolveTCTLto an absolute path only for terminal workflows or worker handoffs.- Isolate every run. Multiple droids may be filming simultaneously on the same machine. Session names and output paths share a global namespace (
/tmp/tctl-sessions/). At the start of every workflow, generate a run ID (RUN_ID=$(date +%s)-$$or similar) and use it as a prefix for all session names and a scoped temp directory for all output files:Never use bare session names likeRUN_ID="$(date +%s)-$$" RUN_DIR="$(mktemp -d /tmp/droid-run-${RUN_ID}-XXXXXX)" # Session names: -s ${RUN_ID}-before, -s ${RUN_ID}-after # Output paths: ${RUN_DIR}/before.cast, ${RUN_DIR}/after.cast-s demo,-s before,-s after— they will collide with concurrent runs. Separate names and paths do not isolate shared desktop focus or keyboard input. Keep one controller for a visible desktop.
Atoms
Each atom lives at ${DROID_PLUGIN_ROOT}/skills/droid-control/atoms/<atom>/ATOM.md.
| Atom | Scope |
|---|---|
| terminal-use | Terminal TUI driver: tuistory virtual PTY by default, true-input for real terminal proof |
| true-input | Real terminal emulator driver via a headless Wayland compositor or VM |
| browser-use | Web page and Electron app driver via agent-browser |
| desktop-use | Native GUI app driver via trycua cua-driver |
| droid-cli | Droid CLI target patterns, shortcuts, modes, and launch helpers |
| pty-capture | Ground-truth byte sequences from real terminal emulators |
| capture | Recording lifecycle for terminal and browser sessions |
| compose | Video assembly via the fframes renderer: title cards, layout, transitions, effects, and showcase polish |
| verify | Deliverable verification against commitments |
| showcase | Visual polish: window chrome, animations, and branded backgrounds |
Routing
Three independent lookups. Do all three, then read the union of atoms they produce.
1. Target route — what are you driving?
| Target | Read these atoms |
|---|---|
| User explicitly requests cua-only, native GUI input, or desktop control (including Electron) | desktop-use; method constraints override the defaults below |
Droid CLI (droid-dev, droid exec) | terminal-use + droid-cli |
| Other terminal TUI | terminal-use |
| Web page or Electron app | browser-use |
| Native desktop GUI app | desktop-use |
| Raw terminal byte sequences | terminal-use + pty-capture |
terminal-use selects the terminal backend behind ${DROID_PLUGIN_ROOT}/bin/tctl: tuistory by default, and it loads true-input when real terminal rendering or keyboard-encoding evidence is needed. Desktop-use includes compositor-specific guidance; inspect live Cua capabilities rather than assuming all Linux targets are X11-only or abandoning the user's chosen method.
2. Stage route — what does the workflow need?
Every workflow passes through stages. Load the atoms for each stage you'll use.
| Stage | Atom | When to read |
|---|---|---|
| Capture | capture | Recording, scripted multi-step evidence, or a demo/QA deliverable; ordinary desktop operation uses the driver's observe/verify loop |
| Compose | compose | When the deliverable is a produced artifact (video, annotated screenshots, comparison image) |
| Verify | verify | Formal proof, demo, or QA deliverable; every action still needs verification even without this stage |
3. Artifact route — does compose need polish tools?
Only relevant when compose is loaded.
| Artifact need | Also load |
|---|---|
| Showcase polish (window chrome, branded frame, cinematic background) | showcase |
| Effects and keystroke overlays | (compose handles this — they're fields in the Showcase props JSON) |
Workflow shape
Command (intent + commitments)
→ Target route (load driver atoms)
→ Capture (record / screenshot / byte-capture)
→ Compose (assemble deliverable, if needed)
→ Verify (check against commitments)
→ Report
Commands declare what to produce. Atoms own how.
Layout default
Default: single. One clip showing the target/final state. Pick this unless the deliverable is fundamentally a comparison.
| Case | Layout |
|---|---|
| Brand-new feature (no meaningful prior state) | single |
| Bug fix, single-clip proof of the working path | single |
| Walkthrough / tutorial / readme hero | single |
| Regression proof (broken vs fixed) | side-by-side |
| Behavior-preserving refactor (visual parity is the point) | side-by-side |
| User explicitly asks for a comparison | side-by-side |
Do not synthesize a "before" state to justify side-by-side. If there is no real baseline, use single.
Delegation
Keep short interactive desktop tasks in the parent: it owns observations, input, user permission waits, and cleanup. Delegate independent capture environments or rendering, not individual screenshots interleaved with another controller's input.
What to delegate
| Task | Delegate? | Why |
|---|---|---|
| Interactive shared desktop | NO — parent | One controller owns focus, snapshots, input, permission waits, and cleanup |
| Capture clip in an isolated terminal/browser environment | YES | Worker owns the complete interaction and recording lifecycle |
| Capture both clips (comparison layout) | YES, only with independent environments | Worktrees and session labels alone do not isolate a desktop |
| Showcase render | YES | Needs only props JSON, clip paths, output path. Runs render-showcase.sh (handles .cast conversion, per-render staging, fidelity profiles, longest-clip duration, cleanup) |
| Planning, interaction scripting | NO — parent | Requires PR context and editorial judgment |
| Layout and prop construction | NO — parent | Requires editorial decisions about effects, timing, labels |
| Verification | NO — parent | Requires commitment context |
| Single ffprobe / file-existence check | NO — inline | Too trivial for subagent overhead |
How to delegate
Step 0: Resolve paths and generate a run ID. Workers don't inherit ${DROID_PLUGIN_ROOT}. Resolve once, paste everywhere:
TCTL="$(realpath "${DROID_PLUGIN_ROOT}/bin/tctl")"
RENDER="$(realpath "${DROID_PLUGIN_ROOT}/scripts/render-showcase.sh")"
RUN_ID="$(date +%s)-$$"
RUN_DIR="$(mktemp -d /tmp/droid-run-${RUN_ID}-XXXXXX)"
Use ${RUN_DIR} for all output files (recordings, props, rendered video). Use ${RUN_ID}- as a prefix for all session names. Never use bare names like -s before or hardcoded paths like /tmp/before.cast.
Give workers exact commands with the resolved absolute paths — not abstract instructions, not tuistory, not ${DROID_PLUGIN_ROOT}. The parent does the thinking; the worker executes:
Task prompt for a capture worker:
"Run these commands in order. Report the output file path and any errors.
1. /abs/path/to/bin/tctl launch "droid-dev" -s 1712345678-42-before --backend tuistory \
--repo-root /abs/path/to/baseline/worktree \
--cols 120 --rows 36 --record /tmp/droid-run-1712345678-42-xxxx/before.cast \
--env FORCE_COLOR=3 --env COLORTERM=truecolor
2. /abs/path/to/bin/tctl -s 1712345678-42-before wait ">" --timeout 15000
3. /abs/path/to/bin/tctl -s 1712345678-42-before type "hello world"
4. /abs/path/to/bin/tctl -s 1712345678-42-before press enter
5. /abs/path/to/bin/tctl -s 1712345678-42-before wait-idle
6. /abs/path/to/bin/tctl -s 1712345678-42-before close"
Task prompt for a render worker:
"Run this command. Report the output file path and any errors.
/abs/path/to/scripts/render-showcase.sh \
--props /tmp/droid-run-1712345678-42-xxxx/showcase-props.json \
--output /tmp/droid-run-1712345678-42-xxxx/demo.mp4 \
/tmp/droid-run-1712345678-42-xxxx/before.cast /tmp/droid-run-1712345678-42-xxxx/after.cast"
Parallel capture pattern (comparison flows only)
Only applicable when the Layout default table selects side-by-side and the capture environments are independent. Serialize shared-desktop captures. For a single interactive desktop task, keep control in the parent.
For before/after comparison demos, launch both capture workers simultaneously:
1. Parent constructs the interaction script (identical for both branches)
2. Launch worker A: capture the baseline/reference branch with `--repo-root` set to that worktree
3. Launch worker B: capture the candidate/change branch with `--repo-root` set to that worktree
4. Wait for both to complete (TaskOutput)
5. Collect .cast paths from results
6. Continue to compose
Shared tooling
Terminal drivers use the unified tctl wrapper. Browser-use and desktop-use have their own CLIs (agent-browser, cua-driver) and do not use tctl.
Drivers can be combined in one workflow — e.g., tctl for a CLI and agent-browser for a web UI it interacts with.
Degraded-tail repro recipe (droid TUI)
Deterministic recipe for reproducing degraded transcript tails in the droid CLI — stranded live tool rows and queued steering messages — without waiting for a slow model turn. The trick: a slow PreToolUse hook pins a tool in its executing state for as long as you need.
-
Scratch project. Create a throwaway directory (never a real repo — the hook fires on every matching tool call) with a project-local hook that sleeps:
SCRATCH="$(mktemp -d /tmp/degraded-tail-XXXXXX)" mkdir -p "$SCRATCH/.factory" cat > "$SCRATCH/.factory/settings.json" <<'JSON' { "hooks": { "PreToolUse": [ { "matcher": "TodoWrite", "hooks": [{ "type": "command", "command": "sleep 120" }] } ] } } JSONPick a sleep long enough to interact mid-hook (60–180s) and a matcher for a tool the prompt will reliably trigger (
TodoWritefires on any multi-step ask). -
Launch with
--cwdpointed at the scratch project —--repo-rootstays on your dev worktree sodroid-devprovenance still records the code under test:$TCTL launch "droid-dev" -s ${RUN_ID}-tail --cwd "$SCRATCH" \ --repo-root /abs/path/to/dev/worktree --record ${RUN_DIR}/tail.cast -
Trigger the hook, then degrade the tail while the tool row shows executing:
- Interrupt mid-hook (
press escape) — strands the live tool row: it never resolves to a completed/canceled state in the transcript tail. - Steer mid-hook (
type "..."+press enter) — the steering message queues behind the executing tool instead of interleaving.
- Interrupt mid-hook (
Gotcha: dev-scope hook settings can silently disable project hooks. If the tool completes instantly, run /hooks in the session and check the "Hooks enabled" toggle before debugging the hook config itself.
Prerequisites
| Stage | Platform | Required | Optional |
|---|---|---|---|
| terminal-use (tuistory) | All | tuistory, asciinema, agg | tmux |
| true-input | Linux/Wayland | cage, wtype, Wayland terminal, /dev/dri/* | grim, wf-recorder |
| true-input | Windows (KVM) | libvirt, qemu, KVM VM with SPICE + SSH, DROID_VM_* env vars | virt-manager |
| true-input | macOS (QEMU) | qemu, socat, macOS VM with SSH, DROID_MAC_* env vars | — |
| browser-use | All | agent-browser (+ agent-browser install) | — |
| desktop-use | All | cua-driver in the intended graphical session; approved OS permissions | Documentation is bundled; no separate skill install |
| compose | All | ffmpeg, ffprobe, agg | — |
| showcase | All | Rust (stable), clang/libclang, libx264 | — |
Install commands
# tuistory driver + recording
npm install -g tuistory # virtual PTY driver
pip install asciinema # terminal recording (tctl wraps this)
cargo install --git https://github.com/asciinema/agg # .cast -> .gif converter (compose needs this)
# true-input driver (Linux/Wayland)
sudo apt-get install -y cage wtype # required: headless compositor + keystroke injection
sudo apt-get install -y grim wf-recorder # optional: screenshots + video recording
# agent-browser driver
agent-browser install # one-time: downloads bundled Chromium
# desktop-use: follow its setup instructions only if the binary
# is missing and installation is approved. No separate skill install.
# compose + showcase (video rendering)
sudo apt-get install -y ffmpeg # video processing (includes ffprobe)
sudo apt-get install -y clang libclang-dev libx264-dev # renderer build deps (macOS: xcode-select --install; brew install x264)
cargo build --release --manifest-path ${DROID_PLUGIN_ROOT}/fframes/Cargo.toml # renderer (render-showcase.sh also builds on first use)
FAQ
What does the droid-control skill do?
Control terminal TUIs, browsers, and native desktop apps for testing, demos, QA, and computer-use tasks. Use when you need to operate an app, automate a CLI, record a demo, or capture proof.
How do I install droid-control?
Run npx skills add https://github.com/factory-ai/factory-plugins --skill droid-control in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/droid-control/ (personal) or .claude/skills/droid-control/ (project).
Which AI agents can use droid-control?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is droid-control safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains droid-control?
It is published by factory-ai in factory-ai/factory-plugins, and it is an official skill from the maker of the technology it covers. It has 112 recorded installs.
More from factory-ai/factory-plugins
no-use-effect
factory-ai/factory-plugins
Enforce the no-useEffect rule when writing or reviewing React code. ACTIVATE when writing React components, refactoring existing useEffect calls, reviewing PRs with useEffect, or when an agent adds useEffect "just in case." Provides the five replacement patterns and the useMountEffect escape hatch.
human-writing
factory-ai/factory-plugins
Remove signs of AI-generated writing from text to make it sound more natural and human-written. Use when editing or reviewing any form of document including: markdown, technical docs, emails, blog posts, PRDs, or any dedicated writing content. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
simplify
factory-ai/factory-plugins
Open the skill to read its SKILL.md instructions.
frontend-design
factory-ai/factory-plugins
Open the skill to read its SKILL.md instructions.
visual-design
factory-ai/factory-plugins
Image generation and presentations. Use when: - User asks for images: logos, icons, app assets, diagrams, flowcharts, architecture diagrams, patterns, textures, photo edits, restorations - User needs a presentation or slide deck Covers nanobanana CLI for image generation and Slidev for presentations.
security-review
factory-ai/factory-plugins
Open the skill to read its SKILL.md instructions.
Popular testing & qa skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
grilling
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
migrate-to-shoehorn
mattpocock/skills
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.
run-train
lllllllama/rigorpilot-skills
Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.
test-driven-development
obra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
finishing-a-development-branch
obra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work