360 Secure SkillHub
360 安全技能中心

printful-listing-auditor

通过 Printful REST API 只读检查店铺商品与 Sync 变体,逐项标记缺失或未通过校验的印刷文件、缺少零售价或 SKU、被忽略与已上线状态,输出按商品和变体的表格或 JSON 报告,并可用严格模式以非零退出码拦截发布。

分类:数据
davidjackson323
davidjackson323
热度 41.02
最近更新 2026-12-02 08:06:50

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add davidjackson323/printful-listing-auditor
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
printful-listing-auditor
description
Read-only audit of the products and variants held in a Printful store using the Printful REST API (api.printful.com). Use to check which listings have a validated print file attached, which are live versus ignored, which lack price or SKU, and to review embroidery or thread colour options before publishing. Creates, changes and deletes nothing.

Printful Listing Auditor

Audit the listings held in a Printful store using only the Printful REST API (https://api.printful.com). This skill is strictly read-only: it never creates, changes or deletes anything.

Use printful-management for general account work (orders, webhooks, tax, shipping, warehouse, reports, exports). This skill is the read-only listing review that pairs with printful-product-builder and printful-design-attacher.

Companion script

scripts/audit_printful_listings.py

Requirements

  • Python 3.9+ (standard library only).
  • Environment:
    • PRINTFUL_API_TOKEN (required) - scope: sync_products/read
    • PRINTFUL_STORE_ID (optional) - sent as the X-PF-Store-Id header

Workflow

  1. Stores - GET /stores lists every store and its type, so the audit states which shop it is looking at before reporting on it.
  2. Products - GET /sync/products?status=all lists Sync Products. On a native store, fall back to GET /store/products. GET /sync/products/{id} returns the product with all of its Sync Variants.
  3. Variants - for each variant, record:
    • attached print files (excluding preview images) with their file id, filename and validation status
    • retail_price, sku, is_ignored, synced
    • embroidery and thread colour options
  4. Findings - flag:
    • a variant with no print file attached
    • a file whose status is not ok (Printful could not process it)
    • a variant with no retail price or no SKU
    • a LIVE product (not is_ignored) whose variants have no validated print file - this is the risk that matters, because such a variant can be sold unprinted
  5. Report - print a per-product, per-variant table and the finding count. --json emits the same data as JSON; --strict exits non-zero when findings exist so it can gate a publish step.

Usage

python scripts/audit_printful_listings.py
python scripts/audit_printful_listings.py --strict
python scripts/audit_printful_listings.py --product-id 501345091 --json

Guardrails

  • Read-only. Do not add a write path to this skill.
  • Never print the API token.
  • Report findings as they are; do not silently fix a listing from this skill.