← 返回 Skills 市场
fdocr

Clawshier

作者 fdocr · GitHub ↗ · v0.1.5 · MIT-0
cross-platform ⚠ suspicious
623
总下载
0
收藏
1
当前安装
15
版本数
在 OpenClaw 中安装
/install clawshier
功能描述
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...
使用说明 (SKILL.md)

Clawshier

Process a receipt or invoice image through a four-step pipeline, then reply with a short summary of what was added.

Input handling

  • If the user provides a local file path to the image, use that path directly.
  • If the user sends an image in chat and a local attachment path is available, use that path.
  • If no local file path is available for the image, ask the user to resend it as a file or provide a path you can execute against.
  • If the user explicitly gives the receipt date, preserve it and pass it to step 3 with --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 \x3Cpath_to_image>

If the user explicitly provided a date, always pass it in ISO format:

node {baseDir}/scripts/run_pipeline.js --image \x3Cpath_to_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:

  • the monthly expense tab (MM-YY)
  • Invoice Archive Breakdown
  • Summary

It 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

  • Use {baseDir} exactly so the commands do not depend on the current working directory.
  • For old invoices, prefer --date YYYY-MM-DD instead of relying on same-day date inference.
  • OCR backend selection is machine-level: 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.
  • Use CLAWSHIER_OLLAMA_MODEL, CLAWSHIER_OLLAMA_HOST, and CLAWSHIER_OLLAMA_MAX_DIMENSION to control the Ollama OCR backend.
  • When 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.
  • Optional tracing: set 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.
