Macctl: Install, Source and Security | FunnelSlayer

Macctl

Published by lu-zhengda in macos-toolkit

Review recommended4 installs

What this skill does

This skill should be used when the user asks to "check battery status", "check CPU temperature", "set display brightness", "change screen resolution", "toggle Night Shift", "switch audio output", "set volume", "mute audio", "enable Do Not Disturb", "enable focus mode", "apply deep work preset", "set up for a meeting", "set up for a presentation", "save battery", "check thermal pressure", "what's preventing sleep", "list displays", "list audio devices", "check SSD health", "disk wear", "battery t

Add Macctl to your agent

Review the source and files first. When you are ready, copy the prompt instruction or use the CLI command supported by your environment.

Install with a prompt

Paste this into a compatible coding agent:

add this skill "macctl" from https://github.com/lu-zhengda/macos-toolkit

Install with the CLI

Run this command in a controlled environment after reviewing the repository:

npx skills add https://github.com/lu-zhengda/macos-toolkit --skill macctl

Skill instructions

macctl — macOS Environment Controller

Show power and environment status:

!macctl power status 2>&1 || echo "macctl not installed — brew install lu-zhengda/tap/macctl"

Analyze the output above. Report battery level, charging state, and health. Offer to check thermals with macctl power thermal, adjust display with macctl display, or apply a preset with macctl preset.

Commands — Power

CommandPurposeExample
macctl power statusBattery %, health, cycles, charging, time remainingmacctl power status
macctl power healthDesign vs max capacity, condition, agemacctl power health
macctl power thermalCPU/GPU temp, thermal pressure, fansmacctl power thermal
macctl power assertionsWhat is preventing sleepmacctl power assertions
macctl power hogsTop energy consumersmacctl power hogs
macctl power historyBattery/thermal trends from persistent storemacctl power history --last 7d
macctl power recordCapture power snapshot (for lanchr agent periodic recording)macctl power record

Commands — Disk

CommandPurposeExample
macctl disk statusSSD health: model, wear level, SMART statusmacctl disk status
macctl disk ioCurrent read/write MB/s and IOPSmacctl disk io
macctl disk historySSD wear trends over timemacctl disk history --last 30d
macctl disk recordCapture disk health snapshot (for lanchr agent)macctl disk record

Commands — Events

CommandPurposeExample
macctl eventsPower-related events: wake, sleep, lid, thermal, power sourcemacctl events
macctl events --last <duration>Filter events by time windowmacctl events --last 1h
macctl events --type <type>Filter by event typemacctl events --type wake
macctl events --jsonJSON output for scriptingmacctl events --json

Event types: wake, sleep, lid, thermal, power_source

Events are automatically deduplicated — consecutive same-type events within 30s are collapsed with a count.

Commands — Display

CommandPurposeExample
macctl display listConnected displays with resolution, refresh, profilemacctl display list
macctl display resolutionGet current resolutionmacctl display resolution
macctl display resolution <WxH>Set resolutionmacctl display resolution 1920x1080
macctl display brightnessGet current brightnessmacctl display brightness
macctl display brightness <0-100>Set brightnessmacctl display brightness 70
macctl display nightshift [on|off]Toggle Night Shiftmacctl display nightshift on
macctl display truetone [on|off]Toggle True Tonemacctl display truetone on

Commands — Audio

CommandPurposeExample
macctl audio listList input and output devicesmacctl audio list
macctl audio outputGet current output devicemacctl audio output
macctl audio output <device>Switch audio outputmacctl audio output "AirPods Pro"
macctl audio inputGet current input devicemacctl audio input
macctl audio input <device>Switch audio inputmacctl audio input "MacBook Pro Microphone"
macctl audio volumeGet current volumemacctl audio volume
macctl audio volume <0-100>Set volumemacctl audio volume 50
macctl audio mute [on|off|toggle]Control mutemacctl audio mute toggle
macctl audio testPlay test tone and mic checkmacctl audio test

Commands — Focus

CommandPurposeExample
macctl focus statusCurrent focus mode and DnD statemacctl focus status
macctl focus on [mode]Enable a focus modemacctl focus on "Do Not Disturb"
macctl focus offDisable current focus modemacctl focus off
macctl focus listList configured focus modesmacctl focus list

Commands — Presets

CommandPurposeExample
macctl preset <name>Apply a compound presetmacctl preset deep-work

Compound Presets

Presets span all four domains in a single command:

PresetDisplayAudioFocusNotes
deep-workDim to 50%MuteDnD onMinimize distractions
meetingNo changeAirPods + unmuteDnD on (allow calls)Ready for calls
presentMirror 1080p, 100% brightnessSpeakersDnD onPresentation mode
chillDim to 40%, Night Shift onVolume 30%DnD offRelaxed evening
battery-saverDim to 30%MuteNo changeExtend battery life

Example workflow:

# Start a focused coding session
macctl preset deep-work

# Switch to a meeting
macctl preset meeting

# Done for the day
macctl preset chill

JSON Output

Add --json to any read command for machine-readable output:

macctl power status --json
macctl power thermal --json
macctl power history --json
macctl disk status --json
macctl disk io --json
macctl disk history --json
macctl events --json
macctl display list --json
macctl audio list --json
macctl focus status --json
macctl focus list --json

Safety Guidelines

  • Presets are reversible: Apply another preset or manually adjust individual settings
  • Brightness changes are immediate: Display brightness adjusts instantly
  • Audio routing affects all apps: Switching output device redirects all audio
  • Focus mode respects system config: Focus presets use modes configured in System Settings
  • Resolution changes may flash: Screen may briefly flash when changing resolution

TUI Mode

Launch macctl without arguments for an interactive environment dashboard.

Files included

  • SKILL.md