Clawshier
by @fdocr
Process receipt or invoice images into structured expenses and log them to Google Sheets. Use when the user wants to scan, log, track, or record an expense f...
clawhub install clawshierπ About This Skill
name: clawshier description: Process receipt or invoice images into structured expenses and log them to Google Sheets. Use when the user wants to scan, log, track, or record an expense from a receipt or invoice image, or when they provide a local file path to a receipt/invoice image. OCR uses OpenAI by default; set CLAWSHIER_VISION_PROVIDER=ollama to use local Ollama instead. metadata: {"openclaw":{"requires":{"env":["GOOGLE_SHEETS_ID","GOOGLE_SERVICE_ACCOUNT_KEY"]},"primaryEnv":"OPENAI_API_KEY"}}
Clawshier
Process a receipt or invoice image through a four-step pipeline, then reply with a short summary of what was added.
Input handling
--date YYYY-MM-DD.Workflow
Run the safe pipeline runner. If it fails, retry it up to 2 times before surfacing the error.
Primary path β Safe pipeline runner
Run:
node {baseDir}/scripts/run_pipeline.js --image
If the user explicitly provided a date, always pass it in ISO format:
node {baseDir}/scripts/run_pipeline.js --image --date 2026-03-25
This runner performs OCR β structure β validate/deduplicate β store internally using JSON files, not shell-interpolated pipeline strings.
It writes to:
MM-YY)Invoice Archive BreakdownSummaryIt also removes the default Sheet1 tab if present.
Handler compatibility note
The individual handlers still support stdin/stdout for testing, but when automating the skill, prefer scripts/run_pipeline.js or the handlers' --input-file/--output-file options instead of embedding untrusted receipt/LLM output into shell commands.
If OCR reports that the image is not a receipt or invoice, tell the user:
> I couldn't detect a receipt or invoice in that image. Could you try again with a clearer photo?
If the validator reports a duplicate, stop and tell the user:
> This receipt appears to already be logged (vendor, date, total match an existing entry). Skipping.
Success reply
After a successful run, reply in this format:
> Added expense: {vendor} β {total} {currency} on {date} ({category}). Row #{row} in your spreadsheet (tab {MM-YY}).
If the user explicitly asks for tracing/debugging/cost tracing, append a compact per-step trace summary using the last recorded trace file. Otherwise keep the normal success reply short.
Failure reply
If a step still fails after retries, say which step failed and include the error message.
Notes
{baseDir} exactly so the commands do not depend on the current working directory.--date YYYY-MM-DD instead of relying on same-day date inference.CLAWSHIER_VISION_PROVIDER=openai|ollama|auto (default: openai).auto tries local Ollama first and falls back to OpenAI. Set to ollama to force local-only OCR.CLAWSHIER_OLLAMA_MODEL, CLAWSHIER_OLLAMA_HOST, and CLAWSHIER_OLLAMA_MAX_DIMENSION to control the Ollama OCR backend.CLAWSHIER_TEST_MODE=1 is present in the environment, the handlers use local test fixtures and a local mock sheet store. Use that for safe smoke tests before touching real APIs.CLAWSHIER_TRACE=1 to record per-step timing/usage metadata to .clawshier-last-trace.json. Show that trace in chat only when the user explicitly asks for tracing/debugging/cost tracing.π Tips & Best Practices
{baseDir} exactly so the commands do not depend on the current working directory.--date YYYY-MM-DD instead of relying on same-day date inference.CLAWSHIER_VISION_PROVIDER=openai|ollama|auto (default: openai).auto tries local Ollama first and falls back to OpenAI. Set to ollama to force local-only OCR.CLAWSHIER_OLLAMA_MODEL, CLAWSHIER_OLLAMA_HOST, and CLAWSHIER_OLLAMA_MAX_DIMENSION to control the Ollama OCR backend.CLAWSHIER_TEST_MODE=1 is present in the environment, the handlers use local test fixtures and a local mock sheet store. Use that for safe smoke tests before touching real APIs.CLAWSHIER_TRACE=1 to record per-step timing/usage metadata to .clawshier-last-trace.json. Show that trace in chat only when the user explicitly asks for tracing/debugging/cost tracing.