From harness-thrift
Cost-conscious long-session optimisation. Aggressive context-mode integration, prompt cache priming, automatic summariser hooks, end-of-session audit. Use /thrift to set up; /thrift summarise to manually trigger; /thrift audit for ad-hoc cost report. Designed for sessions ≥1 hour where context accumulation drives cost.
How this skill is triggered — by the user, by Claude, or both
Slash command
/harness-thrift:thriftThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Bootstraps cost-conscious patterns in the current project. Reads
lib/anthropic-summariser.mjslib/audit-renderer.mjslib/cache-prime.mjslib/config-loader.mjslib/cost-estimator.mjslib/metrics-collector.mjslib/settings-patcher.mjslib/summariser.mjslib/threshold-evaluator.mjsphases/0-preflight.mdphases/1-config.mdphases/2-instrument.mdphases/3-summariser.mdphases/4-cache-prime.mdphases/5-audit.mdtemplates/audit-report.md.hbstemplates/hooks/thrift-posttool-summariser-trigger.mjs.hbstemplates/hooks/thrift-pretool-bash-telemetry.mjs.hbstemplates/hooks/thrift-pretool-read-coerce.mjs.hbstemplates/hooks/thrift-sessionend-audit.mjs.hbsBootstraps cost-conscious patterns in the current project. Reads
.thrift.json (or seeds it), patches .claude/settings.local.json
with hooks, and starts a SessionStart cache-prime + PostToolUse
summariser-trigger loop.
/thrift # one-time setup; idempotent
/thrift summarise # manual summariser trigger
/thrift audit # write audit report now
/thrift --force # re-seed .thrift.json
--force — overwrite existing .thrift.json.--no-instrument — skip the settings.local.json patch (just seed config).--dry-run — print what would be patched; don't write.| Phase | File | Purpose |
|---|---|---|
| 0 | phases/0-preflight.md | detect context-mode + CC + existing hooks |
| 1 | phases/1-config.md | seed/load .thrift.json + compute thresholds |
| 2 | phases/2-instrument.md | patch .claude/settings.local.json (append-only) |
| 3 | phases/3-summariser.md | summarise current window (manual OR auto-triggered) |
| 4 | phases/4-cache-prime.md | warm prompt cache every warmInterval seconds |
| 5 | phases/5-audit.md | write end-of-session audit report |
.claude/settings.local.json. Use thrift- command-path sentinel
for safe revert..thrift.json cache.enabled = true./compact + reference summary path.
v2 will be programmatic once CC API surfaces..thrift-state.json rather than relying solely on
SessionEnd hook.lib/config-loader.mjs — loadConfig(path) → {ok, config | errors, warning?}.lib/threshold-evaluator.mjs — shouldFireSummariser({turnsSince, tokensSince, config}) → boolean.lib/cost-estimator.mjs — estimateBaseline({tokensIn, tokensOut, cacheHits, model}) → {actualCost, baselineCost, savedRatio}.lib/summariser.mjs — summarise({turns, preserveLast, preserveSpecPaths}) → {summaryText, droppedTurnCount, preservedRefs[]}.lib/settings-patcher.mjs — patchSettings({settingsPath, hooks, dryRun}) → diff applied..thrift.json invalid → abort with field-level errors..thrift-state.json; user can
retry via /thrift summarise.Print:
Thrift audit: <duration> session, <turns> turns, $<actual> actual vs $<baseline> baseline (saved <%>).
Report: <output-path>
docs/superpowers/specs/2026-05-18-harness-thrift-design.md — full designdocs/superpowers/research-notes/2026-05-18-cc-compact-api-spike.md — v1 vs v2 summariser decisiondocs/superpowers/research-notes/2026-05-18-hook-precedence-spike.md — append-only patch protocolProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub kim-song-jun/agent-skill --plugin harness-thrift