跳到正文
TakoAPI
返回技能列表

claude-code-control

由 melichar-m 提供

CLI Utilities
817下载量由 clawskills.sh 提供
1星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

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

描述

该技能的功能

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.

何时使用

  • 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

示例工作流

输入

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

智能体
  1. 1

    Call launch() with the project directory path to open Terminal and start Claude Code

  2. 2

    Call send() with the command 'write tests for app.py' and a wait timeout

  3. 3

    Receive the result object containing a screenshot path and duration_ms

  4. 4

    Call saveSession() to write the full session log to a JSON file

  5. 5

    Call close() to exit Claude Code gracefully

输出

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

前置要求

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

安装

clawhub install melichar-m/claude-code-control

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接