“Automation” sounds complex. With QClaw, it mostly means: things you’d normally do by sitting at your computer, handled by a WeChat command instead.

This guide goes from the basics of writing effective commands to using QClaw alongside scripts for more capable workflows.

Understanding QClaw’s Automation Model

Before the how-to: understand what this is.

QClaw’s automation is not scheduled background execution (that’s cron jobs). It’s: you send a command → AI parses intent → desktop executes → result returned to WeChat.

Key characteristics:

This model is well-suited for tasks where you know what you want but don’t want to spend time manually doing it, and you don’t need to be there when it runs.

Basics: Writing Effective Commands

Four Elements of a Good Command

Effective commands typically contain: target (what to operate on), action (what to do), condition (under what rules), expected result (what the outcome should look like).

Weak command: “Organize files” Strong command: “Move all .pdf files in ~/Desktop (target) to ~/Documents/pdf-archive/ (result), if a file with the same name exists, add today’s date as a suffix (condition).”

Not every command needs all four elements explicit, but the more specific you are, the more predictable the execution.

Common Action Verbs

Different actions have different execution characteristics:

File operations:

Query operations:

Generation operations:

Execution operations:

The Importance of Scope

“Organize my folder” and “Organize ~/Documents/projects/2026-q2/” are very different. Without scope:

Best practice:

  1. Use absolute paths (~/Desktop, /Users/yourname/Documents)
  2. When unsure of the path, list the directory contents first, then operate
  3. For unfamiliar directories, always list-before-operate

Basics: Common Automation Scenarios

Scenario 1: Routine File Cleanup

Desktop full of accumulated files:

Move all files on ~/Desktop that haven't been modified in 7 days, 
sorted by type: PDFs to ~/archive/by-type/pdfs/, 
Word docs to docs/, images to images/, everything else to others/

Manual: 20-30 minutes. Via QClaw: a few minutes.

Scenario 2: Project File Packaging

Weekly or monthly archiving:

Zip all files in ~/Projects/ClientA/ into ClientA-archive-2026-05.zip 
and place it in ~/archive/monthly/

Or staging files before a meeting:

Zip files in ~/Projects/meeting-prep/ into meeting-materials-0521.zip 
and put it on the Desktop

Scenario 3: Batch Rename

Inconsistently named exports or photos:

Rename all .jpg files in ~/Downloads/photos/ using the pattern 
"ClientName_Date_Number.jpg" where ClientName is WangXiao, 
date is today, number starts at 001

Or adding prefixes uniformly:

Add "DRAFT-" as a prefix to all .docx files in ~/Documents/drafts/

Finding scattered related files:

Search ~/Documents/ and ~/Desktop/ for files with "report" or "summary" 
in the filename, list results with name, location, and modified date, 
sorted by date descending

Scenario 5: Copy and Draft Generation

Need something written while away from the desk:

Write a professional email draft to a supplier explaining that contract 
signing is delayed until next week due to approval process, 
keep it under 200 words, polite but direct

Intermediate: Decomposing Complex Tasks

Why Complex Tasks Fail

A command with too many steps fails if any single step misinterprets. When it does, you don’t know which step went wrong.

The solution: break complex tasks into single-step commands, confirm each step, then proceed.

Decomposition Principles

One command, one action. “Search, organize, then zip” should be three commands.

Query before operate. For any move, delete, or rename, list the targets first. Confirm the list is correct, then execute.

Prefer reversible operations. “Move to a temp folder” beats “delete.” “Copy to destination” beats “move” when uncertain.

Expect feedback at each step. Ask for a confirmation message after each operation before sending the next command.

Complex Task Decomposition Example

Task: Archive this month’s work files

Broken into steps:

  1. “List all files modified this month in ~/Projects/ and ~/Desktop/, sorted by date”
  2. (After confirming the list) “Copy project files (.docx, .pdf, .xlsx) from that list to ~/archive/2026-05/projects/”
  3. (After confirming copy) “Copy image files from that list to ~/archive/2026-05/images/”
  4. (After confirming all backups complete) “Delete .tmp and .bak files from the original locations in that list”

