Workflow Automation Skill
Overview
Meta-skill for identifying, designing, and implementing automations in Hermes. Spot repetitive tasks, design the automation, choose the right tool (cron job, script, Hermes skill, delegate), implement, test, and document.
When to Use
- Automating a repetitive manual task
- Creating a script for a weekly workflow
- Setting up a scheduled (cron) job
- Building a Hermes skill for a triggered workflow
- Deciding whether to automate vs keep manual
- Documenting an automation for reuse
Body
1. Automation Decision Tree
Is this task repetitive?
├── No → Skip (do manually)
└── Yes → How often?
├── One-time batch → Write script (terminal or execute_code)
├── Scheduled (daily/weekly/monthly) → cron job (cronjob tool)
├── Triggered by user intent → Hermes skill (skill_manage create)
└── Complex multi-step reasoning → delegate_task (parallel subagents)
2. Automation Types & Tools
| Type |
Tool |
Best For |
When |
| One-shot script |
terminal or execute_code |
Import/export, transform, batch process |
Now |
| Scheduled task |
cronjob tool |
Daily reports, data collection, monitoring |
Recurring |
| Agent workflow |
Hermes skill |
Semantic trigger → structured output |
User-requested |
| Parallel processing |
delegate_task |
N independent subtasks concurrently |
Complex projects |
| File watcher |
cron + script |
Generate report when file changes |
Data pipelines |
3. Workflow Detection Checklist
Ask these 5 questions. If YES to 3+, it's automatable:
- Do you do this more than once a month?
- Does it follow the same steps each time?
- Are the inputs predictable (format, location)?
- Is the output well-defined (report, file, notification)?
- Does it take more than 5 minutes to do manually?
4. Automation Implementation Template
Step 1 — Define the workflow:
task: "Name"
trigger: "Time-based | File-change | User request"
input: "Data source, format, location"
steps:
- "1. Collect"
- "2. Transform"
- "3. Generate"
- "4. Deliver"
output: "Report, file, notification, dashboard update"
frequency: "One-time | Daily | Weekly | Monthly"
Step 2 — Choose tool:
- Data collection →
web_extract + terminal (curl)
- Data processing →
execute_code (Python/pandas)
- Output generation →
pdf, xlsx, docx, or markdown
- Delivery → Email (himalaya skill), webhook (curl), file save
Step 3 — Build & test:
- Write the script or skill content
- Run in dry-run mode first (no delivery, just verify output)
- Check error paths (what if API fails? file not found?)
Step 4 — Deploy & monitor:
- For cron:
cronjob(action='create', schedule=..., prompt=..., script=...)
- For skills:
skill_manage(action='create', name=..., content=...)
- Check first 3 runs for correctness
Step 5 — Document:
- Comment header in scripts with purpose, inputs, outputs
- If a skill, ensure description is accurate and tags are set
5. Error Handling Patterns
# Pattern: try/except with notification
try:
result = perform_automation()
notify("Success", result)
except Exception as e:
notify("FAILED", str(e))
# Don't leave the system in a broken state
rollback()
Always include:
- What happens on API failure
- What happens on missing input
- What happens on partial data
- Notification (success AND failure)
- Idempotency (running twice produces same result)
6. Automation Anti-Patterns
- Automating a broken workflow: Make sure the manual process works before automating it.
- No error handling: The automation will fail eventually. Handle it gracefully.
- Over-automating: Tasks with frequent exceptions are better manual.
- No documentation: A script without comments is a puzzle 6 months later.
- Silent failures: User discovers the problem before you do. Always notify on failure.
- No idempotency: Running twice should not produce duplicate results or errors.
Common Pitfalls
- Automating too early: Make sure the manual process is stable and well-understood first.
- Choosing the wrong tool: One-shot task → cron job wastes resources. Recurring task → one-shot script is unsustainable.
- No rollback plan: If the automation fails midway, the system should not be left in an inconsistent state.
- Hardcoded values: Every hardcoded path, API key, or email address is a maintenance trap. Use config files or env vars.
- Forgetting to monitor: Automations drift. Check first 3 runs, then sample monthly.
Verification Checklist
1---2name: workflow-automation-skill3description: Automation: identify tasks, design, implement.4license: MIT5---67# Workflow Automation Skill89## Overview10Meta-skill for identifying, designing, and implementing automations in Hermes. Spot repetitive tasks, design the automation, choose the right tool (cron job, script, Hermes skill, delegate), implement, test, and document.1112## When to Use13- Automating a repetitive manual task14- Creating a script for a weekly workflow15- Setting up a scheduled (cron) job16- Building a Hermes skill for a triggered workflow17- Deciding whether to automate vs keep manual18- Documenting an automation for reuse1920## Body2122### 1. Automation Decision Tree2324```25Is this task repetitive?26├── No → Skip (do manually)27└── Yes → How often?28 ├── One-time batch → Write script (terminal or execute_code)29 ├── Scheduled (daily/weekly/monthly) → cron job (cronjob tool)30 ├── Triggered by user intent → Hermes skill (skill_manage create)31 └── Complex multi-step reasoning → delegate_task (parallel subagents)32```3334### 2. Automation Types & Tools3536| Type | Tool | Best For | When |37|------|------|----------|------|38| **One-shot script** | terminal or execute_code | Import/export, transform, batch process | Now |39| **Scheduled task** | cronjob tool | Daily reports, data collection, monitoring | Recurring |40| **Agent workflow** | Hermes skill | Semantic trigger → structured output | User-requested |41| **Parallel processing** | delegate_task | N independent subtasks concurrently | Complex projects |42| **File watcher** | cron + script | Generate report when file changes | Data pipelines |4344### 3. Workflow Detection Checklist4546Ask these 5 questions. If YES to 3+, it's automatable:47481. Do you do this more than once a month?492. Does it follow the same steps each time?503. Are the inputs predictable (format, location)?514. Is the output well-defined (report, file, notification)?525. Does it take more than 5 minutes to do manually?5354### 4. Automation Implementation Template5556**Step 1 — Define the workflow:**57```yaml58task: "Name"59trigger: "Time-based | File-change | User request"60input: "Data source, format, location"61steps:62 - "1. Collect"63 - "2. Transform"64 - "3. Generate"65 - "4. Deliver"66output: "Report, file, notification, dashboard update"67frequency: "One-time | Daily | Weekly | Monthly"68```6970**Step 2 — Choose tool:**71- Data collection → `web_extract` + `terminal` (curl)72- Data processing → `execute_code` (Python/pandas)73- Output generation → `pdf`, `xlsx`, `docx`, or markdown74- Delivery → Email (himalaya skill), webhook (curl), file save7576**Step 3 — Build & test:**77- Write the script or skill content78- Run in dry-run mode first (no delivery, just verify output)79- Check error paths (what if API fails? file not found?)8081**Step 4 — Deploy & monitor:**82- For cron: `cronjob(action='create', schedule=..., prompt=..., script=...)`83- For skills: `skill_manage(action='create', name=..., content=...)`84- Check first 3 runs for correctness8586**Step 5 — Document:**87- Comment header in scripts with purpose, inputs, outputs88- If a skill, ensure description is accurate and tags are set8990### 5. Error Handling Patterns9192```python93# Pattern: try/except with notification94try:95 result = perform_automation()96 notify("Success", result)97except Exception as e:98 notify("FAILED", str(e))99 # Don't leave the system in a broken state100 rollback()101```102103**Always include:**104- What happens on API failure105- What happens on missing input106- What happens on partial data107- Notification (success AND failure)108- Idempotency (running twice produces same result)109110### 6. Automation Anti-Patterns111112- **Automating a broken workflow**: Make sure the manual process works before automating it.113- **No error handling**: The automation will fail eventually. Handle it gracefully.114- **Over-automating**: Tasks with frequent exceptions are better manual.115- **No documentation**: A script without comments is a puzzle 6 months later.116- **Silent failures**: User discovers the problem before you do. Always notify on failure.117- **No idempotency**: Running twice should not produce duplicate results or errors.118119## Common Pitfalls120121- **Automating too early**: Make sure the manual process is stable and well-understood first.122- **Choosing the wrong tool**: One-shot task → cron job wastes resources. Recurring task → one-shot script is unsustainable.123- **No rollback plan**: If the automation fails midway, the system should not be left in an inconsistent state.124- **Hardcoded values**: Every hardcoded path, API key, or email address is a maintenance trap. Use config files or env vars.125- **Forgetting to monitor**: Automations drift. Check first 3 runs, then sample monthly.126127## Verification Checklist128129- [ ] Task passes the automation test (repetitive, predictable, defined output)130- [ ] Tool selected (script/cron/skill/delegate) with rationale131- [ ] Implementation built and tested in dry-run mode132- [ ] Error handling for all failure modes (API, input, partial data)133- [ ] Notification on success AND failure134- [ ] Documented (comments, skill description, tag)135- [ ] First 3 runs monitored for correctness136- [ ] Rollback/remediation plan documented