Skip to content

feat: add pith — token optimization plugin for Claude Code#1419

Closed
abhisekjha wants to merge 1 commit intoanthropics:mainfrom
abhisekjha:add-pith-plugin
Closed

feat: add pith — token optimization plugin for Claude Code#1419
abhisekjha wants to merge 1 commit intoanthropics:mainfrom
abhisekjha:add-pith-plugin

Conversation

@abhisekjha
Copy link
Copy Markdown

Plugin: pith

Category: productivity
Source: https://github.com/abhisekjha/pith
Install: claude plugin marketplace add abhisekjha/pith && claude plugin install pith

What it does

Pith reduces token consumption in Claude Code sessions automatically — no config needed after install.

Automatic (zero config):

  • Tool output compression — PostToolUse hook extracts JS/TS/Python skeletons, truncates bash/grep. 40–60% reduction on typical coding sessions.
  • Token meter in statuslinePITH 12k/200k updated every turn
  • Auto-compact at 70% — summarizes conversation history before hitting context limits
  • First-run wiki setup — offered on first session in a new project

On-demand commands:

  • /pith lean|precise|ultra — output compression levels
  • /pith debug|review|arch|plan|commit — structured output formats
  • /pith wiki — query/toggle project wiki
  • /pith status — token usage breakdown
  • /budget N — hard per-response token ceiling
  • /focus <file> — extract relevant sections from a file

Validation

✔ Validation passed

(Ran claude plugin validate — zero errors, zero warnings.)

Technical details

  • Hooks: SessionStart, UserPromptSubmit, PostToolUse, Stop (via hooks/hooks.json)
  • Commands: /pith, /budget, /focus (via commands/)
  • Runtime: Node.js (ships with Claude Code), Python 3 (for /focus tool)
  • No npm dependencies
  • MIT license

Pith provides automatic token optimization for Claude Code sessions:
- PostToolUse hook compresses tool output 40-60% (JS/TS skeleton extraction,
  Python skeleton, bash head+tail, grep truncation)
- Token meter in statusline: PITH 12k/200k
- Auto-compact at 70% context threshold
- Structured output formats: /pith debug|review|arch|plan|commit
- Project wiki that builds itself as you work
- /budget N for hard per-response token ceiling

Plugin passes `claude plugin validate`. Node.js required (ships with Claude Code).

Homepage: https://github.com/abhisekjha/pith
@github-actions
Copy link
Copy Markdown

Thanks for your interest! This repo only accepts contributions from Anthropic team members. If you'd like to submit a plugin to the marketplace, please submit your plugin here.

@github-actions github-actions Bot closed this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant