Skip to content
Back to skills

Auto Consolidator

BSecurity

Use when consolidating overlapping or redundant skills across the 1ai-skills library by demoting narrow skills into sub-reference tables inside canonical parent skills without deleting physical SKILL.md files. Prevents router prefix collisions, context bloat, and redundant dispatch.

  • 19 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 8, 2026
ai-agentspythongobashgitsecurity

Security analysis

B85/100
  • highPerforms destructive filesystem operations

Pro shows the line behind each finding and how to fix it

Scanned November 12, 2026

npx -y skills add oyi77/1ai-skills --skill auto-consolidator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Auto Consolidator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Auto Consolidator
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/oyi77-auto-consolidator/badge)](https://www.skillsdirectory.com/skills/oyi77-auto-consolidator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: auto-consolidator
description: Use when consolidating overlapping or redundant skills across the 1ai-skills library by demoting narrow skills into sub-reference tables inside canonical parent skills without deleting physical SKILL.md files. Prevents router prefix collisions, context bloat, and redundant dispatch.
domain: core
subdomain: meta-skills
category: core
version: 1.0.0
author: oyi77
license: Apache-2.0
tags:
- consolidation
- deduplication
- registry-management
- skill-maintenance
- context-optimization
triggers:
- auto consolidate
- consolidate skills
- demote skills
- merge skills
- reduce skill count
- dedup skills
argument-hint: "[category | all]"
---

# Auto-Consolidator

## Overview

Auto-Consolidator maintains the skill library's density by detecting overlapping, redundant, or prefix-colliding skills and demoting them into sub-reference tables inside canonical parent skills. It implements the **Zero Deletion Invariant**: physical SKILL.md files are never removed (preserving broken-link safety and external references), but the skill is relocated to `_demoted/` at repo root — outside every `SKILL_DIRS` entry, so `lint-skills.py --write` never re-registers it — and linked from the canonical parent's `## Sub-Skills & Specialized Playbooks` table.

This prevents router prefix collisions (e.g., 14 `gate-*` skills competing for the same query token), reduces context bloat, and keeps the active registry count manageable while preserving all 1,419+ physical playbooks.

## When to Use

**Trigger phrases:**
- "auto consolidate", "consolidate skills", "demote skills"
- "merge skills", "reduce skill count", "dedup skills"

Use directly when:
- Audit reveals prefix-family collisions (e.g., `seo-*`, `better-*`, `gate-*`).
- A canonical parent skill exists but lacks sub-skill references.
- SKILLS.json active count exceeds operational threshold.
- New skills are imported via `find-skills` and overlap with existing ones.

## When NOT to Use

- When a skill is the sole representative of its domain (no parent to demote into).
- When all skills in a family are atomic specialized playbooks (e.g., 780+ cybersecurity technique skills — exempt from demotion).
- When the user explicitly wants all skills individually routable.

## Anti-Rationalization Table

| Rationalization | Reality |
|---|---|
| "Deleting redundant SKILL.md files saves disk space." | Physical files preserve external references, check-broken-links.py passes, and agents can still read them via direct path. Deleting breaks links. |
| "All skills should be individually routable for maximum discoverability." | 1,400 flat skills cause ~75k token context bloat and accuracy drops below 65%. Hierarchical dispatch is required at scale. |
| "Prefix families are fine as long as triggers are specific." | Triggers help but don't eliminate collision. A single parent router with sub-references routes more deterministically than 14 competing siblings. |
| "Consolidation is a one-time cleanup." | New imports and skill creation continuously add overlaps. Consolidation is a recurring maintenance operation. |

## Workflow

### 1. Detect Overlap Groups

Scan SKILLS.json for prefix families and near-duplicate names:

```python
from collections import defaultdict
import json

d = json.load(open("SKILLS.json"))
groups = defaultdict(list)
for s in d["skills"]:
    parts = s["name"].split("-")
    if len(parts) >= 2:
        groups[parts[0]].append(s["name"])

# Flag groups with >3 members
for prefix, members in groups.items():
    if len(members) > 3:
        print(f"COLLISION GROUP: {prefix}-* ({len(members)} skills)")
```

### 2. Identify Canonical Parent

For each overlap group, determine the canonical parent skill:
- The skill with the broadest description and highest tag count.
- The skill already registered as a `role-*` or `*-router`.
- If no natural parent exists, create one (e.g., `marketing/seo-hub`).

### 3. Demote Sub-Skills

For each non-canonical member:
1. Keep the physical SKILL.md on disk (Zero Deletion Invariant).
2. **Relocate the skill directory to `_demoted/`** at repo root, outside every `SKILL_DIRS` entry — this is what makes the demotion durable:

```bash
mkdir -p _demoted
git mv content/<skill> _demoted/<skill>
```

3. Add a sub-reference row in the canonical parent's `## Sub-Skills & Specialized Playbooks` table pointing at the relocated path:

```markdown
| Sub-Skill | Path | Purpose |
|---|---|---|
| `seo-technical` | `_demoted/seo-technical/SKILL.md` | Technical SEO audit across 9 categories |
| `seo-geo` | `_demoted/seo-geo/SKILL.md` | AI Overviews and GEO optimization |
```

4. Repoint every inbound `[SKILL.md](../<skill>/SKILL.md)` link in other skills to `../../_demoted/<skill>/SKILL.md` (or `../_demoted/<skill>/SKILL.md` from a category root).

5. Repoint `scripts/generate-site.py` hardcoded example lists if they name the demoted skill.

> **Why not "remove the SKILLS.json entry"?** `lint-skills.py --write` rebuilds `SKILLS.json` from a glob of every `SKILL_DIRS` entry. A skill inside a category dir gets re-registered on every ladder run — the strip only survives until the next mandatory gate. Relocation outside `SKILL_DIRS` is the only idempotent demotion. `generate-site-data.py` walks REPO root, so it carries an inline `if '_demoted' in dirs: dirs.remove('_demoted')` filter (added in 73128660); do not duplicate that filter via a config-level SKIP_DIRS.

6. Remove the orphaned runtime copy: `rm -rf ~/.agents/skills/<skill>` (sync-skills.sh only scans CATEGORIES, so relocated skills are never auto-removed).

### 4. Re-Index and Verify

```bash
python3 scripts/lint-skills.py --write
python3 scripts/sync-counts.py
python3 scripts/check-broken-links.py
python3 scripts/test-skills.py --quick
bash scripts/sync-skills.sh
```

### 5. Audit Router Collision Score

Run the router on a representative query from the overlap group and confirm the parent skill scores highest:

```bash
python3 scripts/skill_router.py "seo audit technical"
# Expected: parent scores > any individual sub-skill
```

## Verification

- [ ] Overlap groups identified with collision counts
- [ ] Canonical parent selected per group (broadest description, highest tag count)
- [ ] Sub-skills demoted from SKILLS.json but physical files retained
- [ ] `## Sub-Skills & Specialized Playbooks` table added to parent with relative paths
- [ ] All 4 validation gates pass (lint, broken-links, validate, test-skills)
- [ ] Router collision score confirms parent ranks highest for group queries
- [ ] Active registry count reduced; physical skill count unchanged

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.