Skip to content

EmreKb/ccstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ccstack

A TUI for managing project-scoped Claude Code skills, agents, and rules.

By default, anything you drop into ~/.claude/ is loaded for every project Claude Code touches — a frontend-specific skill leaks into the backend session, a project-specific agent shows up where it doesn't belong. ccstack flips this: keep a personal library at ~/.ccstack/, then copy only the relevant pieces into each project's .claude/ (or CLAUDE.md) on demand.

Install

npm install -g ccstack
# or run without installing
npx ccstack

Requires Node.js 18+.

Quick start

  1. Put your reusable assets into the library at ~/.ccstack/:

    ~/.ccstack/
    ├── skills/
    │   ├── react-patterns/        # directory, copied as-is
    │   └── postgres-tuning/
    ├── agents/
    │   ├── code-reviewer.md       # one .md per agent
    │   └── api-designer.md
    └── rules/
        ├── commit-style.md        # markdown fragment
        └── strict-typescript.md
    
  2. cd into a project and run:

    ccstack
  3. Pick a section, mark items with space, hit enter to apply.

Sections

Section Library Project target Behavior
Skills ~/.ccstack/skills/<name>/ .claude/skills/<name>/ Whole directory copied
Agents ~/.ccstack/agents/<name>.md .claude/agents/<name>.md Single file copied
Rules ~/.ccstack/rules/<name>.md CLAUDE.md Fragment inserted between <!-- ccstack:start <name> --> / <!-- ccstack:end <name> --> markers

The rules merge is non-destructive: any content you wrote by hand in CLAUDE.md stays untouched. ccstack only manages text inside its own markers.

Keyboard

In a section screen:

Key Action
/ Move cursor
space Toggle add (available items) / remove (in project)
s Toggle sync (project → library) on focused row
enter Apply pending changes
esc Back to menu
q Quit

The pending counter at the bottom shows +N / -N / ↑N so you can see what you've staged before applying.

Sync direction

Most of the time you push from library to project (add/remove). The reverse direction — pulling from a project back into the library — is supported two ways:

  • Per-row: focus a row that's in the project, press s, then enter. The asset is copied into ~/.ccstack/.
  • Bulk: from the main menu, choose Sync all from .claude. Every in-project item across every section is copied into the library at once. Useful when you've built up a battle-tested .claude/ and want to reuse it elsewhere.

Limitations

  • Hooks and MCP servers are intentionally not managed yet — both live in JSON config (settings.json, .mcp.json) and need a different merge model than file copy.
  • Sync only sees ccstack-managed items: file sections track by name; rules track by marker. Hand-written content in CLAUDE.md outside markers is invisible to ccstack and won't be synced.
  • Drift detection isn't implemented — if a project's copy of a skill diverges from the library version, ccstack won't warn you. Apply overwrites.

License

MIT — see LICENSE.

About

Per-project Claude Code config — keep skills, agents and rules out of ~/.claude/ and scoped to the project that needs them

Topics

Resources

License

Stars

Watchers

Forks

Contributors