Skip to main content

claudepacks

CI PyPI version Python 3.9+ License: MIT

Cut your Claude Code session overhead from ~7,000 to ~200 tokens. One command per project — pick exactly which skills and agents load, instead of all of them.

简体中文 · Changelog · Troubleshooting · Recipes · Architecture · Contributing · Releasing


Why

Claude Code injects metadata for every skill in ~/.claude/skills/ and every agent in ~/.claude/agents/ into the session preamble. With 50+ skills and a handful of agents installed globally — common once you accumulate tooling across multiple projects — that's ~7k tokens of overhead before you type a single character, in every conversation, in every project.

But most projects only need a handful of them. A backend API project doesn't need front-end design helpers. A data project doesn't need Docker deployment tools.

claudepacks moves your global skills and agents into a stash at ~/.claude/packs/, and each project's .claude/skills/ and .claude/agents/ hold symlinks to only what that project needs. You pick them with an interactive selector.

Before / after

~/.claude/skills/    (50 entries, ~6800 tokens loaded in every session)
~/.claude/agents/    (5  entries, ~600  tokens loaded in every session)

After claudepacks:

~/.claude/packs/                              (the stash — single source of truth)
├── skills/
│   ├── code-review/SKILL.md                  ← plain skill
│   ├── sql-helper/SKILL.md
│   └── devtools -> ~/.claude/skills/devtools ← source pack, symlinked in place
└── agents/
    ├── reviewer.md
    └── migrator.md

my-backend-project/.claude/skills/            (only what this project needs)
├── code-review  → ~/.claude/packs/skills/code-review/
└── sql-helper   → ~/.claude/packs/skills/sql-helper/

my-backend-project/.claude/agents/
└── reviewer.md  → ~/.claude/packs/agents/reviewer.md

Result: ~7000 tokens → a few hundred per conversation. Tokens you can spend on actual code.

Demo

claudepacks in action — picking which skills and agents this project loads

Install

pip install claudepacks

Requires Python 3.9+. macOS / Linux only (curses TUI is not supported on Windows). The only runtime dependency is PyYAML.

First run — automatic migration

The first time you run claudepacks in any project, it offers to migrate your existing global skills and agents into the stash:

First-time setup: migrating to ~/.claude/packs/

Backups (full copy, originals preserved):
  ~/.claude/skills  →  ~/.claude/skills.bak-20260513-120000
  ~/.claude/agents  →  ~/.claude/agents.bak-20260513-120000

Target: ~/.claude/packs/
  skills/  (3 plain skill(s) → move)
    + code-review
    + sql-helper
    + debugger
  skills/  (1 source pack(s) → symlink in place)
    ⟶ devtools -> ~/.claude/skills/devtools
  agents/  (2 agent(s) → move)
    + reviewer.md
    + migrator.md

Proceed? [y/N]:

y runs it; N aborts with zero side effects. The whole pre-existing ~/.claude/skills/ and ~/.claude/agents/ are first copied to timestamped backups before any move — your data is recoverable.

You can also invoke it explicitly: claudepacks init.

Source pack handling

A skill directory with a top-level SKILL.md and nested sub-skills (each sub-dir holding its own SKILL.md) is recognized as a source pack. Migration symlinks these in place rather than moving them — wrappers and tooling that reference absolute paths inside the pack keep working.

Use

cd <your-project>
claudepacks

Opens an interactive selector grouped into 🤖 agent and 📦 skill.

Key Action
↑ ↓ / j k navigate
space toggle current artifact on / off
A enable all visible
N disable all visible
a smart toggle all visible (invert majority)
/ filter (type to search; esc to clear)
↵ apply changes and exit
esc quit without saving
g / G / PgUp / PgDn jump

State badges: ✓ on (green) / · off (dim). Pending changes are marked ✱ in yellow.

After applying, restart Claude Code to pick up the new project artifact set. The next /context should show a dramatically smaller Skills / Custom Agents footprint.

Layout

claudepacks/
├── LICENSE                  MIT
├── README.md                This file
├── README.zh-CN.md          Chinese
├── CHANGELOG.md             Release notes
├── CONTRIBUTING.md          Dev workflow + branch strategy
├── RELEASING.md             Release flow + SemVer policy + checklist
├── CLAUDE.md                Guidance for Claude Code in this repo
├── TODOS.md                 Deferred work, prioritized
├── pyproject.toml
├── docs/
│   ├── architecture.md      Design rationale + diagrams
│   ├── troubleshooting.md   Common issues + fixes (incl. zh-CN)
│   ├── recipes.md           Real-world workflows (incl. zh-CN)
│   └── demo.{gif,cast}      Demo assets
├── claudepacks/
│   ├── __init__.py
│   ├── __main__.py
│   ├── cli.py               Entry point — opens TUI / runs init
│   ├── core.py              Paths, artifact discovery, frontmatter
│   ├── migrate.py           First-time setup (~/.claude/{skills,agents} → packs/)
│   └── tui.py               Curses-based selector
└── tests/
    └── smoke.sh             End-to-end smoke tests

Status

v0.2.0. See CHANGELOG.

License

MIT — see LICENSE.

Metadata

Release files for claudepacks 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claudepacks 0.2.0
File Size Uploaded
claudepacks-0.2.0.tar.gz 40.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for claudepacks 0.2.0
File Interpreter ABI Platform
claudepacks-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 56.7 kB

Release files / claudepacks-0.2.0.tar.gz

Download URL claudepacks-0.2.0.tar.gz
Size 40.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0660ec817bab563343a6afc37c8c1b1e293ae299418d7f748ee90078e4c3eb57
BLAKE2b-256 checksum
How to use checksums
cd7f90390bd32f03f8cf0ecf8365f20182f56f01a53e9e78ed9293007c4e78d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / claudepacks-0.2.0-py3-none-any.whl

Download URL claudepacks-0.2.0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a56d7e4c914ca0b44e0cfb8d356e2f6aef01ca06a1bea1af3053af5ffe71b6f6
BLAKE2b-256 checksum
How to use checksums
f5f01e89d86fab584adc08e577c0812727ce48443593d927320e037397259501
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page