Skip to content

sidphbot/claude_skill_condenser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Claude Skill Condenser

A toolkit for downloading Claude Code skills from GitHub and condensing multiple related skills into fewer, token-optimized skill files — without losing functionality.

Why?

Claude Code skills are loaded into context as part of every conversation. When you have many skills installed, the cumulative token overhead adds up. This project lets you merge related skills into consolidated ones that preserve all critical behavior (embedded prompts, code templates, agent files) while stripping redundant prose and boilerplate.

How It Works

The condensation pipeline has four stages:

  1. Download — Fetch skills from GitHub repos or local directories using download_skills.py
  2. Audit — Analyze token usage, invocation modes, and embedded prompts with audit.py
  3. Scaffold — Generate a merged directory structure based on a grouping plan with scaffold.py
  4. Validate — Verify the merged output for correctness and measure token reduction with validate.py

Steps 2-4 are orchestrated by invoking the /skill_condenser Claude skill, which uses the rewriting guide and tooling under .claude/skills/skill_condenser/.

Project Structure

.claude/skills/skill_condenser/   # The condenser skill itself
  audit.py                        # Token usage analysis
  scaffold.py                     # Merged directory scaffolding
  validate.py                     # Output validation & comparison
  rewriting-guide.md              # Rules for semantic compression
example/                          # Example workflow
  download_skills.py              # Skill downloader utility
  url_list.txt                    # Source URLs (populate with your own)

Quick Start

1. Download skills

cd example/

# From a GitHub URL containing skills
python download_skills.py \
    --urls "https://github.com/user/repo/tree/main/skills" \
    -o ../downloaded_skills

# Or from a file of URLs (one per line)
python download_skills.py --url-file url_list.txt -o ../downloaded_skills

# Or from a local directory
python download_skills.py --local-dir /path/to/skills -o ../downloaded_skills

Set GITHUB_TOKEN or GH_TOKEN to avoid GitHub API rate limits.

2. Condense skills

With the skills downloaded, invoke the condenser skill in Claude Code:

/skill_condenser

Claude will audit the downloaded skills, propose groupings, scaffold the merged structure, rewrite the content following the compression rules, and validate the output.

Rewriting Rules

The condenser follows strict rules about what can and cannot be changed:

  • Never touched — Embedded prompts, agent files, code snippets, regex patterns, format strings
  • Kept but reworded — Directives, file paths, CLI commands, constraints, edge cases
  • Dropped — Motivation/rationale, filler, restated instructions, encouragement, obvious instructions
  • Transformed — Verbose phrasing compressed to imperative form

See rewriting-guide.md for the full specification.

Disclaimer

This project is a tool for consolidating skill files. Any output it produces from third-party skills is derived from those original sources. We make no claims of ownership, licensing, or liability over downloaded or condensed skill content. Respect the licenses and terms of the original skill authors.

Requirements

  • Python 3.10+
  • Claude Code (for running the condenser skill)
  • GITHUB_TOKEN / GH_TOKEN (optional, for GitHub API access)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages