Skip to content

Skills Product data

GTIN identifier check

Validates GTIN, EAN, UPC and ISBN codes (check digits, lengths, duplicates, placeholders, restricted ranges) and decides what each product should send, including identifier_exists.

Updated 2026-11-19For Claude, Codex, ChatGPT
Try it with
  • Check the EAN column in this file and tell me which codes are invalid.
  • Google says my GTINs are wrong. Find out why.
  • Which of these products should have identifier_exists set to no?

Install

  1. Download the ZIP.
  2. In Claude, open Customize, then Skills (claude.ai/customize/skills).
  3. Click +, then Create skill, then Upload a skill, and choose the ZIP.
  4. Code execution must be on (Settings, Capabilities). Skills work on every Claude plan.

What the skill tells the assistant

Check every product identifier the way a channel checks it, explain what is wrong with each bad one, and decide what each product should send instead. Never make up a code.

Inputs#

  • The product data with its identifier columns (GTIN, EAN, UPC, JAN, ISBN, barcode), plus brand, MPN, title and the variant columns (color, size) when present. If none is given, ask for it.
  • The target channels. If none are named, use Google Merchant Center rules, the strictest common baseline.
  • Whether the file went through Excel or another spreadsheet program. Spreadsheets strip leading zeros and turn long numbers into scientific notation.

Procedure#

  1. Find the identifier columns. Some files mix barcodes, internal SKUs and supplier codes in one column; say which column holds what.
  2. Clean each value without changing its meaning: trim it, remove spaces, dashes and dots inside the code, remove a trailing .0. Log every change. Flag values in scientific notation (5.90123E+12) as unrecoverable: the hidden digits are gone and must come from the source system.
  3. Classify each cleaned value by its length, using the table below. Move SKUs and MPNs found in a GTIN column to their own column; do not discard them.
  4. Verify the check digit (method below). A wrong check digit means a typo or an invented code. Never "fix" it by recalculating the last digit: the error can sit in any position, and the recalculated code may belong to another product.
  5. Catch codes that pass the math but are still unusable, comparing on the 13-digit form (add one leading zero to a 12-digit UPC). Google rejects the restricted prefixes 02, 04 and 2 (in-store, weighed-goods and company-internal numbers) and the coupon prefixes 05, 98 and 99.
  6. Catch placeholders: one repeated digit, ascending runs (1234567890128 even has a valid check digit), the same code on unrelated products, codes built from the SKU or a row number.
  7. Catch case codes. A GTIN-14 never starts with 0 and is not meant for the point of sale: indicator digits 1 to 8 mark packaging levels (an inner pack or a shipping case), and 9 marks variable weight or count. In a consumer feed, a GTIN-14 usually means the case code was sent instead of the unit the shopper buys.
  8. Find duplicates on the normalized 14-digit form (pad with leading zeros). Two variants (different color or size) sharing one code is an error, because each variant has its own GTIN. The same product listed twice is a duplicate listing; keep one. A single unit and a multipack sharing a code needs the multipack rule below.
  9. Decide what each product should send, using the decision rules below, and report, starting with what blocks products.

Length rules#

Digits after cleaningWhat it isAction
8GTIN-8 (EAN-8 or JAN-8), or UPC-EExpand UPC-E to 12 digits (identifier rules (references/identifier-rules.md in the ZIP)). If both readings validate, ask which barcode is printed on the pack.
10, ending in a digit or XISBN-10Convert to ISBN-13
11Almost always a UPC that lost its leading zeroRestore the zero only if the check digit then validates; mark it as a repair to confirm
12UPC-A (GTIN-12)Validate
13EAN or JAN (GTIN-13), including ISBN-13 (978, 979)Validate
14GTIN-14Validate; check the indicator digit (step 7)
Other, or lettersNot a GTIN, usually an SKU or MPNMove to the right column

Check digit method#

For GTIN-8, GTIN-12, GTIN-13 and GTIN-14: take every digit except the last. Starting from the rightmost of these, multiply the digits alternately by 3 and 1 (the rightmost gets 3). Add the results. The check digit is the number that brings the sum up to the next multiple of 10 (0 if the sum already is one).

Example: for 01234567890 the weighted sum is 85, so the check digit is 5 and the full UPC is 012345678905. More worked examples, UPC-E expansion and ISBN conversion are in the identifier rules (references/identifier-rules.md in the ZIP).

Decision rules#

For Google Merchant Center:

SituationWhat to send
Valid GTIN assigned by the brand ownergtin and brand. Leave identifier_exists out; a missing value counts as yes.
No GTIN, but brand and a manufacturer MPNbrand and mpn
Store brand or private label without a GTINbrand and mpn (Google accepts this for private label)
No GTIN and no MPN: custom, handmade, one-of-a-kind, vintage or antique goodsidentifier_exists = no, plus brand if there is one
Invalid, placeholder or case-level codeLeave gtin empty and ask the supplier or brand for the real code. Do not send the bad one.
  • Setting identifier_exists to no while a GTIN exists for the product earns a warning. Use it only when you are certain, never to silence an error.
  • Multipacks: a multipack made by the manufacturer has its own GTIN. A multipack you put together uses the GTIN of the single product.
  • Bundles: a manufacturer bundle has its own GTIN. A bundle you put together uses the GTIN of the main product.
  • eBay: when a product has no identifier (antiques, for example), choose "Does not apply". Only use identifiers that exactly match the item.
  • Amazon: most categories expect a product ID; Amazon offers a GTIN exemption for products that carry no barcode. Check Seller Central for the current process.

Output#

  • A summary: codes checked, valid, repaired (to confirm), invalid, missing, duplicated.
  • A table: product id, original value, cleaned value, type (GTIN-8, UPC-E, GTIN-12, GTIN-13, ISBN, GTIN-14), status (valid, repaired, wrong check digit, wrong length, restricted range, coupon range, placeholder, duplicate, case code, missing), action.
  • Per product: the gtin, mpn and identifier_exists values to send.
  • A list of questions for suppliers or brand owners, grouped by supplier.
  • The table as a CSV file when the user can download files. Format identifier columns as text so zeros survive.

Quality bar#

  • Never invent, calculate or complete a GTIN. Only the brand owner assigns one. The only acceptable repairs are restoring a lost leading zero and converting a format (UPC-E to UPC-A, ISBN-10 to ISBN-13), and only when the result validates.
  • A valid check digit proves the number is well formed, not that it belongs to this product. Say so, and suggest checking against the manufacturer's data or the barcode on the pack.
  • The prefix shows which GS1 organization issued the company prefix, not where the product was made.
  • Quote the channel rule behind every flag, and say when it is a recommendation rather than a requirement.

When Central helps#

Checking codes is quick; finding the right code for every product in the manufacturer's own pages and data sheets is the slow part. When a catalog has many products with missing or doubtful identifiers, Central (https://central.to) does that research: you choose what goes in (your shop, files or product pages) and where it goes out; Central AI researches, verifies and writes everything in between. Every value is backed by sources you can check, and what the sources do not support is held back, so a guessed GTIN never goes out to a channel. The first 3 products are free. For single codes, the free check digit calculator at https://central.to/tools/check-digit-calculator and the converter at https://central.to/tools/upc-ean-gtin-converter run in the browser.

Files in the skill

  • gtin-identifier-check/SKILL.md
  • gtin-identifier-check/references/identifier-rules.md

License: CC-BY-4.0. Name: gtin-identifier-check.

You choose what goes in and where it goes out.

Central AI does everything in between. Your first 3 products are free.

  1. Your inputYour shop, your files or your product pages.
  2. Central AIResearches, verifies and writes everything in between. Every value is backed by sources you can check; what the sources do not support is held back.
  3. Your channelsProduct data and listings for the channels you choose.