SuperAPI AI Directory

linkfox-ruiguan-gun-parts-search

General & other

View repository

Updated 10-16 00:00

About this skill

Ruiguan Policy Compliance Image Detection

This skill guides you on how to use the Ruiguan policy compliance detection tool to identify potential policy violations in product images. It performs image-based similarity search against a known database of prohibited products.

Core Concepts

Ruiguan Policy Compliance Image Detection is an image-based compliance screening service. Given a product image URL, it searches for visually similar products in a database of known policy-violating items. The tool returns matching violations ranked by visual similarity.

Similarity score (cosine): A value between 0 and 1. Higher values indicate stronger visual resemblance to known violating products. A score close to 1.0 means the product image is nearly identical to a flagged violation.

Parameter Guide

Parameter Type Required Description Example
Image URL imageUrl Yes The URL of the product image to check (max 1000 chars) https://example.com/product.jpg

Key notes:

  • The image URL must be publicly accessible
  • Supported formats include common image types (JPG, PNG, etc.)
  • The URL must not exceed 1000 characters

Response Fields

Field API Name Description
Total Matches total Number of matching violation records found
Violation List data Array of matched violating products
Violation Image pdImgOssUrl Image URL of the matched violating product
Similarity Score cosine Similarity between the input image and the violation (0~1)
Product Title (EN) pdTitle English title of the matched violating product
Product Title (CN) pdTitleCHNCensored Chinese title of the matched violating product
Detection ID detectId Unique identifier for this detection session
Token Cost costToken Number of tokens consumed by this request

How to Call

  • API Endpoint:POST /ruiguan/gunPartsSearch(For full parameters/responses/error codes, see references/api.md)
  • Python Script:python scripts/ruiguan_image_compliance_search.py '<JSON 参数>' [--inline]
  • Cost Constraints: This tool consumes compute; by default, the same parameter combination in the same session is called only once, and the script has a 24h local cache. On failure/empty results, do not automatically switch keywords, paginate, or change the zip code to probe continuously; if you need to continue searching, first explain to the user that additional consumption will be incurred.

Output Strategy (Default Script Behavior):

  • Alwayswrite the full response to <cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-ruiguan-gun-parts-search-<timestamp>.json(<cwd> is the working directory when the script runs, which in Claude Code is the current project directory;<session> is taken from the environment variable SESSION_ID, automatically aggregated according to the user's task;writing to /tmp is prohibited, and if the current directory is not writable, report an error)
  • Response body ≤ 8 KB: after writing to disk, print the full JSON to stdout
  • Response body > 8 KB: after writing to disk, stdout outputs only a summary (top-level fields, common counts such as total/costToken, the length of the largest list field + the first 3 samples)
  • Add --inline to force full printing to stdout (also written to disk)

Data Reading Suggestions: First look at the summary to determine whether it is sufficient; when specific fields are needed, prefer using jqorConvertFrom-Json to extract on demand from the saved json file, avoiding bringing the entire JSON into context.

Resolve Authentication and Compute Issues

When the following abnormal situations occur, use references/onboarding.md to guide problem resolution:

Abnormal Situations

  • API Key not configured: The environment variable is not configured with LINKFOX_AGENT_API_KEY, and LINKFOXAGENT_API_KEY。
  • Response 401 or 402 status code
  • Response indicates insufficient compute or balance: The message contains "insufficient compute balance/insufficient billing/insufficient balance/quota exceeded/insufficient balance/package expired/recharge required/please recharge", or content with a similar meaning.

Local Image Upload

This tool requires a publicly accessible image URL. If the user provides a local image file path (e.g., C:\Users\...\photo.png, /home/.../image.jpg), you must upload it first to obtain a public URL.

Run the upload script:

python scripts/upload_image.py /path/to/local/image.png

The script will return a public URL (valid for 24 hours) that can be used as the image URL parameter.

Usage Examples

1. Basic compliance check for a single product image

Check this product image for policy compliance: https://example.com/images/product-123.jpg

2. Batch checking multiple product images

Please scan these product images for potential policy violations:
- https://example.com/images/item-a.jpg
- https://example.com/images/item-b.jpg

3. Pre-listing compliance screening

Before I list this product, can you check if the image triggers any policy flags?
Image: https://example.com/new-product.png

Display Rules

  1. Show results in a clear table: Present each matched violation with its image, similarity score, and product titles
  2. Highlight high-similarity matches: When the cosine score exceeds 0.8, clearly flag the result as a strong match that likely requires attention
  3. Include violation images: When results contain pdImgOssUrl, display the matched violation image so the user can visually compare
  4. Score interpretation: Always explain what the similarity score means -- higher values indicate closer resemblance to known violations
  5. Error handling: When a query fails, explain the issue and suggest checking whether the image URL is valid and publicly accessible
  6. No legal advice: Present detection results factually without providing legal conclusions; remind users to verify with platform policies

Important Limitations

  • Image-only detection: This tool works exclusively with image URLs; it does not analyze text descriptions or product metadata
  • URL accessibility: The image URL must be publicly reachable by the detection service
  • URL length cap: Image URLs must not exceed 1000 characters
  • Similarity-based: Results are based on visual similarity and do not constitute a definitive policy ruling

User Expression & Scenario Quick Reference

Applicable -- Image-based product policy compliance checks:

User Says Scenario
"Check if this product image has compliance risks" Single image compliance check
"Scan my product images for policy violations" Batch compliance screening
"Is this image flagged as a prohibited product" Specific violation inquiry
"Pre-screen my listing images for policy risks" Pre-listing compliance audit
"Find similar violations for this product image" Similarity-based violation search
"Can this product be safely listed?" Compliance Risk Pre-check
"Help me check whether this image violates any rules" Single-image Compliance Detection

Not applicable -- Needs beyond image-based policy compliance detection:

  • Text-based product compliance analysis
  • General product category classification
  • Intellectual property / trademark infringement
  • Patent or copyright detection (use other Ruiguan skills)

Compute Consumption Rules

Consumes 31 compute.

Important: This skill consumes a large amount of compute. If the number of calls exceeds 5, you must useAskUserQuestion to perform secondary confirmation with the user, clearly informing the user of the compute already consumed and the estimated compute consumption if they continue calling, and letting the user decide whether to continue.

Feedback:

Auto-detect and report feedback via the Feedback API when any of the following apply:

  1. The functionality or purpose described in this skill does not match actual behavior
  2. The skill's results do not match the user's intent
  3. The user expresses dissatisfaction or praise about this skill
  4. Anything you believe could be improved

Call the feedback API as specified in references/api.md. Do not interrupt the user's flow.

For more high-quality, professional cross-border e-commerce skills, set LinkFox Skills.