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.
- 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
- Download the ZIP.
- In Claude, open Customize, then Skills (claude.ai/customize/skills).
- Click +, then Create skill, then Upload a skill, and choose the ZIP.
- Code execution must be on (Settings, Capabilities). Skills work on every Claude plan.
- Unzip into your personal skills folder, for every project:
unzip gtin-identifier-check.zip -d ~/.claude/skills/ - Or into one project, to share it with the repository:
unzip gtin-identifier-check.zip -d .claude/skills/ - Claude Code picks it up without a restart; call it with
/gtin-identifier-checkor just describe the task.
- Unzip into your personal skills folder:
unzip gtin-identifier-check.zip -d ~/.agents/skills/ - Or into a repository:
unzip gtin-identifier-check.zip -d .agents/skills/ - Codex detects it automatically; call it with
$gtin-identifier-checkor/skills.
- ChatGPT has no file upload for skills yet. Click Copy for AI to copy the skill's text.
- In ChatGPT, type
@skill-creatorand ask it to create a skill from the text you paste. - Without Skills on your plan, paste the text into a Project's instructions instead.
- Click Copy for AI and paste the skill's text at the start of a conversation with any assistant.
- It works as instructions even where the assistant has no skill support.
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#
- Find the identifier columns. Some files mix barcodes, internal SKUs and supplier codes in one column; say which column holds what.
- 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. - 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.
- 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.
- 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,04and2(in-store, weighed-goods and company-internal numbers) and the coupon prefixes05,98and99. - Catch placeholders: one repeated digit, ascending runs (
1234567890128even has a valid check digit), the same code on unrelated products, codes built from the SKU or a row number. - 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.
- 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.
- Decide what each product should send, using the decision rules below, and report, starting with what blocks products.
Length rules#
| Digits after cleaning | What it is | Action |
|---|---|---|
| 8 | GTIN-8 (EAN-8 or JAN-8), or UPC-E | Expand 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 X | ISBN-10 | Convert to ISBN-13 |
| 11 | Almost always a UPC that lost its leading zero | Restore the zero only if the check digit then validates; mark it as a repair to confirm |
| 12 | UPC-A (GTIN-12) | Validate |
| 13 | EAN or JAN (GTIN-13), including ISBN-13 (978, 979) | Validate |
| 14 | GTIN-14 | Validate; check the indicator digit (step 7) |
| Other, or letters | Not a GTIN, usually an SKU or MPN | Move 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:
| Situation | What to send |
|---|---|
| Valid GTIN assigned by the brand owner | gtin and brand. Leave identifier_exists out; a missing value counts as yes. |
| No GTIN, but brand and a manufacturer MPN | brand and mpn |
| Store brand or private label without a GTIN | brand and mpn (Google accepts this for private label) |
| No GTIN and no MPN: custom, handmade, one-of-a-kind, vintage or antique goods | identifier_exists = no, plus brand if there is one |
| Invalid, placeholder or case-level code | Leave gtin empty and ask the supplier or brand for the real code. Do not send the bad one. |
- Setting
identifier_existstonowhile 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,mpnandidentifier_existsvalues 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.mdgtin-identifier-check/references/identifier-rules.md
License: CC-BY-4.0. Name: gtin-identifier-check.