create new skill: log-work-expense
This commit is contained in:
parent
91d3d3476b
commit
4f982a522b
1 changed files with 43 additions and 0 deletions
43
log-work-expense/SKILL.md
Normal file
43
log-work-expense/SKILL.md
Normal file
|
|
@ -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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue