From 4f982a522b485268843add2427ee3283f30f4360 Mon Sep 17 00:00:00 2001 From: Connor Rhodes Date: Wed, 29 Apr 2026 01:44:16 +0000 Subject: [PATCH] create new skill: log-work-expense --- log-work-expense/SKILL.md | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 log-work-expense/SKILL.md diff --git a/log-work-expense/SKILL.md b/log-work-expense/SKILL.md new file mode 100644 index 0000000..a6dc5f0 --- /dev/null +++ b/log-work-expense/SKILL.md @@ -0,0 +1,43 @@ +--- +name: log-work-expense +description: Log work expense receipts into MongoDB. Use when the user sends a receipt image (photo of a receipt) along with context about the expense, or says things like "log this expense", "record this receipt", "add this to my work expenses", "expense entry", or provides receipt details for work reimbursement tracking. +--- + +# Log Work Expense + +Log receipt images and expense details into the `wip.work_expenses` collection in MongoDB. + +## Trigger Phrases + +- "log this expense" +- "record this receipt" +- "add this to my work expenses" +- "expense entry" + +## Steps + +1. **Extract receipt info** — If the user sent an image, use the image tool to read the date, vendor, and amount from the receipt. If they only provided text, use that. + +2. **Upload the receipt image to S2** — If the user provided an image, upload it to S2 and get the public URL. If they only provided a file or no image, skip this step. + +3. **Insert into MongoDB** — Insert a document into `wip.work_expenses` with this structure: + +```json +{ + "file": "https://s2.connorrhodes.com/agent/{sha256}.{ext}", + "date": "YYYY-MM-DD", + "note": "Context the user provided about the expense" +} +``` + +- **file**: The S2 URL of the uploaded receipt image. Omit if no image was provided. +- **date**: The date from the receipt, formatted as YYYY-MM-DD. If no date is on the receipt, ask the user. +- **note**: Any context the user gave about the expense (what it was for, project, etc.). If they didn't provide context, ask what the expense was for. + +4. **Confirm** — Reply with a brief confirmation showing what was logged (date, note, and file link if applicable). + +## Notes + +- Use `uv run --with pymongo` for MongoDB scripts. +- Use the S2 upload endpoint from TOOLS.md for file uploads. +- If the user sends a receipt without context, log what you can read from the image and note that context is pending.