rivradev-recite

TotalClaw 作者 totalclaw

间隔重复记忆卡片:从笔记生成闪卡并安排复习计划。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~rivradev-recite
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~rivradev-recite/file -o rivradev-recite.md
## 概述(中文)

间隔重复记忆卡片:从笔记生成闪卡并安排复习计划。

## 技能正文

name: recite
description: AI 收据扫描 & 记账 automation. Process receipts, invoices, and PDFs. Extracts data to rename files and log transactions/expenses to CSV. Perfect for tax & accounting.
---

# Recite 🦞🤵

AI-driven receipt 记账 via the Recite Vision API. Use `recite-process` to scan a directory of receipts and PDF files, rename them based on extracted data, and log transactions to a CSV file.

## 设置 & Configuration

### 1. API Key
你可以 generate your Recite API key at: `https://recite.rivra.dev/settings/api`.

设置 the API key in your environment or configuration file:
- **Environment:** `export RECITE_API_KEY="re_live_YOUR_API_KEY"`
- **Config:** 创建 `~/.config/recite/config.json` with `{'api_key': "re_live_..."}`.

### 2. Dependencies
Ensure you have `python3`, `requests`, and `csv` installed.

## 操作规则

### 1. Mandatory API Key Pre-check
在…之前 performing any scanning, file manipulation, or 记账 tasks, 智能体 **MUST** verify if a valid Recite API key is available (via `RECITE_API_KEY` environment variable or `~/.config/recite/config.json`).
- **若 missing:** Immediately stop all other operations and instruct the user to obtain an API key from `https://recite.rivra.dev/settings/api` and provide it. 不要 attempt to list files or proceed with any part of the workflow until the key is confirmed.

### 3. Schema-Aware Bookkeeping
智能体 is designed to handle API response changes gracefully:
- **Dynamic Schema Evolution:** 若 the Recite API adds new information (new JSON fields), 智能体 will automatically add corresponding columns to your `记账_transactions.CSV` without losing existing data.
- **Data Integrity Protection:** 若 a field that was previously present in the CSV is missing from the current API response, 智能体 will skip saving that specific entry and warn the user, preventing data corruption or "shifted" columns.

## 工作流 & Features

1.  **Scan Folder:** 智能体 scans the specified folder for images (`.jpg`, `.jpeg`, `.png`) and `.pdf` files.
2.  **AI Extraction:** Calls the Recite API to extract `date`, `vendor`, `total`, `currency`, and `category`.
3.  **Smart Renaming:** Renames the file to `[date]_[vendor].[ext]` (e.g., `2024-05-20_Starbucks.jpg`).
4.  **Bookkeeping Log:** Appends the extracted data (Date, Vendor, Total, Currency, Category, Subtotal, Tax, Tip, Fees, Discounts, Description, Payment Method, Confidence, etc.) and filenames to `记账_transactions.CSV` in the target folder.
5.  **Status Report:** 提供 a summary of processed files and the CSV location.

## Long-Term Memory & Custom Logic

Modify `skills/recite/long_term_memory.md` to add persistent instructions for the agent. 智能体 will always read this file before processing.

Examples:
- "在…之后 processing, move all files to a sub-folder named `processed/`."
- "告警 me if any single receipt is over $500."
- "始终 categorize 'Amazon' as 'Software Services'."

## 工具用法

- **Command:** `python3 skills/recite/process_receipts.py <target_directory> skills/recite/`
- **Arguments:**
    - `<target_directory>`: The folder containing your receipts.
    - `skills/recite/`: The path to the skill folder (used to locate `long_term_memory.md`).

## Strategic Moat
- **Agent-First Consistency:** Guaranteed structured JSON output for financial data.
- **Tax-Ready Logic:** Intelligent categorization based on standard business practices.
- **Seamless 集成:** Built for the AI Agent economy (OpenClaw, Claude Code).