Taxonomy tree merge

From XuShuwenn/RedAct · View interactive version

Taxonomy tree merge is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Merge product category taxonomies from Amazon, Facebook, and Google Shopping into unified 5-level hierarchy.

How to use this skill

Skill file

Taxonomy Tree Merge

When to Use

Execution Protocol

Input Files

All contain category_path column with hierarchical paths like:

electronics > computers > Laptops

Facebook files may include extra columns (for example category_id) and may have a BOM-prefixed header. Read all three CSVs first, normalize column names, and confirm the category_path field before building the merge.

Once this inspection confirms the usable schema, do not delay implementation by searching for alternate datasets, unrelated skill folders, or generic taxonomy pipelines unless the task explicitly requires them.

Use the provided CSVs directly when possible. Prefer a self-contained script/notebook over external pipelines unless an existing script is first inspected and verified to produce the exact required output files, columns, and hierarchy constraints.

Workflow

Workflow

  1. Inspect all three input CSVs before choosing an approach.
  1. Work from the specified paths and scope.
  1. Prefer simple, inspectable methods first.
  1. Reuse existing code only after validation.
  1. Make runtime decisions from observable evidence.
  1. Execute the merge end to end.

Rules

  1. Top level: 10-20 broad categories
  2. Each level: 3-20 subcategories per parent
  3. Use " | " separator, max 5 words per category
  4. Category name representative of 70%+ subcategories
  5. Standardize text, avoid overlap with parent
  6. Siblings: < 30% word overlap
  7. Balance cluster sizes (pyramid structure)
  8. Even distribution from all sources

Output Files

unified_taxonomy_full.csv

unified_taxonomy_hierarchy.csv

Validation checklist before completion:

Tips

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.