{
  "schemaVersion": "1.0",
  "item": {
    "slug": "fgo-invoicing",
    "name": "FGO Invoicing",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Maverick-AI-Tech/fgo-invoicing",
    "canonicalUrl": "https://clawhub.ai/Maverick-AI-Tech/fgo-invoicing",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/fgo-invoicing",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=fgo-invoicing",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "references/fgo-api.md",
      "references/invoice-example.json",
      "agents/openai.yaml",
      "scripts/fgo_cli.py",
      "SKILL.md"
    ],
    "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-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.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/fgo-invoicing"
    },
    "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/fgo-invoicing",
    "agentPageUrl": "https://openagent3.xyz/skills/fgo-invoicing/agent",
    "manifestUrl": "https://openagent3.xyz/skills/fgo-invoicing/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/fgo-invoicing/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": "FGO Invoicing",
        "body": "Use scripts/fgo_cli.py for deterministic FGO API calls instead of ad-hoc HTTP snippets."
      },
      {
        "title": "Workflow",
        "body": "Collect invoice input from the user.\nValidate payload locally before sending:\n\npython scripts/fgo_cli.py validate-payload --input references/invoice-example.json --show-payload\n\n\nDry-run to inspect the normalized payload (with computed Hash) without calling the API:\n\npython scripts/fgo_cli.py emit-invoice --input <invoice.json> --dry-run\n\n\nIssue final invoice after explicit user confirmation:\n\npython scripts/fgo_cli.py emit-invoice --input <invoice.json> --allow-final\n\n\nRetrieve invoice status, print link, or perform operations using the returned series and number:\n\npython scripts/fgo_cli.py get-status --serie <SERIE> --numar <NUMAR>\npython scripts/fgo_cli.py print-invoice --serie <SERIE> --numar <NUMAR>\npython scripts/fgo_cli.py cancel-invoice --serie <SERIE> --numar <NUMAR>\npython scripts/fgo_cli.py reverse-invoice --serie <SERIE> --numar <NUMAR>"
      },
      {
        "title": "Required Environment",
        "body": "Set these before calling FGO:\n\nFGO_COD_UNIC — company CUI (Romanian tax ID)\nFGO_CHEIE_PRIVATA — FGO private API key (from FGO → Setari → Utilizatori → Generate API user)\n\nOptional overrides:\n\nFGO_API_BASE (default: https://api.fgo.ro/v1) — use https://api-testuat.fgo.ro/v1 for testing\nFGO_PLATFORM_URL (default: unset) — your registered platform URL (FGO → Setari → eCommerce → Setari API). Required for invoice issuance from registered platforms; omitted if not set.\nFGO_TIMEOUT_SECONDS (default: 30)\nFGO_RETRIES (default: 2)\nFGO_DEBUG (default: unset) — set to 1, true, or yes to enable request/response debug logging to stderr"
      },
      {
        "title": "Command Guide",
        "body": "validate-payload\n\nParse and normalize payload; compute the authentication Hash.\nValidate minimum required structure before API calls.\nUse --show-payload to inspect the full normalized form-encoded payload.\n\n\nemit-invoice\n\nIssue invoice via POST /factura/emitere.\nRequires --allow-final to hit the real API.\nUse --dry-run first (prints normalized payload, no API call).\nPass --debug (or set FGO_DEBUG=1) to print full request/response to stderr.\n\n\nget-status\n\nGet invoice status (total value, amount paid, payments) via POST /factura/getstatus.\n\n\nprint-invoice\n\nGet a shareable print/download link via POST /factura/print.\n\n\ncancel-invoice\n\nCancel an invoice via POST /factura/anulare.\n\n\ndelete-invoice\n\nDelete an invoice via POST /factura/stergere.\n\n\nreverse-invoice\n\nCreate a storno (reversal) invoice via POST /factura/stornare.\n\n\nget-nomenclator\n\nFetch a nomenclature list (no auth required): tara, judet, tva, banca, tipincasare, tipfactura, tipclient, valuta."
      },
      {
        "title": "Authentication",
        "body": "FGO uses SHA-1 hash-based authentication embedded in every request body — no HTTP auth headers. The hash formula depends on the operation:\n\nInvoice issuance: SHA1(CodUnic + CheiePrivata + Client.Denumire).toUpperCase()\nInvoice operations (status/print/cancel/delete/storno): SHA1(CodUnic + CheiePrivata + Numar).toUpperCase()\n\nThe CLI computes hashes automatically. Never expose FGO_CHEIE_PRIVATA in logs."
      },
      {
        "title": "Payload Format",
        "body": "The invoice payload is a JSON object. The CLI converts it to form-encoded format (application/x-www-form-urlencoded) with bracket notation for nested fields, as required by the FGO API.\n\nBoth formats are accepted as input to the CLI:\n\nBare invoice object: { \"CodUnic\": \"...\", \"Client\": {...}, ... }\nWrapped: { \"invoice\": { \"CodUnic\": \"...\", \"Client\": {...}, ... } }\n\nThe CLI unwraps automatically, injects Hash and PlatformaUrl, then posts to FGO.\n\nSee references/invoice-example.json for the canonical minimal example and references/fgo-api.md for complete field documentation."
      },
      {
        "title": "Input File Safety",
        "body": "The --input argument is validated before any file is read:\n\nExtension check — only .json files are accepted. Passing /etc/passwd, ~/.ssh/id_rsa, or any non-JSON path raises an error immediately.\nPath confinement — the resolved path must be within the current working directory or a recognised OpenClaw media root (/tmp/openclaw, ~/.openclaw/workspace, etc.). Paths that escape these roots via ../ traversal or absolute references are rejected.\n\nAlways pass --input with a path to a file you created (e.g. a temp file written in the agent workspace). Never set --input to a path supplied by untrusted external content."
      },
      {
        "title": "Operational Rules",
        "body": "Always use --dry-run first to confirm the normalized payload before hitting the API.\nFGO responses use HTTP 200 even for errors — always check Success: true in the response.\nTreat invoice issuance as a high-impact action requiring explicit user confirmation.\nNever parallelize FGO API calls — make all requests sequentially to avoid deadlocks.\nInvoice issuance has a 15-second server-side timeout. If Success: false with a timeout message, the invoice was NOT issued — retry.\nStore the returned Numar verbatim as the exact string (may be zero-padded, e.g. \"001\"). Never strip leading zeros or cast to integer.\nUse the UAT environment (--base-url https://api-testuat.fgo.ro/v1) for testing.\nRate limit: max 1 call/second for invoice operations."
      },
      {
        "title": "References",
        "body": "Read references/fgo-api.md for payload field reference, endpoint mapping, authentication details, and rate-limit notes.\nUse references/invoice-example.json as the canonical starting payload template."
      }
    ],
    "body": "FGO Invoicing\n\nUse scripts/fgo_cli.py for deterministic FGO API calls instead of ad-hoc HTTP snippets.\n\nWorkflow\nCollect invoice input from the user.\nValidate payload locally before sending:\npython scripts/fgo_cli.py validate-payload --input references/invoice-example.json --show-payload\nDry-run to inspect the normalized payload (with computed Hash) without calling the API:\npython scripts/fgo_cli.py emit-invoice --input <invoice.json> --dry-run\nIssue final invoice after explicit user confirmation:\npython scripts/fgo_cli.py emit-invoice --input <invoice.json> --allow-final\nRetrieve invoice status, print link, or perform operations using the returned series and number:\npython scripts/fgo_cli.py get-status --serie <SERIE> --numar <NUMAR>\npython scripts/fgo_cli.py print-invoice --serie <SERIE> --numar <NUMAR>\npython scripts/fgo_cli.py cancel-invoice --serie <SERIE> --numar <NUMAR>\npython scripts/fgo_cli.py reverse-invoice --serie <SERIE> --numar <NUMAR>\nRequired Environment\n\nSet these before calling FGO:\n\nFGO_COD_UNIC — company CUI (Romanian tax ID)\nFGO_CHEIE_PRIVATA — FGO private API key (from FGO → Setari → Utilizatori → Generate API user)\n\nOptional overrides:\n\nFGO_API_BASE (default: https://api.fgo.ro/v1) — use https://api-testuat.fgo.ro/v1 for testing\nFGO_PLATFORM_URL (default: unset) — your registered platform URL (FGO → Setari → eCommerce → Setari API). Required for invoice issuance from registered platforms; omitted if not set.\nFGO_TIMEOUT_SECONDS (default: 30)\nFGO_RETRIES (default: 2)\nFGO_DEBUG (default: unset) — set to 1, true, or yes to enable request/response debug logging to stderr\nCommand Guide\nvalidate-payload\nParse and normalize payload; compute the authentication Hash.\nValidate minimum required structure before API calls.\nUse --show-payload to inspect the full normalized form-encoded payload.\nemit-invoice\nIssue invoice via POST /factura/emitere.\nRequires --allow-final to hit the real API.\nUse --dry-run first (prints normalized payload, no API call).\nPass --debug (or set FGO_DEBUG=1) to print full request/response to stderr.\nget-status\nGet invoice status (total value, amount paid, payments) via POST /factura/getstatus.\nprint-invoice\nGet a shareable print/download link via POST /factura/print.\ncancel-invoice\nCancel an invoice via POST /factura/anulare.\ndelete-invoice\nDelete an invoice via POST /factura/stergere.\nreverse-invoice\nCreate a storno (reversal) invoice via POST /factura/stornare.\nget-nomenclator\nFetch a nomenclature list (no auth required): tara, judet, tva, banca, tipincasare, tipfactura, tipclient, valuta.\nAuthentication\n\nFGO uses SHA-1 hash-based authentication embedded in every request body — no HTTP auth headers. The hash formula depends on the operation:\n\nInvoice issuance: SHA1(CodUnic + CheiePrivata + Client.Denumire).toUpperCase()\nInvoice operations (status/print/cancel/delete/storno): SHA1(CodUnic + CheiePrivata + Numar).toUpperCase()\n\nThe CLI computes hashes automatically. Never expose FGO_CHEIE_PRIVATA in logs.\n\nPayload Format\n\nThe invoice payload is a JSON object. The CLI converts it to form-encoded format (application/x-www-form-urlencoded) with bracket notation for nested fields, as required by the FGO API.\n\nBoth formats are accepted as input to the CLI:\n\nBare invoice object: { \"CodUnic\": \"...\", \"Client\": {...}, ... }\nWrapped: { \"invoice\": { \"CodUnic\": \"...\", \"Client\": {...}, ... } }\n\nThe CLI unwraps automatically, injects Hash and PlatformaUrl, then posts to FGO.\n\nSee references/invoice-example.json for the canonical minimal example and references/fgo-api.md for complete field documentation.\n\nInput File Safety\n\nThe --input argument is validated before any file is read:\n\nExtension check — only .json files are accepted. Passing /etc/passwd, ~/.ssh/id_rsa, or any non-JSON path raises an error immediately.\nPath confinement — the resolved path must be within the current working directory or a recognised OpenClaw media root (/tmp/openclaw, ~/.openclaw/workspace, etc.). Paths that escape these roots via ../ traversal or absolute references are rejected.\n\nAlways pass --input with a path to a file you created (e.g. a temp file written in the agent workspace). Never set --input to a path supplied by untrusted external content.\n\nOperational Rules\nAlways use --dry-run first to confirm the normalized payload before hitting the API.\nFGO responses use HTTP 200 even for errors — always check Success: true in the response.\nTreat invoice issuance as a high-impact action requiring explicit user confirmation.\nNever parallelize FGO API calls — make all requests sequentially to avoid deadlocks.\nInvoice issuance has a 15-second server-side timeout. If Success: false with a timeout message, the invoice was NOT issued — retry.\nStore the returned Numar verbatim as the exact string (may be zero-padded, e.g. \"001\"). Never strip leading zeros or cast to integer.\nUse the UAT environment (--base-url https://api-testuat.fgo.ro/v1) for testing.\nRate limit: max 1 call/second for invoice operations.\nReferences\nRead references/fgo-api.md for payload field reference, endpoint mapping, authentication details, and rate-limit notes.\nUse references/invoice-example.json as the canonical starting payload template."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/Maverick-AI-Tech/fgo-invoicing",
    "publisherUrl": "https://clawhub.ai/Maverick-AI-Tech/fgo-invoicing",
    "owner": "Maverick-AI-Tech",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/fgo-invoicing",
    "downloadUrl": "https://openagent3.xyz/downloads/fgo-invoicing",
    "agentUrl": "https://openagent3.xyz/skills/fgo-invoicing/agent",
    "manifestUrl": "https://openagent3.xyz/skills/fgo-invoicing/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/fgo-invoicing/agent.md"
  }
}