Skip to Content

Your First Automation

The fastest way to feel CMDOP is to take a recurring task you already do — by hand or by ad-hoc script — and turn it into something the agent can run with one command. This page walks two routes: a skill (a reusable named action) and a trigger (a scheduled run).

Pick something small

Good first candidates:

  • “Sweep the last hour of logs on vps-audi for errors.”
  • “Check disk usage on every prod machine and ping me if any is above 80 %.”
  • “Open a board issue when a build on mac-studio fails.”

The example below uses the first one.

Route A — a skill (reusable, on demand)

A skill is a small bundle: a skill.md manifest plus an entry script. The agent can invoke it as a sub-session.

1. Scaffold

On the laptop:

cmdop skills create log-sweep

That creates ~/.cmdop/skills/log-sweep/ with a skill.md template, a run.py stub, and a requirements.txt. It also opens skill.md in your $EDITOR.

2. Write the manifest

Replace the body of skill.md with something like:

--- name: log-sweep description: Tail recent logs on a target machine and summarize anything that looks unhealthy. version: 0.1.0 --- You are a log-triage assistant. When invoked, ask the user which machine to inspect (default: vps-audi). Then call `read_logs` (or `execute_command` with `tail`) to grab the last hour of `/var/log/syslog`. Group lines by severity. Surface anything that looks like an error, panic, or repeated warning. Be terse.

The frontmatter is metadata; the body is the system prompt the agent uses when running this skill.

3. Try it

cmdop run log-sweep

The agent enters a sub-session with that prompt as its system instructions, and full tool access. Tell it which machine to use; it will fan out as needed.

Inside a chat you can also ask the agent to run it:

“Run the log-sweep skill against vps-audi and mac-studio.”

4. Iterate

Edit ~/.cmdop/skills/log-sweep/skill.md. Re-run. There is no compile step.

If you want a Python helper to do parsing, add it to run.py; CMDOP auto-creates a venv from requirements.txt on first run. See Installing skills.

Route B — a trigger (scheduled, hands-off)

Triggers are scheduled prompts the daemon runs without a human in the loop.

1. Create the trigger

cmdop trigger create \ --name daily-log-sweep \ --schedule "0 9 * * *" \ --prompt "Run a log sweep against vps-audi for the last 24 hours. If you find errors, open a board issue summarizing them."

That registers a trigger that fires every day at 09:00 local time. The daemon’s trigger scheduler runs the prompt against the configured agent.

2. List and inspect

cmdop trigger list cmdop trigger logs daily-log-sweep --tail 20

The trigger’s runs land in the audit log too — you can cmdop permissions audit --tail 50 to see exactly what tools fired.

3. Stop or edit

cmdop trigger pause daily-log-sweep cmdop trigger resume daily-log-sweep cmdop trigger remove daily-log-sweep

Combining them

Skills and triggers compose. Schedule a trigger that runs your skill:

cmdop trigger create \ --name nightly-sweep \ --schedule "0 2 * * *" \ --prompt "Run the log-sweep skill against vps-audi. If anything is alarming, open a board issue and assign it to mac-studio."

Now you have one named action (log-sweep) you can run on demand and one schedule that runs it without you. Edit the skill, the schedule keeps using the new version.

What to do next

Browse and install community skills, not just write your own.

Fan out a single prompt across many machines and aggregate the answers.

Tighten what the agent may do during a scheduled run.

Workspaces, machines, share links — the next layer down.

Things to know

A scheduled trigger uses the same permission gate as an interactive prompt. If the gate is in default mode and asks a question, the trigger waits up to 60 s for an answer; if no UI is attached it denies. For unattended runs, prefer mode: strict plus explicit allow rules.

Skills and triggers can be powerful. Treat them like code — version-control them, review changes before letting them run unattended, audit their actions.

Last updated on