Token optimization for Claude Code

fewer tokens. smarter sessions.

~50% fewer tokens in a typical Claude Code session. Zero config. Install once — every project, forever.

Token compression Project wiki Auto-escalation YAML provenance Session reports Symbol extraction
$ bash <(curl -s https://raw.githubusercontent.com/abhisekjha/pith/main/install.sh)
or
$ git clone https://github.com/abhisekjha/pith && bash pith/install.sh
View on GitHub →
0%
token reduction
on large file reads
0
config required
to get started
session length
with auto-compact
19
features shipped
across 10 research phases

Architecture

Four hooks.
One install.

Pith intercepts Claude Code's session lifecycle at four points. Everything runs automatically — no config, no commands required.

session lifecycle
┌─────────────────────────────────────────────────────┐
Claude Code Session
[SessionStart] ──► inject rules, restore mode, cache-lock
User sends prompt
[UserPromptSubmit] ──► parse /pith commands, context
Claude thinks + calls tools
[PostToolUse] ──► compress tool output
• File reads → skeleton (imports + signatures)
• Bash output → errors + 3-line summary
• Grep results → capped at 25 matches
• Large output → offloaded, 3-line pointer
Claude responds
[Stop] ──► record token usage, accumulate lifetime stats
└─────────────────────────────────────────────────────┘

The PostToolUse hook is where most savings happen — file reads alone account for 30–50% of context in a typical coding session. It runs on every tool call, silently, without interrupting your flow.

Pith also runs as two independent layers. The infrastructure layer is permanent — it activates on install and never turns off. The style compression layer is togglable — switch it on, off, or change modes mid-session without affecting anything else.

Layer 1 — Infrastructure Always on
Context window trackingPITH 503/200k
Token meter + statuslineEvery session
Tool output compressionFile / bash / grep
Auto-compact at 70%Automatic
Auto-escalation (SWEzze)LEAN at 50% · ULTRA at 70%
Hindsight pruningNudges at 60% fill
Cache-lock deduplicationSaves ~300 tok/session
Wiki systemIngest / query / lint
Session state savingOn every exit
YAML provenance trackingAll wiki writes
Knowledge graph/pith-graph
Layer 2 — Style compression Togglable
/pith leanDefault — drop filler
/pith preciseNo filler, full sentences
/pith ultraMax — arrows, tables
/pith offDisabled — raw Claude output
Mode OFF means Layer 2 is disabled. Layer 1 keeps running — context tracking, wiki, token meter, and tool compression all stay active.
compression layers in action
── Layer 1 always visible in statusline ────────────
PITH 503/200k   ← context tracking, always on

── /pith status shows both layers ──────────────────
◆ PITH · SESSION STATUS
  Context          [░░░░░░░░░░░░░░░░░░░░]  0%  ← Layer 1
  Mode             OFF                     ← Layer 2
  Budget           none
  Total Saved      ~714 (52%)          ← Layer 1 savings

── Layer 2 off, Layer 1 still compressing tools ────
$ /pith lean  ← re-enable Layer 2
Mode → LEAN. Tool compression was already running.

How it works

Automatic compression
where it matters most.

The biggest token sink isn't your prompts — it's tool output. Pith intercepts file reads, bash results, and grep matches before they hit the context window. Claude gets the signal, not the scroll.

Without Pith 3,110 tokens
Read large-service.ts1,800
Bash: npm install640
Grep: findAll errors380
Read config.json290
With Pith 675 tokens — −78%
Read large-service.ts210 −88%
Bash: npm install80 −87%
Grep: findAll errors95 −75%
Read config.json290
claude — pith active
$ /pith ultra
Ultra compression on — arrows →, tables over prose, abbreviate freely

$ /budget 150
Token ceiling: 150. Enforced.

$ /pith status
◆ PITH · SESSION STATUS
  Context          [▓▓▓░░░░░░░░░░░░░░░░░]  14%
  Mode             ULTRA
  Budget           150 tok/resp
  Model            Sonnet 4.6 (in $3.0/1M · out $15.0/1M)

  Tokens
  Total Saved      ~2,840 (52%)
  Without Pith     5,912

  Cost (this session)
  Tokens in        3,072 → $0.0092
  Tokens out       420 → $0.0063
  Actual spend     $0.0155
  Cost saved       $0.0085
  Without Pith     $0.0240

  Lifetime
  Tokens saved     ~7,700
  Cost saved       $0.0230

Output modes

One command.
Four levels of compression.

Switch between modes instantly. Pith remembers your setting for the session — no flags, no config.

/pith lean
Default. Drop articles and filler. Short synonyms. Fragments OK. Best balance of readability and compression.
IN: "I would like to suggest that you consider..."
OUT: "Consider..."
/pith precise
Professional and tight. No filler, full sentences kept. Use for docs, PRs, and communication.
IN: verbose explanation with hedges
OUT: clean technical prose, no hedging
/pith ultra
Maximum compression. Arrows → over prose. Tables over lists. Abbreviate freely. Use when every token counts.
IN: multi-sentence explanation
OUT: A → B → C. Done.
/pith off
Back to standard Claude output. No compression, no modification. Full fidelity when you need it.
IN: any prompt
OUT: unmodified Claude response

Adaptive Intelligence

Context-aware.
Gets smarter as it fills.

Pith watches your context window in real time and takes action before it causes problems — automatically ratcheting compression, flagging waste, and front-loading what future requests will need.

Auto-escalation Always on
50% context fill→ LEAN mode activated
70% context fill→ ULTRA mode activated
85% context fill→ Dynamic ceiling injected
Ratchets up, never down mid-session. Prevents runaway responses from eating the remaining headroom. Toggle with /pith escalate on|off.
Before / After 68% fill — auto-escalated
Context fill136k / 200k
Response size (before)1,840 tok — growing
Mode injectedULTRA (auto)
Response size (after)510 tok -72%
Hindsight pruning  Hindsight · 2026 60% trigger
Scan telemetryEvery tool call logged
Superseded readsFile read 2+ times → flag
Early-session blobsLarge old outputs → prune
Fires once per session when context passes 60%. Reports stale token cost. Recommends /compact with exact savings estimate.
Symbol extractor + Speculative Fetch ~95% reduction
Full file read1,800 tokens
/pith symbol auth.ts handleLogin38 tokens -98%
Speculative fetch+callee signatures auto-appended
Tree-sitter AST when available, regex fallback. Appends signatures of called functions defined in the same file — eliminates ~60% of follow-up lookups.
adaptive intelligence · live session
── turn 24 · context fill: 52% ──────────────────────
[PITH AUTO-ESCALATED: context 52% full → LEAN compression active.
Previous mode: off. Run /pith escalate off to disable.]
 
── turn 31 · context fill: 71% ──────────────────────
[PITH AUTO-ESCALATED: context 71% full → ULTRA compression active.]
 
── turn 33 · hindsight nudge (fires once at 60%+) ───
[PITH HINDSIGHT: 3 stale reads detected · 4,200 tokens recoverable
auth.ts read 3× (keep latest: turn 29) · 1,840 tok
npm install output (turn 2, now irrelevant) · 1,120 tok
→ Run /compact to recover ~4.2k tokens (21% of remaining headroom)]
 
$ /pith symbol src/auth.ts validateToken
[PITH SYMBOL: validateToken in auth.ts (lines 47–81, tree-sitter)]
47 async function validateToken(token: string): Promise<User | null> {
48 const decoded = jwt.verify(token, process.env.JWT_SECRET);
··· (35 lines extracted · 97% fewer tokens than reading auth.ts)
[PITH SPECULATIVE: called functions in same file → signToken (ln 31), hashPassword (ln 94)]
Cache-Lock  Phase 9 · 2026 ~300 tok/session
Session-start hashMD5 of rules block
Same settings as last session1 line emitted, not full block
Settings changedFull block, hash updated
Protects prompt cache. Dynamic values (token counts, timestamps) are excluded from the hash so cache hits are genuine stability signals.
Session Report  /pith report HTML dashboard
Token flow barsBaseline → removed → sent
Savings donutPer-bucket breakdown
Cost tableActual vs without Pith
Standalone Chart.js dashboard written to ~/.pith/report.html. Opens in browser. Run any time — refreshes to current session data.
$ /pith status Live output
/pith status — token flow chart, 1.1:1 compression, real input/output counts, cost breakdown

Project Wiki

Your project's memory.
Built automatically.

First session in a new project, Pith creates a wiki. Every decision, architecture choice, and bug resolution gets captured as you work — without interrupting your flow.

Decision

Architecture and technology choices with full context — why it was decided, what was rejected, and what it constrains.

date · status
context · options table
decision · consequences

Concept

Ideas, patterns, and principles — how they work, why they matter, open questions, and concrete examples.

definition · why it matters
how it works · related
examples · open questions

Entity

People, tools, services, and components — key facts, connections to other entities, and source citations.

type · summary
key facts
connections · sources

Synthesis

Analysis pages with a thesis, evidence, counter-evidence, and a confidence rating. For conclusions that span multiple sources.

thesis · confidence
evidence · counter-evidence
open questions
01

Ingest a source

/pith ingest <file> or --url <url>
Extracts entities, claims, contradictions from files or fetched URLs

02

Review diff

Shows what will be created or updated — confirm before any write

03

Wiki updates

Pages written, index.md updated, log.md appended

04

Compile

/pith compile re-synthesizes all sources into cross-linked wiki pages — one command after N ingests

05

Query anytime

/pith wiki "<question>"
Synthesizes answer with citations

06

Lint regularly

/pith lint finds contradictions, gaps, missing pages, and imputable facts

pith wiki
$ /pith ingest --url https://research.example.com/auth-patterns
Fetched → raw/sources/2026-04-17-auth-patterns.md
Found: 3 entities, 2 new concepts, 1 contradiction
  Will update: [[auth-middleware]], [[session-tokens]]
  Will create: [[JWT-refresh-flow]]

$ /pith compile
Found 8 sources. Building compile plan...
  Topics: 5 · Synthesis pages: 3 · Gaps: 2
  Creating [[auth-strategy-synthesis]] from 3 sources...
  Compile complete. 3 created · 2 updated.

$ /pith wiki "how does auth work?"
Based on [[auth-middleware]] and [[auth-strategy-synthesis]]:
  Auth: JWT + refresh tokens, httpOnly cookie. Decision: cookies > localStorage (XSS).

Compile Pass

Many sources.
One coherent wiki.

After ingesting several sources, /pith compile re-reads all of them together and synthesizes cross-source wiki pages — evidence from multiple documents combined into a single, cited, cross-linked page. This is the Karpathy compile pass: raw/ in, wiki/ out.

01

Plan

Claude reads all raw/sources/ and identifies cross-cutting topics, synthesis opportunities, and gaps

02

Synthesize

Creates or updates wiki/concepts/ pages — each one cites every source it draws from

03

File gaps

Topics implied by sources but not yet covered are recorded in log.md for follow-up

04

Dry run

/pith compile --dry-run shows the full plan — topics, pages, gaps — without writing anything

pith compile
$ /pith compile --dry-run
Found 8 sources. Building compile plan...
  Topics to process: 5
  Synthesis pages: [[auth-strategy-synthesis]], [[rate-limit-patterns]], [[infra-evolution]]
  Gaps: WebSocket auth (referenced in 3 sources, no page) · token rotation
  [dry-run] No files written.

$ /pith compile
  Creating [[auth-strategy-synthesis]] from 3 sources... ✓
  Creating [[rate-limit-patterns]] from 2 sources... ✓
  Updating [[infra-decisions]] with new evidence... ✓
Compile complete. 3 created · 2 updated · 2 gaps filed

Knowledge Graph

See the whole wiki
as a living network.

/pith-graph scans every wiki page, extracts [[wikilinks]], and renders a zero-dependency interactive graph. No Obsidian, no framework. One command — browser opens instantly.

· loading… · hover a node to focus
Decisions
Concepts
Entities
Syntheses
🎯

Focus hover

Hover any node — the entire graph dims to 10% opacity. Only the hovered node and its direct 1st-degree connections stay at full brightness. Instantly trace dependencies without visual noise.

💊

Label pills

Every node label sits on a semi-transparent dark pill that masks lines behind it. Stays legible at 50 nodes, 200 nodes, or more — no overlapping text.

☀︎

Light / dark mode

One-click toggle between dark canvas and warm light mode. Pill backgrounds, text colours, and link tints all update live — no reload.

🧲

Force-directed physics

Nodes repel each other; links act as springs. Drag any node and the simulation reacts. Zoom and pan the full canvas. Ghost nodes show referenced-but-missing pages.

🎨

Type-coded colours

Emerald for decisions. Indigo for concepts. Amber for entities. Pink for syntheses. Each node has a matching glow so it pops off the dark canvas.

📦

Zero dependencies

Output is a single standalone HTML file. D3.js from CDN. No install, no build step, no framework. Share the file with anyone — it runs anywhere.


YAML Provenance

Every claim traceable
to its source.

Every wiki page Pith creates or updates carries YAML frontmatter linking back to the exact source — raw file, GitHub PR, or Claude session timestamp. If the AI hallucinates, you can trace it.

wiki/decisions/auth-middleware.md Provenance block
--- title: auth-middleware type: decision created: 2026-04-15T14:32:00Z updated: 2026-04-15T18:44:00Z sources: - type: file path: raw/sources/auth-spec.md ingested: 2026-04-15T14:32:00Z - type: claude-session session_date: 2026-04-15 note: "Decision reached during auth refactor discussion" confidence: high contradictions: none ---
Raw source files in wiki/raw/sources/ are immutable — Pith never modifies them. The provenance block on derived pages always points back to the original. If a claim looks wrong, follow the chain.

Semantic Lint

Contradictions surface
automatically.

/pith lint goes beyond broken links. Structural checks run instantly. The LLM pass finds semantic contradictions, missing entity pages, unlinked related pages, knowledge gaps, and facts that can be inferred from the wiki but aren't stated yet. --fix auto-creates stub pages. --quick skips the LLM.

🔴
Semantic contradiction — cloud provider
[[infra-decisions]] states "strictly on Google Cloud" · [[q2-migration]] states "migrating to AWS" — which is current?
Resolve
🟡
Orphan page — no inbound links
[[legacy-auth-flow]] is not referenced by any other page or index.md. May be stale.
Orphan
🟡
Stale contradiction — unresolved for 32 days
Contradiction in [[auth-middleware]] flagged on 2026-03-14 — "httpOnly cookie" vs "localStorage" — still unresolved.
Stale
🔵
Missing entity page — referenced 4×
Redis is mentioned in [[caching-strategy]], [[session-tokens]], [[infra-decisions]], and [[q2-migration]] but has no dedicated page. Run with --fix to create stub.
Missing
🔵
Suggested connection — unlinked related pages
[[rate-limiting]] and [[auth-middleware]] both discuss token expiry but don't cross-link. Add [[rate-limiting]] to auth-middleware's Related section.
Unlinked
🟠
Knowledge gap — thin coverage
WebSocket auth is referenced in 3 pages but no concept page exists. Heavy cross-reference with no dedicated coverage.
Gap
💡
Imputable fact — derivable from wiki
[[session-tokens]] is missing: "token lifetime is 15 min" — this follows directly from [[auth-middleware]] + [[rate-limiting]] and should be stated explicitly.
Infer
🟢
Pages with no sources
0 pages lack source citations — all provenance blocks present.
Clean

Structured formats

The right shape
for every task.

One-shot formats that force Claude's output into a predictable, scannable structure. No summaries, no prose padding — just the signal.

/pith debug

Debug

Structured diagnosis for errors, crashes, and unexpected behaviour.

Problem
Cause
Fix
Verify
/pith review

Code review

One line per issue. No summaries. Use for PRs, diffs, and file reviews.

Issue · file:line
Severity · suggestion
(repeat per issue)
/pith arch

Architecture

Technology choices, design decisions, system design questions.

Decision
Options table
Choice · Risks · Next
/pith plan

Planning

Feature planning, task breakdowns, sprint planning, implementation plans.

Goal
Steps
Risks · Done-when
/pith commit

Commit message

Conventional Commits format. Subject ≤50 chars. Reads staged diff automatically.

type(scope): subject
body — what + why
breaking changes
/pith tour

Guided tour

Interactive walkthrough of every Pith feature — hands-on, one step at a time, resumable.

Compression modes
Wiki system
Graph · Provenance

Everything

Every feature.
Every detail.

Pith is installed once, globally. It activates automatically in every Claude Code project — no per-project setup, no CLAUDE.md edits required.

01

Tool output compression

File reads return imports, signatures, and types — not every line. JSON outputs are serialised as TOON (~40% fewer tokens). Bash returns errors and a summary. Grep caps at 25 matches. Automatic, session-wide, always on.

02

Live context meter

Exact context window usage, mode, budget, and a full per-format savings breakdown — skeletons, bash/build, grep, TOON, web fetch, offload, output mode — each with a mini bar showing its share. Now includes an ASCII token flow diagram: baseline vs compressed vs output, showing exactly how much was intercepted and what arrived in context. Cost is split at the correct rate: tool compression at $3/1M, output mode savings at $15/1M. For a richer view, /pith report generates an interactive HTML dashboard.

03

Auto-compact at 70%

History is summarised automatically before the context window fills. Sessions run indefinitely. No more "context limit reached" mid-task.

04

Project wiki

Four page types — Decision, Concept, Entity, Synthesis — written and maintained as you work. Cross-linked, sourced, and queryable at any time.

05

Interactive knowledge graph

Force-directed D3.js graph of your entire wiki. Focus hover, pill labels, light/dark mode, zoom/pan, drag physics. Standalone HTML — zero dependencies.

06

YAML provenance

Every wiki page carries a frontmatter block linking claims back to raw source files, GitHub PRs, or session timestamps. Hallucinations become traceable.

07

Semantic lint

Detects contradictions between pages — not just broken links. Flags stale claims, orphan pages, missing source citations, and index mismatches.

08

Token budgets

Hard ceilings enforced by Pith — Claude won't exceed the limit without warning. Set with /budget 150, clear with /budget off.

09

Ingest pipeline

Feed any file to the wiki with /pith ingest. Pith extracts entities, concepts, and contradictions, shows a diff, and waits for your confirmation before writing anything.

10

Session persistence

Mode, wiki state, and budget are saved on session exit — per project. Next session offers one-line restore. /pith recall restores mid-session. /pith configure walks through all settings interactively.

11

In-Claude install

Install Pith without leaving Claude Code. /pith install locates the plugin, runs the installer, copies hooks, patches settings.json, registers slash commands, and verifies every step succeeded.

12

Clean uninstall

/pith uninstall removes hooks, slash commands, and all settings.json entries cleanly. Asks for confirmation first. Your project wikis and lifetime token history are preserved unless you explicitly request a full wipe.

13

Symbol extractor

Jump directly to any function, class, or method with /pith symbol <file> <name>. Returns the exact 30–50 lines of the definition — ~95% fewer tokens than reading the full file. Uses tree-sitter AST when available, regex fallback otherwise. Supports Python, TS/JS, Go, and more.

14

Tool result offloading

Tool outputs that exceed 300 tokens after compression are automatically written to ~/.pith/tmp/ and replaced with a 3-line pointer in context. Claude can read them on demand — nothing is lost, but large payloads never bloat the context window. Offloaded bytes tracked in /pith status.

17

jCodeMunch wiki ingest jCodeMunch · 2026

When you /pith ingest a code file, Pith runs symbols.py --list first to extract the structural skeleton — imports, signatures, class outlines — then passes that to a code-aware analysis prompt instead of raw source lines. Creates Module and Class wiki pages with exports, key methods, and architectural dependencies rather than generic concept pages.

16

Hindsight pruning Hindsight · 2026

Scans the session's tool call telemetry for stale context: files read multiple times (only the latest matters), large bash outputs from early-session setup steps, results that are now irrelevant. Reports total stale token cost and recommends /compact. Fires automatically once when context passes 60%.

15

Auto-escalation

As context fills, Pith automatically ratchets the output mode up — switching to LEAN at 50% and ULTRA at 70%. At 85%, a dynamic response ceiling is injected equal to 8% of remaining headroom. Claude's responses stop growing the context window unchecked. Toggle with /pith escalate on|off.

18

Cache-Lock Phase 9 · 2026

Session-start injection is hashed (MD5, 8 chars). If settings are identical to the previous session, a single compact summary line is emitted instead of the full rules block — saving ~300 tokens per session start. Dynamic values (token counts, timestamps) are deliberately excluded from the hash, ensuring cache hits are true stability signals, not coincidences.

19

Speculative Fetch + Session Report Phase 10 · 2026

When /pith symbol extracts a function, it automatically scans the body for calls to other functions defined in the same file and appends their signatures — eliminating a follow-up round-trip in ~60% of lookups. Pairs with /pith report, which generates a standalone HTML dashboard (Chart.js) showing token flow, per-bucket savings, cost breakdown, and a compression event timeline.


Installation

One command.
Global, permanent.

Pith installs into ~/.claude/hooks/. Claude Code loads hooks globally — no per-project setup, no CLAUDE.md edits, no environment variables.

Step 01

Run the installer

The curl command auto-clones Pith to ~/.local/share/pith and copies hooks into ~/.claude/hooks/pith/. Or: git clone https://github.com/abhisekjha/pith && bash pith/install.sh

Step 02

Reload Claude Code

Restart your Claude Code session. Pith hooks load automatically. No /enable command, no activation step.

Step 03

It's running

Every tool call is now intercepted and compressed. Run /pith status to confirm. LEAN mode is active by default.

In Claude

Install without leaving Claude

Already in a session? Run /pith install — Pith finds itself, runs the installer, verifies every step, and confirms. To remove: /pith uninstall.


Session Persistence

Pick up exactly
where you left off.

Every time a session ends, Pith saves your mode, wiki state, and token budget. The next session opens with a single non-blocking offer to restore — one line, before your first message.

session start
── New session ─────────────────────────────────────
◆ Pith Last session: mode=ULTRA, wiki=ON, budget=150 — restore? (yes/no)

── Mid-session restore ─────────────────────────────
$ /pith recall
Restored: mode=ULTRA, wiki=ON, budget=150

── Config wizard ───────────────────────────────────
$ /pith configure
Current: mode=LEAN, wiki=OFF, budget=none, auto-compact=ON
Output mode? [lean / precise / ultra / off]
> ultra
Mode → ULTRA
Enable wiki mode? [yes / no]
> yes
Wiki → ON
Token budget? [number or skip]
> 200
Budget → 200
Auto-compact at 70%? [yes / no]
> yes
Auto-compact → ON
Done — ULTRA · wiki=ON · budget=200 · auto-compact=ON
Automatic

Session end saves state

When a session closes, Pith writes the current mode, wiki state, and budget to a local state file. Nothing to configure — it happens on every session exit.

Non-blocking

One-line restore offer

On the first message of a new session, Pith offers to restore — a single line before your question. Say yes, no, or just ignore it and keep working. It never delays you.

/pith recall

Restore mid-session

Forgot to restore at session start? /pith recall reads the saved state at any point and re-applies mode, wiki, and budget — confirmed in one line.

/pith configure

Full config wizard

Shows current settings upfront. Walks through mode → wiki → budget → auto-compact, one question at a time. Each setting applies as you answer. Ends with a one-line summary.

Isolated

Per-project state

State is saved per working directory. Your auth-service session restores ULTRA + budget=150. Your docs project restores PRECISE + no budget. They never cross.

Visible

Always inspectable

The saved state file is plain JSON in your project root — human-readable, editable, committable to git if you want the whole team to share defaults.


Commands

Everything in one place.

Every command works inside any Claude Code session. Type it and go — no flags, no config files, no setup.

Compression modes
/pith leanDefault mode — drop articles, short synonyms, fragments OK
/pith preciseProfessional and tight — no filler, full sentences kept
/pith ultraMaximum compression — arrows →, tables over prose, abbreviate freely
/pith offBack to standard Claude output, no compression applied
Session control
/pith statusASCII token flow chart + health report — input, output, saved, context fill, cost
/pith reportGenerate interactive HTML dashboard — token flow bars, savings donut, cost table, event timelineNew
/pith hindsightIdentify stale tool results consuming context — shows token cost, recommends /compactNew
/pith escalateShow auto-escalation status — context fill thresholds and current modeNew
/pith escalate on|offEnable or disable SWEzze auto-escalation (LEAN at 50%, ULTRA at 70%)New
/pith budget <N>Set a hard token ceiling — enforced, not suggestedNew
/pith budget offClear the token budget ceilingNew
/pith focus <file>Focus context on a specific file for the current taskNew
/pith recallRestore last session's mode, wiki, and budget mid-session — one line confirm
/pith configureInteractive config wizard — mode → wiki → budget → auto-compact, one question at a time
/pith reset-cacheForce full session-start injection next session — clears the cache-lock hashNew
Structured output formats (one-shot, do not persist)
/pith debugProblem / Cause / Fix / Verify — 4 fields, no prose
/pith reviewCode review — one line per issue, no summaries
/pith archArchitecture decision — Options table / Choice / Risks / Next
/pith planImplementation plan — Goal / Steps / Risks / Done-when
/pith commitCommit message — Conventional Commits, subject ≤50 chars
Wiki system
/pith wiki "<question>"Query the wiki — synthesises answer with page citations
/pith ingest <file>Parse a file into wiki pages — code files use jCodeMunch structure-aware analysis
/pith lintSemantic contradiction detection, orphan pages, stale claims, broken index
Graph & visualisation
/pith-graph Generate wiki-graph.html — force-directed D3 network, opens in browser New
Onboarding & help
/pith helpFull command reference — every command grouped by category, in one shotNew
/pith tourInteractive guided tour of every Pith feature — resumable, skippable
/pith setupRun first-session wiki onboarding in any project
Code navigation
/pith symbol <file> <name>Extract exact source lines for a named function, class, or method (~95% token reduction)New
/pith symbol --list <file>List all top-level symbols in a file with line numbersNew
Integrations
/pith grepaiShow GrepAI status — whether it's installed and the wiki index is readyNew
/pith grepai skipDismiss the GrepAI install nudge permanently for this projectNew
/pith grepai enableRe-enable the GrepAI nudge if previously dismissedNew
Install & uninstall
/pith install Install Pith into Claude Code — copies hooks, patches settings.json, registers slash commands New
/pith uninstall Remove Pith cleanly — hooks, commands, and settings.json entries. Preserves wiki and token history. New

Install once.
Save forever.

One command. Works in every Claude Code project from that point on.

$ bash <(curl -s https://raw.githubusercontent.com/abhisekjha/pith/main/install.sh)
or
$ git clone https://github.com/abhisekjha/pith && bash pith/install.sh