More steps, but each is confirmable. If something goes wrong, you know exactly where.

Advanced: Combining QClaw with Scripts

The most powerful QClaw use case: combine it with pre-written scripts. QClaw receives your WeChat command and triggers the script.

Basic Script Triggering

You have a backup script at ~/scripts/backup.sh. Normally you open Terminal to run it.

With QClaw: send “Run the backup script” via WeChat. QClaw triggers the script. When done, it returns the output to WeChat. You never touched the terminal.

Benefits:

Script Design for QClaw Compatibility

Scripts that work well with QClaw share these traits:

1. Produce clear output. End with a summary line — “Backed up 47 files to ~/archive/2026-05” — so QClaw has something meaningful to return.

2. Single responsibility. One script, one purpose. Backup script just backs up. Cleanup script just cleans up.

3. Error handling. Catch and print errors rather than failing silently. When QClaw returns an error message, you know something needs attention.

4. Descriptive names. backup-documents.sh, clean-downloads.sh, compile-project.sh. Names that describe what they do.

Developer Use Cases

For developers, QClaw can function as a lightweight remote development assistant:

Remote build trigger: On-site with a client, need to kick off a build. Send “Run build script and return the result.” Your computer builds, the last few lines of stdout come back to WeChat. You can see at a glance whether it failed.

Remote log viewing: “Show me the last 50 lines of ~/logs/app.log, and if there are any lines with ERROR, send those specifically.”

Service restart: If your local dev server needs restarting, wrap it in a script and trigger via QClaw remotely.

Code snippet generation: “Generate a Python script that reads ~/data/input.csv, sorts the third column descending, and outputs to ~/data/sorted-output.csv.”

Advanced: Building a Personal Command Library

If you use QClaw regularly for certain tasks, maintain a personal command library: working commands saved and ready to reuse.

How to Build It

Simplest approach: use WeChat’s Favorites feature, add a “QClaw Commands” tag, save your working commands there.

When you need one: open Favorites, find the command, copy it, paste and modify the variables (date, filename, path), send.

Types Worth Saving

Iterating the Library

Commands evolve. After using them for a while, you’ll find some are imprecise, some can be merged. Periodically review and update. A good command library at 3 months looks different than on day one.

Safety Boundaries

Operation Risk Levels

High risk:

Medium risk:

Low risk:

Safe Habits

  1. Move before delete: always use a temp folder as a buffer before permanently removing files
  2. Test on small sets first: try the command on 5 files before applying to 500
  3. Back up before bulk operations: if the targets are important files, one manual backup before running
  4. Never operate on directories you don’t understand: list contents first, every time

WeChat Account Safety

Beyond file safety:

These behaviors trigger WeChat’s anomaly detection. Account restrictions or bans follow.

Troubleshooting Common Issues

Command Sent, No Response

Possible causes:

  1. Computer went to sleep
  2. QClaw application crashed
  3. Network connection dropped

Steps:

  1. Confirm whether the computer is online (remote desktop check if available)
  2. Restart the QClaw application on your desktop
  3. Resend — once, after confirming the app is running

Result Doesn’t Match Expectation

Possible causes:

  1. Command wasn’t specific enough
  2. File path was interpreted differently than intended
  3. Condition parsing missed your intent

Steps:

  1. Run a list command to confirm the target objects are correct
  2. Add more specific path and condition language
  3. Break the command into smaller steps to find the misparse

Execution Stops Partway

Possible causes:

  1. File with restricted permissions in the batch
  2. Target path doesn’t exist
  3. Insufficient disk space

Steps:

  1. Read the feedback message for the stop reason
  2. Address the cause (create the path, clear disk space, unlock the file)
  3. Resume from where execution stopped

QClaw automation doesn’t require programming skills or memorized syntax. It requires one skill: describing what you want clearly and specifically.

Start with simple queries and file operations. Learn how QClaw interprets your language. Then work up to more complex tasks and script integration. The automation library builds itself if you save what works.

Related: Full Workday Workflow with QClaw · 10 QClaw Tips · QClaw Download

Ready to try QClaw?

Install on desktop, send commands via WeChat, handle tasks remotely — anytime.

Download QClaw →