Agent skill

Hierarchical Taxonomy Clustering

by benchflow-ai in benchflow-ai/skillsbench

Build unified multi-level category taxonomy from hierarchical product category paths from any e-commerce companies using embedding-based recursive clustering with intelligent category naming via…

Apache-2.0Auto-check passedAI & LLM Engineering

Install Hierarchical Taxonomy Clustering

skills CLI
$ npx skills add benchflow-ai/skillsbench --skill hierarchical-taxonomy-clustering -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install benchflow-ai/skillsbench hierarchical-taxonomy-clustering --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tasks-extra/taxonomy-tree-merge/environment/skills/hierarchical-taxonomy-clustering .claude/skills/hierarchical-taxonomy-clustering && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hierarchical-taxonomy-clustering
GitHub stars
1.8k
Token cost
~983 tokens
SKILL.md length
401 words
Files
6 (incl. scripts)
Skills in repo
189
Repo updated
First seen
Licence
Apache-2.0

At a glance

Build unified multi-level category taxonomy from hierarchical product category paths from any e-commerce companies using embedding-based recursive clustering with intelligent category naming via…

  • Works in 4 steps: Load, Standardize, Filter and Merge… → Weighted Embeddings… → Recursive Clustering… → …
  • Tasks that involve Embeddings
  • SKILL.md covers Problem, Methodology, Output and Installation, plus 2 more sections
  • Runs Python scripts from its folder; calls pip and python

What it does

Hierarchical Taxonomy Clustering is an agent skill from benchflow-ai/skillsbench. Build unified multi-level category taxonomy from hierarchical product category paths from any e-commerce companies using embedding-based recursive clustering with intelligent category naming via weighted word frequency analysis.

Its SKILL.md is about 980 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts (for example `scripts/pipeline.py`, `scripts/step1_preprocessing_and_merge.py` and `scripts/step2_weighted_embedding_generation.py`).

It sits in AI & LLM Engineering, covering Embeddings and E-commerce operations. The repository describes itself as: SkillsBench evaluates how well skills work and how effective agents are at using them. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Embeddings
  • Tasks that involve E-commerce operations

Example prompts

  • “/hierarchical-taxonomy-clustering”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Load, Standardize, Filter and Merge (step1_preprocessing_and_merge.py)
  2. Weighted Embeddings (step2_weighted_embedding_generation.py)
  3. Recursive Clustering (step3_recursive_clustering_naming.py)
  4. Export Results (step4_result_assignments.py)

What it can do on your machine

Read from SKILL.md and the folder at commit 9a1f4dd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 5 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pip
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hierarchical Taxonomy Clustering loads about 983 tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 401 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~65
When it runs · the whole SKILL.md, loaded when a task matches
~983

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from benchflow-ai/skillsbench at commit 9a1f4dd, republished under its Apache-2.0 licence (© benchflow-ai). 401 words, ~983 tokens.

Download SKILL.mdSave it as .claude/skills/hierarchical-taxonomy-clustering/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
hierarchical-taxonomy-clustering
description
Build unified multi-level category taxonomy from hierarchical product category paths from any e-commerce companies using embedding-based recursive clustering with intelligent category naming via weighted word frequency analysis.

Hierarchical Taxonomy Clustering

Create a unified multi-level taxonomy from hierarchical category paths by clustering similar paths and automatically generating meaningful category names.

Problem

Given category paths from multiple sources (e.g., "electronics -> computers -> laptops"), create a unified taxonomy that groups similar paths across sources, generates meaningful category names, and produces a clean N-level hierarchy (typically 5 levels). The unified category taxonomy could be used to do analysis or metric tracking on products from different platform.

Methodology

  1. Hierarchical Weighting: Convert paths to embeddings with exponentially decaying weights (Level i gets weight 0.6^(i-1)) to signify the importance of category granularity
  2. Recursive Clustering: Hierarchically cluster at each level (10-20 clusters at L1, 3-20 at L2-L5) using cosine distance
  3. Intelligent Naming: Generate category names via weighted word frequency + lemmatization + bundle word logic
  4. Quality Control: Exclude all ancestor words (parent, grandparent, etc.), avoid ancestor path duplicates, clean special characters

Output

DataFrame with added columns:

  • unified_level_1: Top-level category (e.g., "electronic | device")
  • unified_level_2: Second-level category (e.g., "computer | laptop")
  • unified_level_3 through unified_level_N: Deeper levels

Category names use | separator, max 5 words, covering 70%+ of records in each cluster.

