supafax-inbox-triagelisted
Install: claude install-skill riteshkew/yc-skills
# Workflow
When this skill triggers, follow these steps in order.
## Step 1 — Locate the rules file
Check whether the user has specified a rules JSON path.
- If a path is provided, confirm the file exists and is readable.
- If no path is provided, ask: "Please provide the path to your rules JSON file. Each rule must have a `match` object (with optional `from`, `subjectContains`, `bodyContains`, `hasUnsubscribe` fields), an `action` (`reply` | `archive` | `unsubscribe` | `calendar` | `review`), and a `reason` string. See `examples/rules.json` for a working example."
- If the user has no rules, offer to generate starter rules based on their described inbox patterns before proceeding.
## Step 2 — Locate the inbox file
Check whether the user has specified an inbox JSON path.
- If a path is provided, confirm the file exists and contains at least one email object with `id`, `from`, `subject`, and `body` fields.
- If no path is provided, ask: "Please provide the path to your inbox JSON file. Each email must have `id`, `from`, `subject`, and `body` fields, plus an optional `hasUnsubscribe` boolean. See `resources/inbox.json` for a working example."
## Step 3 — Run the triage engine
Execute the triage engine from the skill root:
```bash
node scripts/triage.mjs <rulesFile> <inboxFile>
```
The engine outputs a Markdown report to stdout with:
- A per-email table: `id | from | subject | action | reason`
- A summary count per action
Capture stdout. If the process exits non-zero