LaunchKit · 2026
Back to Skills

claude-code-control

Control Claude Code programmatically through visible Terminal.app windows on macOS.

1
817 downloads
by @melichar-m

Setup & Installation

openclaw skills install @melichar-m/claude-code-control

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install claude-code-control

Version History

v1.2.0Feb 22, 2026 - Version note by skill developer:

Fix exports, focus race condition, add route-task.js generic task router

What This Skill Does

Programmatically controls Claude Code through visible Terminal.app windows on macOS using AppleScript. Sends commands via keystrokes, captures screenshots of the Terminal window, and records full sessions with timestamped logs.

Controls Claude Code without a headless or API approach, keeping the Terminal window visible for monitoring while still enabling full programmatic automation.

When to use it

  • Automating repetitive Claude Code prompts across multiple projects
  • Recording Claude Code sessions for review or documentation
  • Running Claude Code in CI-like scripts without manual input
  • Capturing screenshots of Claude Code output for reports
  • Orchestrating Claude Code from a parent Node.js script

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: automate running Claude Code to write tests for a Python project

AGENT
  1. 1Call launch() with the project directory path to open Terminal and start Claude Code
  2. 2Call send() with the command 'write tests for app.py' and a wait timeout
  3. 3Receive the result object containing a screenshot path and duration_ms
  4. 4Call saveSession() to write the full session log to a JSON file
  5. 5Call close() to exit Claude Code gracefully
OUTPUT

Session JSON log saved to disk with timestamped commands and a Terminal window screenshot of the completed test-writing step

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

Claude Code installed and authenticatedAccessibility permissions granted for Terminal.app and Script Editor in macOS System Settings → Privacy & Security → Accessibility