Installation

bash
pip install pandas numpy scipy sentence-transformers nltk tqdm
python -c "import nltk; nltk.download('wordnet'); nltk.download('omw-1.4')"

4-Step Pipeline

Step 1: Load, Standardize, Filter and Merge (step1_preprocessing_and_merge.py)
  • Input: List of (DataFrame, source_name) tuples, each of the with category_path column
  • Process: Per-source deduplication, text cleaning (remove &/,/'/-/quotes,'and' or "&", "," and so on, lemmatize words as nouns), normalize delimiter to >, depth filtering, prefix removal, then merge all sources. source_level should reflect the processed version of the source level name
  • Output: Merged DataFrame with category_path, source, depth, source_level_1 through source_level_N
Show full SKILL.md (148 more words)Show less
Step 2: Weighted Embeddings (step2_weighted_embedding_generation.py)
  • Input: DataFrame from Step 1
  • Output: Numpy embedding matrix (n_records × 384)
  • Weights: L1=1.0, L2=0.6, L3=0.36, L4=0.216, L5=0.1296 (exponential decay 0.6^(n-1))
  • Performance: For ~10,000 records, expect 2-5 minutes. Progress bar will show encoding status.
Step 3: Recursive Clustering (step3_recursive_clustering_naming.py)
  • Input: DataFrame + embeddings from Step 2
  • Output: Assignments dict {index → {level_1: ..., level_5: ...}}
  • Average linkage + cosine distance, 10-20 clusters at L1, 3-20 at L2-L5
  • Word-based naming: weighted frequency + lemmatization + coverage ≥70%
  • Performance: For ~10,000 records, expect 1-3 minutes for hierarchical clustering and naming. Be patient - the system is working through recursive levels.
Step 4: Export Results (step4_result_assignments.py)
  • Input: DataFrame + assignments from Step 3
  • Output:
    • unified_taxonomy_full.csv - all records with unified categories
    • unified_taxonomy_hierarchy.csv - unique taxonomy structure

Usage

Use scripts/pipeline.py to run the complete 4-step workflow.

See scripts/pipeline.py for:

  • Complete implementation of all 4 steps
  • Example code for processing multiple sources
  • Command-line interface
  • Individual step usage (for advanced control)

© benchflow-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts) in tasks-extra/taxonomy-tree-merge/environment/skills/hierarchical-taxonomy-clustering of benchflow-ai/skillsbench.

  • SKILL.md
  • scripts/pipeline.py
  • scripts/step1_preprocessing_and_merge.py
  • scripts/step2_weighted_embedding_generation.py
  • scripts/step3_recursive_clustering_naming.py
  • scripts/step4_result_assignments.py

Open the folder on GitHubat commit 9a1f4dd

Compare with similar skills

Hierarchical Taxonomy Clustering next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hierarchical Taxonomy Clustering compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hierarchical Taxonomy Clustering this skillbenchflow-ai/skillsbench1.8k—~983Automated safety check: PassApache-2.0
RAG And Vector SearchVectorSpaceLab/AREX-Skill331—~622Automated safety check: PassApache-2.0
Retail Product Search Agentgoogle/adk-recipes10k—~3kAutomated safety check: PassApache-2.0
Chroma Vector DatabaseOrchestra-Research/AI-Research-SKILLs13k7 repos~2.3kAutomated safety check: PassMIT
SageMaker Serving Image Selectionhuggingface/skills11k1 repos~4.6kAutomated safety check: PassApache-2.0
Codebase Managementgiancarloerra/SocratiCode3.3k1 repos~1.8kAutomated safety check: PassAGPL-3.0

Similar skills

  • RAG And Vector Search

    VectorSpaceLab/AREX-Skill

    A skill your agent uses for Feast RAG, vector search, vector-indexed fields, vector online stores, document embedding/chunking, retrieveonlinedocuments APIs, DocEmbedder, FeastVectorStore, and…

    331 GitHub stars~622 tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Retail Product Search Agent

    google/adk-recipes

    Official

    Builds a retail product search agent on Google Cloud, from catalog ingestion into BigQuery and Vector Search to ADK scaffolding, evaluation and Cloud Run deployment.

    10k GitHub stars~3k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Chroma Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.

    13k GitHub starsUsed in 7 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Official

    Chooses the right serving container and current image URI for deploying a Hugging Face model to a SageMaker endpoint, preferring Hugging Face images over generic ones.

    11k GitHub starsUsed in 1 repo~4.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Codebase Management

    giancarloerra/SocratiCode

    Set up, index, and manage SocratiCode codebase indexing. An agent skill from giancarloerra/SocratiCode.

    3.3k GitHub starsUsed in 1 repo~1.8k tokens
    AI & LLM EngineeringAuto-check passed
  • CLIP Image-Text Matching

    Orchestra-Research/AI-Research-SKILLs

    Explains OpenAI's CLIP model for zero-shot image classification, image-text similarity, semantic image search and content moderation, with install steps and code patterns.

    13k GitHub starsUsed in 7 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed

