Token导航 LogoToken导航TokenDH.com
开发执行命令github未标认证来源可访问clear审计通过

financial-document-processor财务文件处理器

Agent Skill

financial-document-processor 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,341

周安装

57

GitHub Stars

93

下载量

470
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:financial-document-processor(财务文件处理器)
来源仓库:https://github.com/letta-ai/skills
仓库路径:skills/financial-document-processor
安装命令:
npx skills add https://github.com/letta-ai/skills --skill financial-document-processor
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/letta-ai/skills --skill financial-document-processor

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合围绕仓库状态进行整理。

  • 支持代码变更追踪与协作事项管理,便于项目进度把控。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装。
  • 安装前需确认权限范围、维护状态及是否触发网络或文件操作。
  • financial-document-processor 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Financial Document Processor

Overview

This skill provides guidance for extracting structured data from financial documents (invoices, receipts, statements, etc.) using OCR and PDF text extraction. It emphasizes data safety practices that prevent catastrophic failures from destructive operations.

Critical Data Safety Principles

NEVER perform destructive operations on source data without verification or backup.

Before any file processing:

  1. Create a backup of all source files before processing
  2. Work on copies, not originals
  3. Verify outputs match expectations before any cleanup
  4. Use atomic operations (copy → verify → delete) instead of direct moves

Safe File Operation Pattern

# CORRECT: Copy first, verify, then clean up
cp -r /source/documents/ /backup/documents/
# ... process files ...
# ... verify outputs match expectations ...
# Only after verification: rm /backup/documents/