安全使用建议
This package appears to do what it says: it OCRs invoice/receipt images (via OpenAI by default or a local Ollama host) and appends structured rows to a Google Sheet. Before installing, ensure you: 1) provide a path to a Google service account JSON (GOOGLE_SERVICE_ACCOUNT_KEY) and the spreadsheet ID (GOOGLE_SHEETS_ID); 2) are comfortable that image bytes and extracted text will be sent to OpenAI (OPENAI_API_KEY) unless you force a local Ollama provider; 3) understand the skill will manage sheet tabs and may delete the default 'Sheet1' on first write; 4) run npm install in the skill directory (package.json present) and inspect the .env file used by dotenv; and 5) test in CLAWSHIER_TEST_MODE=1 to use local fixtures before pointing at real spreadsheets or keys. If you want additional assurance, review the included files (especially lib/visionOcr.js and lib/googleSheets.js) and confirm the GOOGLE_SERVICE_ACCOUNT_KEY points to a local file you control rather than embedding raw credentials in environment variables you don't trust.
功能分析
Type: OpenClaw Skill Name: clawshier Version: 0.1.5 The clawshier skill is a well-architected receipt processing pipeline that extracts data from images using OCR (OpenAI or local Ollama) and logs it to Google Sheets. The code demonstrates security consciousness by using a dedicated pipeline runner (scripts/run_pipeline.js) and structured JSON I/O (lib/io.js) to prevent shell injection vulnerabilities when passing data between steps. It includes legitimate features like execution tracing (lib/trace.js), automated deduplication via SHA-256 fingerprinting (lib/hashing.js), and comprehensive unit tests, with no evidence of malicious intent or unauthorized data exfiltration.
能力标签
cryptorequires-wallet
能力评估
Purpose & Capability
Name/description (receipt/invoice OCR → structured expense → Google Sheets) align with required env vars (GOOGLE_SHEETS_ID, GOOGLE_SERVICE_ACCOUNT_KEY) and primary credential (OPENAI_API_KEY). The code uses OpenAI for OCR/structuring and Google Sheets APIs for persistence, which is proportionate to the stated purpose.
Instruction Scope
SKILL.md instructs running the included Node pipeline and handlers, prefers the safe runner over shell pipes, and documents optional tracing/test modes. Runtime behavior reads local image files, reads .env, posts image data to OpenAI (or to a local Ollama host if configured), and writes trace/mock DB files locally. There are no instructions to read unrelated system credentials or exfiltrate data to unexpected endpoints.
Install Mechanism
The registry lists no automated install spec, but the bundle includes package.json and source files that require npm dependencies (openai, googleapis, dotenv). That means the skill expects a Node.js environment and a manual npm install step (per README). No downloads from arbitrary URLs or suspicious installers are present.
Credentials
Required env vars are proportional: GOOGLE_SHEETS_ID and GOOGLE_SERVICE_ACCOUNT_KEY are needed to access the target spreadsheet; OPENAI_API_KEY (declared as primary) is needed for OCR/LLM structuring. Other env vars referenced (CLAWSHIER_*, OPENAI_MODEL, etc.) are optional configuration. No unrelated secret tokens or multiple unrelated credentials are requested.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or global agent configuration. It writes local trace and test DB files (.clawshier-last-trace.json, .clawshier-test-db.json) and will modify the target Google Sheet (including deleting default 'Sheet1' on first run) — this is consistent with its stated purpose.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install clawshier
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /clawshier 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.5
Address vulnerability concerns
v0.1.4
Improved Summary tab, verbose mode added, and other small enhancements
v0.1.3
Default OCR provider openai
v0.1.2
Enhanced multi currency support
v0.1.1
- Added LICENSE file to the project. - Updated documentation for the "Structure" and "Validate" steps to clarify proper handling and passing of dates (date format, user-provided date, and normalization). - Emphasized not to modify the output between pipeline steps, especially regarding date handling. - Added more explicit instructions for handling user-provided dates in validation. - No code changes affecting functionality.
v0.1.0
- Adds date normalization and resolution in validation: ambiguous dates are compared to today's date and converted to YYYY-MM-DD format. - Supports an "old invoice" flow: if the user supplies a date (in YYYY-MM-DD format), it can be passed via --date for correct logging. - If the date cannot be resolved automatically, the validator now prompts the user to provide the date explicitly. - Core pipeline, deduplication, and spreadsheet storage steps remain unchanged.
v0.0.9
Enhancements to fingerprinting and date handling
v0.0.8
- Store step now writes to three Google Sheets tabs: Monthly sheet, Invoice Archive Breakdown, and a rebuilt Summary tab. - The Summary tab shows monthly totals, a line chart of expenses, bold headers, a frozen first row, and displays months sorted most recent first. - "Sheet1" (the default tab) is automatically deleted if it exists. - No source code changes; updates are reflected in documentation only.
v0.0.7
- Monthly expense sheets are now tabbed by MM-YY and created automatically per month if needed. - Duplicate validation now checks the matching monthly sheet tab based on the expense date. - All expense rows are also written to a persistent "Invoice Archive Breakdown" sheet, with one row per line-item. - Response message now includes the monthly tab name (MM-YY) where the expense was logged.
v0.0.6
- Switched Google Sheets integration from browser automation to API-based, using Google Service Account credentials. - Added new skills for Google Sheets API access and expense storage. - Validation step now checks for duplicates directly in Google Sheets instead of a local fingerprint file. - Updated required environment variables: now uses GOOGLE_SHEETS_ID and GOOGLE_SERVICE_ACCOUNT_KEY. - Streamlined pipeline steps and responses; successful entries report the row number in the spreadsheet. - Updated documentation to reflect new configuration, activation conditions, and pipeline process.
v0.0.5
- Updated the required environment variable for the spreadsheet from CLAWSHIER_GOOGLE_SHEETS_ID to CLAWSHIER_GOOGLE_SHEETS_URL. - Updated all usage instructions and references to use CLAWSHIER_GOOGLE_SHEETS_URL. - No changes to the skill logic, only documentation and setup environment variable.
v0.0.4
No user-visible changes in this release. - Version 0.0.4 released with no detected file or documentation updates.
v0.0.3
- Removed legacy Google Sheets integration and custom handler; storage now uses the browser tool for adding expenses to sheets. - Modified environment variables: replaced GOOGLE_SHEETS_ID with CLAWSHIER_GOOGLE_SHEETS_ID and dropped GOOGLE_SERVICE_ACCOUNT_KEY. - Deduplication now uses a local fingerprint store (`~/.clawshier/fingerprints.json`) instead of checking Google Sheets. - Updated validation, storage, and setup instructions to reflect new browser-based approach. - Cleaned up dependencies and removed unused modules.
v0.0.2
- Skill renamed from "receipt-expense-tracker" to "clawshier". - Updated all relevant documentation and metadata to reflect the new skill name. - No changes to pipeline logic or core functionality. - Dependencies updated in package files.
v0.0.1
Initial release of Receipt Expense Tracker. - Scan receipt or invoice photos via chat and extract expense data using OpenAI Vision. - Validates and deduplicates expenses before logging them to a Google Spreadsheet. - Provides users with a summary of each added expense or notifies them if a duplicate or invalid image is detected. - Supports robust error handling with automatic retries for each step. - Requires OpenAI and Google Sheets credentials for setup.
元数据
Slug clawshier
版本 0.1.5
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 15
常见问题

Clawshier 是什么?

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 623 次。

如何安装 Clawshier?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install clawshier」即可一键安装,无需额外配置。

Clawshier 是免费的吗?

是的,Clawshier 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Clawshier 支持哪些平台?

Clawshier 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Clawshier?

由 fdocr(@fdocr)开发并维护,当前版本 v0.1.5。

💬 留言讨论