More from benchflow-ai/skillsbench

All 189 skills in this repo
  • Lean4 Memories

    benchflow-ai/skillsbench

    This skill should be used when working on Lean 4 formalization projects to maintain persistent memory of successful proof patterns, failed approaches, project conventions, and user preferences…

    1.8k GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Senior Data Engineer

    benchflow-ai/skillsbench

    World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.

    1.8k GitHub stars~5.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Ac Branch Pi Model

    benchflow-ai/skillsbench

    AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching acopf-math-model.md and MATPOWER branch fields.

    1.8k GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Civ6lib

    benchflow-ai/skillsbench

    Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • D3 Visualization

    benchflow-ai/skillsbench

    Build deterministic, verifiable data visualizations with D3.js (v6).

    1.8k GitHub stars~1.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Dc Power Flow

    benchflow-ai/skillsbench

    DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~717 tokensUpdated 2 mo ago
    Auto-check passed

Questions about Hierarchical Taxonomy Clustering

What does Hierarchical Taxonomy Clustering do?

Build unified multi-level category taxonomy from hierarchical product category paths from any e-commerce companies using embedding-based recursive clustering with intelligent category naming via…. Hierarchical Taxonomy Clustering is an agent skill from benchflow-ai/skillsbench. Build unified multi-level category taxonomy from hierarchical product category paths from any e-commerce companies using embedding-based recursive clustering with intelligent category naming via weighted word frequency analysis.

When should I use Hierarchical Taxonomy Clustering?

Hierarchical Taxonomy Clustering fits situations like: tasks that involve Embeddings; tasks that involve E-commerce operations.

How do I install Hierarchical Taxonomy Clustering in Claude Code?

Run `npx skills add benchflow-ai/skillsbench --skill hierarchical-taxonomy-clustering -a claude-code`. Or copy the skill folder (tasks-extra/taxonomy-tree-merge/environment/skills/hierarchical-taxonomy-clustering in benchflow-ai/skillsbench) into .claude/skills/hierarchical-taxonomy-clustering in your project. Claude Code loads it when a task matches its description.

How do I install Hierarchical Taxonomy Clustering in Codex?

Run `npx skills add benchflow-ai/skillsbench --skill hierarchical-taxonomy-clustering -a codex`. Or copy the skill folder (tasks-extra/taxonomy-tree-merge/environment/skills/hierarchical-taxonomy-clustering in benchflow-ai/skillsbench) into .agents/skills/hierarchical-taxonomy-clustering in your project. Codex loads it when a task matches its description.

Can I use Hierarchical Taxonomy Clustering in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add benchflow-ai/skillsbench --skill hierarchical-taxonomy-clustering -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hierarchical-taxonomy-clustering, .gemini/skills/hierarchical-taxonomy-clustering, .github/skills/hierarchical-taxonomy-clustering and .opencode/skills/hierarchical-taxonomy-clustering in your project.

What does Hierarchical Taxonomy Clustering need to run?

Going by SKILL.md and its folder, Hierarchical Taxonomy Clustering needs Python for the scripts in its folder and the command-line tools its instructions call (pip and python). Our summary lists: Python 3.

Does Hierarchical Taxonomy Clustering access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Hierarchical Taxonomy Clustering safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Hierarchical Taxonomy Clustering use?

Hierarchical Taxonomy Clustering is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hierarchical Taxonomy Clustering use?

About 983 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Hierarchical Taxonomy Clustering?

Skills that share tags, products or a category with Hierarchical Taxonomy Clustering: RAG And Vector Search (VectorSpaceLab/AREX-Skill, 331 stars), Retail Product Search Agent (google/adk-recipes, 10k stars), Chroma Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars) and SageMaker Serving Image Selection (huggingface/skills, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hierarchical Taxonomy Clustering?

benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,835 GitHub stars. The repository holds 189 skills in this directory. The repository was last updated on July 23, 2026.

Source: benchflow-ai/skillsbench on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.