hierarchical-taxonomy-clustering

hierarchical-taxonomy-clustering is a skill for Claude Code, Codex from benchflow-ai/skillsbench. It costs 38 tokens per session (952 once invoked), scanned A, original, Apache-2.0.

A method for combining category paths from different online shops into one shared multi-level category system. For example, similar paths such as “computers > laptops” can be grouped under common names.

In plain words
What is it for?
Use it to cluster related product categories, create unified names across several levels, and prepare category data for analysis or reporting.
Why use it?
It reduces inconsistent category names and structures when product data comes from multiple companies.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to cluster related product categories, create unified names across several levels, and prepare category data for analysis or reporting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/benchflow-ai/skillsbench/hierarchical-taxonomy-clustering
About the project

SkillsBench is a benchmark for measuring how effectively AI agents use modular skills—folders containing instructions, scripts, and resources—to complete specialized tasks. It helps researchers and developers evaluate both skill quality and agent behavior, including tasks that require combining multiple skills. The catalogue’s skills and instructions are evaluated as part of this workflow.

benchflow-ai/skillsbench · 1,941 stars · on GitHub · skillsbench.ai

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add benchflow-ai/skillsbench --skill hierarchical-taxonomy-clustering
Clone the repo
git clone --depth 1 https://github.com/benchflow-ai/skillsbench

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hierarchical-taxonomy-clustering

README.md
[![agentmods](https://agentmods.dev/badge/skills/benchflow-ai/skillsbench/hierarchical-taxonomy-clustering/github.svg)](https://agentmods.dev/skills/benchflow-ai/skillsbench/hierarchical-taxonomy-clustering)
Your own site
<a href="https://agentmods.dev/skills/benchflow-ai/skillsbench/hierarchical-taxonomy-clustering"><img src="https://agentmods.dev/badge/skills/benchflow-ai/skillsbench/hierarchical-taxonomy-clustering/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hierarchical-taxonomy-clustering

Your own site · 80×15
<a href="https://agentmods.dev/skills/benchflow-ai/skillsbench/hierarchical-taxonomy-clustering"><img src="https://agentmods.dev/badge/skills/benchflow-ai/skillsbench/hierarchical-taxonomy-clustering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 952 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.00952
Opus 5.5 $0.00015 $0.00381
Sonnet 5.5 $0.00008 $0.00190
Haiku 4.5 $0.00004 $0.00095

Measured 3mo ago against content hash 4442f0462e66, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hierarchical-taxonomy-clustering scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/pipeline.py, scripts/step1_preprocessing_and_merge.py, scripts/step2_weighted_embedding_generation.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

tasks-extra/taxonomy-tree-merge/environment/skills/hierarchical-taxonomy-clustering/SKILL.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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

Read the full file on GitHub · 72 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 72 lines · 38 tokens per session scan A 4442f0462e66

Subscribe to this mod's changes

hierarchical-taxonomy-clustering is a skill published in the GitHub repository benchflow-ai/skillsbench (1,941 stars, last pushed 6d ago), licensed Apache-2.0. It adds 38 tokens to every session and 952 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

hierarchical-taxonomy-clustering compared with skills from other repositories

hierarchical-taxonomy-clustering next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hierarchical-taxonomy-clusteringbenchflow-ai/skillsbenchSkill1.9k6d agoApache-2.0A38Claude Code, Codex
pet-friendly-filteringcxcscmu/SkillLearnBenchSkill931mo agoMITA20Claude Code, Codex
amazon-reviews-api-skillbrowser-act/skillsSkill6.4k26d agoMITA124Claude Code, Codex
cloudbase-wechat-integrationTencentCloudBase/CloudBase-AI-ToolkitSkill1.2ktodayMITA94Claude Code
woo-guardamElnagdy/guard-skillsSkill1.3k6d agoMITA216Codex
food-orderBitterbot-AI/bitterbot-desktopSkill2.5k2d agoMITA53Claude Code, Codex
logistics-opsericrisco/rsc-harnessSkill6825d agoMITA127Claude Code, Codex