mac-terminal

mac-terminal is a skill for Claude Code, Codex from leionion/ClawForge. It costs 66 tokens per session (289 once invoked), scanned B, original, Apache-2.0.

A macOS automation tool that opens Terminal.app and runs shell commands in a new or existing Terminal window.

In plain words
What is it for?
It is for opening Terminal, running command-line tasks, launching commands in a Terminal window, and executing sudo commands on macOS.
Why use it?
It removes the need to switch to Terminal and type commands manually. It can also enter a sudo password when macOS Accessibility permission allows it.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/leionion/clawforge/mac_terminal
Any agent
npx skills add leionion/ClawForge --skill mac_terminal
Clone the repo
git clone --depth 1 https://github.com/leionion/ClawForge

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mac-terminal

README.md
[![agentmods](https://agentmods.dev/badge/skills/leionion/clawforge/mac_terminal.svg)](https://agentmods.dev/skills/leionion/clawforge/mac_terminal)
Your own site
<a href="https://agentmods.dev/skills/leionion/clawforge/mac_terminal"><img src="https://agentmods.dev/badge/skills/leionion/clawforge/mac_terminal.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 289 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00066 $0.00289
Opus 5 $0.00033 $0.00144
Sonnet 5 $0.00013 $0.00058
Haiku 4.5 $0.00007 $0.00029

Measured 4d ago against content hash ff85b1873784, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

mac-terminal scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (mac_terminal.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

description: "Opens macOS Terminal.app and executes a shell command in a new or existing window, with optional automatic sudo password entry via System Events. Use when the user asks to open a terminal, run a shell comma
skills/05-Interaction/mac_terminal/SKILL.md · 40 lines

What it actually says

mac-terminal — macOS Terminal Automation

Opens Terminal.app and executes shell commands via AppleScript, with optional automatic password entry for sudo commands.

Usage

# Open Terminal and run a command
python3 mac_terminal.py "命令"

# Run a sudo command with automatic password entry (requires Accessibility permission)
python3 mac_terminal.py "sudo 命令" "密码"

Examples

# Check version
python3 mac_terminal.py "openclaw-cn --version"

# Restart a service
python3 mac_terminal.py "openclaw-cn gateway restart"

How it works

  • Activates or opens Terminal.app via osascript
  • Executes the command in the frontmost Terminal window (or creates a new one)
  • If a password argument is provided, waits for the sudo prompt and types it via System Events keystroke simulation

Requirements

  • macOS with Terminal.app
  • Accessibility permission required for automatic password entry (System Preferences > Privacy & Security > Accessibility)
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 40 lines · 66 tokens per session scan B ff85b1873784

Subscribe to this mod's changes

mac-terminal is a skill published in the GitHub repository leionion/ClawForge (90 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 66 tokens to every session and 289 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.