{
  "schemaVersion": "1.0",
  "item": {
    "slug": "invoice-collector",
    "name": "Invoice Collector",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/mintannn/invoice-collector",
    "canonicalUrl": "https://clawhub.ai/mintannn/invoice-collector",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/invoice-collector",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=invoice-collector",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/collect_invoices.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/invoice-collector"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/invoice-collector",
    "agentPageUrl": "https://openagent3.xyz/skills/invoice-collector/agent",
    "manifestUrl": "https://openagent3.xyz/skills/invoice-collector/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/invoice-collector/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Invoice Collector",
        "body": "Collect invoices from Gmail and send them as a summary email with all attachments."
      },
      {
        "title": "Puppeteer --no-sandbox Flag",
        "body": "This skill uses --no-sandbox when launching Puppeteer/Chromium. This is required in many environments:\n\nWSL (Windows Subsystem for Linux): Chrome sandbox requires kernel features not available in WSL1/WSL2\nDocker containers: Unless running with --privileged or specific seccomp profiles\nCI/CD environments: Most runners don't support Chrome's sandbox\n\nRisk: Disabling the sandbox means if a malicious HTML email were rendered, it could potentially execute code outside the browser context.\n\nMitigation: This skill only renders emails from your own Gmail inbox. The risk is limited to emails you've already received. If you're concerned, review emails before processing or run in an isolated environment."
      },
      {
        "title": "Installation via curl | tar",
        "body": "The gogcli installation example uses curl -sL ... | tar xz, which is a common pattern but carries supply chain risks if the source were compromised.\n\nSafer alternative (verify checksum):\n\n# Download and verify\ncurl -sLO https://github.com/steipete/gogcli/releases/latest/download/gogcli_linux_amd64.tar.gz\ncurl -sLO https://github.com/steipete/gogcli/releases/latest/download/checksums.txt\nsha256sum -c checksums.txt --ignore-missing\ntar xzf gogcli_linux_amd64.tar.gz\nmv gog ~/.local/bin/\n\nmacOS users: Use brew install steipete/tap/gogcli which handles verification automatically."
      },
      {
        "title": "1. Install gogcli",
        "body": "# Linux (download binary)\ncurl -sL https://github.com/steipete/gogcli/releases/latest/download/gogcli_linux_amd64.tar.gz | tar xz\nmv gog ~/.local/bin/\n\n# macOS\nbrew install steipete/tap/gogcli"
      },
      {
        "title": "2. Setup Google OAuth",
        "body": "Go to Google Cloud Console\nCreate project → Enable Gmail API\nCreate OAuth credentials (Desktop app)\nDownload JSON\n\ngog auth credentials ~/path/to/client_secret.json\ngog auth add your@gmail.com"
      },
      {
        "title": "3. Install Puppeteer (for email screenshots)",
        "body": "cd /tmp && npm install puppeteer"
      },
      {
        "title": "4. Install Japanese fonts (optional, for JP emails)",
        "body": "sudo apt install fonts-noto-cjk"
      },
      {
        "title": "Generic Invoice Search",
        "body": "Search for any invoice/receipt without specifying specific senders:\n\nexport GOG_ACCOUNT=\"user@gmail.com\"\nexport GOG_KEYRING_PASSWORD=\"your-password\"\n\n# Search all invoices in date range\ngog gmail search '(invoice OR receipt OR 請求書 OR 領収書 OR billing OR payment) after:2026/01/01 before:2026/02/01'\n\n# Search with specific criteria\ngog gmail search 'subject:(invoice OR receipt) has:attachment after:2026/01/01'"
      },
      {
        "title": "Workflow",
        "body": "Search - Find invoice emails\nDownload - Get PDFs or screenshot emails\nSummarize - Create summary with amounts\nSend - Email to destination with attachments"
      },
      {
        "title": "Step 1: Search Invoices",
        "body": "# All invoices from last month\nLAST_MONTH=$(date -d \"1 month ago\" +%Y/%m/01)\nTHIS_MONTH=$(date +%Y/%m/01)\ngog gmail search \"(invoice OR receipt OR 請求書 OR 領収書) after:$LAST_MONTH before:$THIS_MONTH\" --json"
      },
      {
        "title": "Step 2: Process Each Email",
        "body": "mkdir -p /tmp/invoices\n\nFor emails WITH PDF attachments:\n\n# Get message details\nMSG_ID=\"<message_id_here>\"\nEMAIL_JSON=$(gog gmail read $MSG_ID --json)\n\n# Find PDF attachment\nATTACH_INFO=$(echo \"$EMAIL_JSON\" | jq -r '.thread.messages[0].payload.parts[]? | select(.filename | test(\"\\\\.pdf$\"; \"i\")) | \"\\(.body.attachmentId)|\\(.filename)\"' | head -1)\nATTACH_ID=$(echo \"$ATTACH_INFO\" | cut -d'|' -f1)\nFILENAME=$(echo \"$ATTACH_INFO\" | cut -d'|' -f2)\n\n# Download\ngog gmail attachment $MSG_ID \"$ATTACH_ID\" --out \"/tmp/invoices/$FILENAME\"\n\nFor emails WITHOUT PDF (take screenshot):\n\nMSG_ID=\"<message_id_here>\"\n\n# Extract HTML\ngog gmail read $MSG_ID --json | node -e \"\nconst fs = require('fs');\nlet data = '';\nprocess.stdin.on('data', chunk => data += chunk);\nprocess.stdin.on('end', () => {\n  const json = JSON.parse(data);\n  const msg = json.thread.messages[0];\n  let html = '';\n  const findHtml = (p) => {\n    if (p.mimeType === 'text/html' && p.body?.data) {\n      html = Buffer.from(p.body.data, 'base64').toString('utf-8');\n    }\n    if (p.parts) p.parts.forEach(findHtml);\n  };\n  (msg.payload.parts || []).forEach(findHtml);\n  if (!html && msg.payload.body?.data) {\n    html = Buffer.from(msg.payload.body.data, 'base64').toString('utf-8');\n  }\n  fs.writeFileSync('/tmp/invoices/email.html', html || '<html><body>No content</body></html>');\n});\n\"\n\n# Screenshot\nnode -e \"\nconst puppeteer = require('puppeteer');\nconst fs = require('fs');\n(async () => {\n  const browser = await puppeteer.launch({ headless: 'new', args: ['--no-sandbox'] });\n  const page = await browser.newPage();\n  await page.setViewport({ width: 800, height: 1200 });\n  await page.setContent(fs.readFileSync('/tmp/invoices/email.html', 'utf-8'), { waitUntil: 'networkidle0' });\n  await page.screenshot({ path: '/tmp/invoices/receipt.png', fullPage: true });\n  await browser.close();\n})();\n\""
      },
      {
        "title": "Step 3: Extract Invoice Info",
        "body": "Parse email for sender, date, amount:\n\n# Get basic info from email\ngog gmail read $MSG_ID --json | jq '{\n  from: .thread.messages[0].payload.headers[] | select(.name==\"From\") | .value,\n  subject: .thread.messages[0].payload.headers[] | select(.name==\"Subject\") | .value,\n  date: .thread.messages[0].payload.headers[] | select(.name==\"Date\") | .value\n}'"
      },
      {
        "title": "Step 4: Send Summary Email",
        "body": "gog gmail send \\\n  --to \"recipient@example.com\" \\\n  --subject \"【$(date +%Y年%m月)】請求書まとめ\" \\\n  --body \"請求書・領収書を添付します。\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n📊 請求書まとめ\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n【添付ファイル】\n1. Invoice-001.pdf - Service A\n2. Receipt.png - Service B (メールスクショ)\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nこのメールは自動生成されました。\n\" \\\n  --attach /tmp/invoices/Invoice-001.pdf \\\n  --attach /tmp/invoices/Receipt.png"
      },
      {
        "title": "Example Prompts",
        "body": "Generic:\n\n\"先月の請求書を全部集めてまとめて送って\"\n\"invoiceで検索して今月届いた請求書をkeiri@company.comに転送して\"\n\"has:attachment receipt で検索して請求書集めて\"\n\nSpecific:\n\n\"AnthropicとVercelとAWSの請求書を集めて\"\n\"from:stripe の請求書を過去3ヶ月分まとめて\""
      },
      {
        "title": "Tips",
        "body": "Date format: YYYY/MM/DD for gog search\nPDF priority: Always prefer PDF attachments over screenshots\nJapanese fonts: Required for correct rendering of JP emails\nCleanup: rm -rf /tmp/invoices after sending\nCron: Set up monthly cron job for recurring collection"
      }
    ],
    "body": "Invoice Collector\n\nCollect invoices from Gmail and send them as a summary email with all attachments.\n\nSecurity Considerations\nPuppeteer --no-sandbox Flag\n\nThis skill uses --no-sandbox when launching Puppeteer/Chromium. This is required in many environments:\n\nWSL (Windows Subsystem for Linux): Chrome sandbox requires kernel features not available in WSL1/WSL2\nDocker containers: Unless running with --privileged or specific seccomp profiles\nCI/CD environments: Most runners don't support Chrome's sandbox\n\nRisk: Disabling the sandbox means if a malicious HTML email were rendered, it could potentially execute code outside the browser context.\n\nMitigation: This skill only renders emails from your own Gmail inbox. The risk is limited to emails you've already received. If you're concerned, review emails before processing or run in an isolated environment.\n\nInstallation via curl | tar\n\nThe gogcli installation example uses curl -sL ... | tar xz, which is a common pattern but carries supply chain risks if the source were compromised.\n\nSafer alternative (verify checksum):\n\n# Download and verify\ncurl -sLO https://github.com/steipete/gogcli/releases/latest/download/gogcli_linux_amd64.tar.gz\ncurl -sLO https://github.com/steipete/gogcli/releases/latest/download/checksums.txt\nsha256sum -c checksums.txt --ignore-missing\ntar xzf gogcli_linux_amd64.tar.gz\nmv gog ~/.local/bin/\n\n\nmacOS users: Use brew install steipete/tap/gogcli which handles verification automatically.\n\nPrerequisites & Setup\n1. Install gogcli\n# Linux (download binary)\ncurl -sL https://github.com/steipete/gogcli/releases/latest/download/gogcli_linux_amd64.tar.gz | tar xz\nmv gog ~/.local/bin/\n\n# macOS\nbrew install steipete/tap/gogcli\n\n2. Setup Google OAuth\nGo to Google Cloud Console\nCreate project → Enable Gmail API\nCreate OAuth credentials (Desktop app)\nDownload JSON\ngog auth credentials ~/path/to/client_secret.json\ngog auth add your@gmail.com\n\n3. Install Puppeteer (for email screenshots)\ncd /tmp && npm install puppeteer\n\n4. Install Japanese fonts (optional, for JP emails)\nsudo apt install fonts-noto-cjk\n\nUsage\nGeneric Invoice Search\n\nSearch for any invoice/receipt without specifying specific senders:\n\nexport GOG_ACCOUNT=\"user@gmail.com\"\nexport GOG_KEYRING_PASSWORD=\"your-password\"\n\n# Search all invoices in date range\ngog gmail search '(invoice OR receipt OR 請求書 OR 領収書 OR billing OR payment) after:2026/01/01 before:2026/02/01'\n\n# Search with specific criteria\ngog gmail search 'subject:(invoice OR receipt) has:attachment after:2026/01/01'\n\nWorkflow\nSearch - Find invoice emails\nDownload - Get PDFs or screenshot emails\nSummarize - Create summary with amounts\nSend - Email to destination with attachments\nStep 1: Search Invoices\n# All invoices from last month\nLAST_MONTH=$(date -d \"1 month ago\" +%Y/%m/01)\nTHIS_MONTH=$(date +%Y/%m/01)\ngog gmail search \"(invoice OR receipt OR 請求書 OR 領収書) after:$LAST_MONTH before:$THIS_MONTH\" --json\n\nStep 2: Process Each Email\nmkdir -p /tmp/invoices\n\n\nFor emails WITH PDF attachments:\n\n# Get message details\nMSG_ID=\"<message_id_here>\"\nEMAIL_JSON=$(gog gmail read $MSG_ID --json)\n\n# Find PDF attachment\nATTACH_INFO=$(echo \"$EMAIL_JSON\" | jq -r '.thread.messages[0].payload.parts[]? | select(.filename | test(\"\\\\.pdf$\"; \"i\")) | \"\\(.body.attachmentId)|\\(.filename)\"' | head -1)\nATTACH_ID=$(echo \"$ATTACH_INFO\" | cut -d'|' -f1)\nFILENAME=$(echo \"$ATTACH_INFO\" | cut -d'|' -f2)\n\n# Download\ngog gmail attachment $MSG_ID \"$ATTACH_ID\" --out \"/tmp/invoices/$FILENAME\"\n\n\nFor emails WITHOUT PDF (take screenshot):\n\nMSG_ID=\"<message_id_here>\"\n\n# Extract HTML\ngog gmail read $MSG_ID --json | node -e \"\nconst fs = require('fs');\nlet data = '';\nprocess.stdin.on('data', chunk => data += chunk);\nprocess.stdin.on('end', () => {\n  const json = JSON.parse(data);\n  const msg = json.thread.messages[0];\n  let html = '';\n  const findHtml = (p) => {\n    if (p.mimeType === 'text/html' && p.body?.data) {\n      html = Buffer.from(p.body.data, 'base64').toString('utf-8');\n    }\n    if (p.parts) p.parts.forEach(findHtml);\n  };\n  (msg.payload.parts || []).forEach(findHtml);\n  if (!html && msg.payload.body?.data) {\n    html = Buffer.from(msg.payload.body.data, 'base64').toString('utf-8');\n  }\n  fs.writeFileSync('/tmp/invoices/email.html', html || '<html><body>No content</body></html>');\n});\n\"\n\n# Screenshot\nnode -e \"\nconst puppeteer = require('puppeteer');\nconst fs = require('fs');\n(async () => {\n  const browser = await puppeteer.launch({ headless: 'new', args: ['--no-sandbox'] });\n  const page = await browser.newPage();\n  await page.setViewport({ width: 800, height: 1200 });\n  await page.setContent(fs.readFileSync('/tmp/invoices/email.html', 'utf-8'), { waitUntil: 'networkidle0' });\n  await page.screenshot({ path: '/tmp/invoices/receipt.png', fullPage: true });\n  await browser.close();\n})();\n\"\n\nStep 3: Extract Invoice Info\n\nParse email for sender, date, amount:\n\n# Get basic info from email\ngog gmail read $MSG_ID --json | jq '{\n  from: .thread.messages[0].payload.headers[] | select(.name==\"From\") | .value,\n  subject: .thread.messages[0].payload.headers[] | select(.name==\"Subject\") | .value,\n  date: .thread.messages[0].payload.headers[] | select(.name==\"Date\") | .value\n}'\n\nStep 4: Send Summary Email\ngog gmail send \\\n  --to \"recipient@example.com\" \\\n  --subject \"【$(date +%Y年%m月)】請求書まとめ\" \\\n  --body \"請求書・領収書を添付します。\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n📊 請求書まとめ\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n【添付ファイル】\n1. Invoice-001.pdf - Service A\n2. Receipt.png - Service B (メールスクショ)\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nこのメールは自動生成されました。\n\" \\\n  --attach /tmp/invoices/Invoice-001.pdf \\\n  --attach /tmp/invoices/Receipt.png\n\nExample Prompts\n\nGeneric:\n\n\"先月の請求書を全部集めてまとめて送って\"\n\"invoiceで検索して今月届いた請求書をkeiri@company.comに転送して\"\n\"has:attachment receipt で検索して請求書集めて\"\n\nSpecific:\n\n\"AnthropicとVercelとAWSの請求書を集めて\"\n\"from:stripe の請求書を過去3ヶ月分まとめて\"\nTips\nDate format: YYYY/MM/DD for gog search\nPDF priority: Always prefer PDF attachments over screenshots\nJapanese fonts: Required for correct rendering of JP emails\nCleanup: rm -rf /tmp/invoices after sending\nCron: Set up monthly cron job for recurring collection"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/mintannn/invoice-collector",
    "publisherUrl": "https://clawhub.ai/mintannn/invoice-collector",
    "owner": "mintannn",
    "version": "1.2.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/invoice-collector",
    "downloadUrl": "https://openagent3.xyz/downloads/invoice-collector",
    "agentUrl": "https://openagent3.xyz/skills/invoice-collector/agent",
    "manifestUrl": "https://openagent3.xyz/skills/invoice-collector/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/invoice-collector/agent.md"
  }
}