“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:
- Human-triggered: every run requires you to send something — it’s not unattended
- Intent-based: natural language, not command-line syntax
- Local execution: operations happen on your machine, in your file system
- Async feedback: results come back to WeChat — you don’t need to watch the screen
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:
- “Move” — relocates file, removes from source
- “Copy” — duplicates file, keeps source intact
- “Rename” — applies naming rule to files
- “Delete” (high risk, use carefully) — removes files
- “Zip/archive” — creates compressed archive
- “Unzip” — extracts archive
Query operations:
- “List” — enumerate files in a directory or matching criteria
- “Search/find” — locate files by name, content, or attributes
- “Count/summarize” — aggregate statistics
Generation operations:
- “Generate/write/create” — produce text content, document drafts
- “Format as” — restructure input into a specific format
Execution operations:
- “Run/execute” — trigger scripts or programs
The Importance of Scope
“Organize my folder” and “Organize ~/Documents/projects/2026-q2/” are very different. Without scope:
- Results may be overwhelming (too many files matched)
- QClaw may operate on unexpected directories
- Vague paths cause ambiguity errors
Best practice:
- Use absolute paths (
~/Desktop,/Users/yourname/Documents) - When unsure of the path, list the directory contents first, then operate
- 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/
Scenario 4: Cross-Directory Search
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:
- “List all files modified this month in ~/Projects/ and ~/Desktop/, sorted by date”
- (After confirming the list) “Copy project files (.docx, .pdf, .xlsx) from that list to ~/archive/2026-05/projects/”
- (After confirming copy) “Copy image files from that list to ~/archive/2026-05/images/”
- (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:
- No terminal needed
- Trigger remotely while away from desk
- Script can be complex; QClaw just needs to launch it
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
- Weekly cleanup: your standard file organization rules
- Monthly packaging: your archive format template
- Copy templates: prompts that reliably produce good drafts
- Search commands: your most-used query formats
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:
- Delete operations — irreversible if no backup
- Permission changes — can make system files inaccessible
- System directory operations — never let QClaw touch
/System,/Library, or equivalent Windows paths
Medium risk:
- Large batch moves — a wrong condition operating on hundreds of files has a large blast radius
- Script triggers — if the script has bugs, remote triggering means you might not catch the issue quickly
Low risk:
- Read-only queries (list, search) — no filesystem changes
- Copy operations — source preserved, reversible
- Text generation — no filesystem side effects
Safe Habits
- Move before delete: always use a temp folder as a buffer before permanently removing files
- Test on small sets first: try the command on 5 files before applying to 500
- Back up before bulk operations: if the targets are important files, one manual backup before running
- Never operate on directories you don’t understand: list contents first, every time
WeChat Account Safety
Beyond file safety:
- Don’t use QClaw to send bulk WeChat messages
- Don’t set high-frequency auto-triggers (multiple times per minute)
- Don’t expose your QClaw to commands from unknown accounts
These behaviors trigger WeChat’s anomaly detection. Account restrictions or bans follow.
Troubleshooting Common Issues
Command Sent, No Response
Possible causes:
- Computer went to sleep
- QClaw application crashed
- Network connection dropped
Steps:
- Confirm whether the computer is online (remote desktop check if available)
- Restart the QClaw application on your desktop
- Resend — once, after confirming the app is running
Result Doesn’t Match Expectation
Possible causes:
- Command wasn’t specific enough
- File path was interpreted differently than intended
- Condition parsing missed your intent
Steps:
- Run a list command to confirm the target objects are correct
- Add more specific path and condition language
- Break the command into smaller steps to find the misparse
Execution Stops Partway
Possible causes:
- File with restricted permissions in the batch
- Target path doesn’t exist
- Insufficient disk space
Steps:
- Read the feedback message for the stop reason
- Address the cause (create the path, clear disk space, unlock the file)
- 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 →