# WRONG: Delete before moving (data loss risk)
rm -f /source/*.pdf && mv /source/* /dest/  # Files deleted before move!

Workflow

Step 1: Assess the Environment and Requirements

Before writing any processing code:

  1. List all source files and note their exact paths
  2. Identify file types (PDF text-based, PDF scanned, JPG, PNG, etc.)
  3. Check available tools: which tesseract, which pdftotext, python3 -c "import pypdf"
  4. Understand the expected output format (CSV columns, required fields, etc.)

Step 2: Create Backup

Always backup source files before any processing:

# Create timestamped backup directory
BACKUP_DIR="/tmp/backup_$(date +%Y%m%d_%H%M%S)"
mkdir -p "$BACKUP_DIR"
cp -r /path/to/source/documents/* "$BACKUP_DIR/"
echo "Backup created at: $BACKUP_DIR"

Step 3: Test Extraction on Sample Files

Before processing all documents:

  1. Select 2-3 representative files (different formats, edge cases)
  2. Test OCR/extraction on these samples
  3. Verify extracted values match visual inspection
  4. Adjust extraction logic based on sample results
# Test extraction on a single file first
sample_file = "/path/to/sample_invoice.pdf"
extracted_data = extract_document(sample_file)
print(f"Extracted: {extracted_data}")
# Manually verify these values match the document

Step 4: Handle Format Variations

Financial documents often have format variations:

  • Number formats: European (1.234,56) vs US (1,234.56)
  • Date formats: DD/MM/YYYY vs MM/DD/YYYY vs YYYY-MM-DD
  • Currency symbols: $, €, £, or spelled out
  • Empty/missing fields: VAT may be blank, not zero
def parse_amount(text):
    """Handle multiple number format conventions."""
    # Remove currency symbols and whitespace
    cleaned = re.sub(r'[$€£\s]', '', text)

    # Detect European format (comma as decimal separator)
    if re.match(r'^\d{1,3}(\.\d{3})*,\d{2}$', cleaned):
        cleaned = cleaned.replace('.', '').replace(',', '.')
    # US format (comma as thousands separator)
    elif ',' in cleaned:
        cleaned = cleaned.replace(',', '')

    return float(cleaned) if cleaned else None

Step 5: Process All Documents

After successful sample testing:

  1. Process documents one at a time with error handling
  2. Log extraction results for each document
  3. Collect all results before writing output file
results = []
errors = []

for doc_path in document_paths:
    try:
        data = extract_document(doc_path)
        results.append(data)
        print(f"✓ Processed: {doc_path}")
    except Exception as e:
        errors.append((doc_path, str(e)))
        print(f"✗ Failed: {doc_path} - {e}")

if errors:
    print(f"\nWarning: {len(errors)} documents failed to process")
    for path, error in errors:
        print(f"  - {path}: {error}")

Step 6: Verify Before File Operations

Before moving files or writing final outputs:

  1. Compare extracted record count to source file count
  2. Spot-check extracted values against source documents
  3. Verify output format matches requirements
# Verification checklist
assert len(results) == len(document_paths), "Record count mismatch"

# Spot-check a few values
for sample in random.sample(results, min(3, len(results))):
    print(f"Please verify: {sample['filename']} -> Total: {sample['total']}")

Step 7: Move Files (Only After Verification)

Only after verification passes:

# Move files to destination (not delete!)
for file in /source/documents/*.pdf; do
    mv "$file" /processed/
done

# Only remove backup after confirming processed files exist
ls /processed/*.pdf && rm -rf "$BACKUP_DIR"

Common Pitfalls

1. Destructive Commands Without Backup

Problem: Using rm or overwriting files before verifying success. Prevention: Always create backups first; use copy-verify-delete pattern.

2. Command Order in Shell Pipelines

Problem: rm -f *.pdf && mv *.pdf /dest/ - files are deleted before move. Prevention: Test commands on sample data; understand execution order.

3. Incomplete Script Verification

Problem: Running truncated or incomplete scripts on production data. Prevention: Verify script content before execution; test on samples first.

4. Fabricating Missing Data

Problem: Writing guessed values when extraction fails. Prevention: Report failures explicitly; use null/empty for missing values.

5. Premature Optimization

Problem: Immediately reprocessing when values look wrong without investigation. Prevention: First analyze OCR output and extraction logic issues without moving files.

6. PDF vs Image Handling

Problem: Using OCR on text-based PDFs or text extraction on scanned PDFs. Prevention: Check if PDF has extractable text before choosing extraction method.

def is_text_based_pdf(pdf_path):
    """Check if PDF contains extractable text."""
    from pypdf import PdfReader
    reader = PdfReader(pdf_path)
    for page in reader.pages:
        if page.extract_text().strip():
            return True
    return False

Verification Strategies

Pre-Processing Verification

  • Source files exist and are readable
  • Backup created successfully
  • Required tools installed (tesseract, pdftotext, pypdf)
  • Sample extraction produces reasonable values

Post-Processing Verification

  • Output record count matches input file count
  • No extraction errors occurred (or errors are documented)
  • Spot-checked values match source documents
  • Output format matches requirements (correct columns, types)
  • Files moved to correct destinations
  • Original backup preserved until final verification

Recovery Plan

If something goes wrong:

  1. Stop immediately - do not continue processing
  2. Restore from backup: cp -r "$BACKUP_DIR"/* /source/
  3. Investigate the failure before retrying
  4. Fix extraction logic on samples before reprocessing all files

Tool Selection Guide

File TypePrimary ToolFallback
Text-based PDFpypdf, pdftotext-
Scanned PDFtesseract (after pdf2image)pypdf
JPG/PNG imagestesseract-
Mixed PDF (text + scans)pypdf first, tesseract for image pages-

Install dependencies:

# System packages
apt-get install tesseract-ocr poppler-utils

# Python packages
pip install pypdf pytesseract pdf2image pillow

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

25.42%
按下载量换算119

Gemini CLI

22.37%
按下载量换算105

Antigravity

18.49%
按下载量换算87

Codex

13.32%
按下载量换算63

OpenCode

8.23%
按下载量换算39

windsurf

3.11%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/letta-ai/skills --skill financial-document-processor;npx skills add letta-ai/skills --skill "financial-document-processor" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills