@giladbarnea/pi-custom-footer
Context, cache, cost, and loaded skills at a glance in Pi.
Package details
Install @giladbarnea/pi-custom-footer from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@giladbarnea/pi-custom-footer- Package
@giladbarnea/pi-custom-footer- Version
0.1.7- Published
- Oct 29, 2026
- Downloads
- 739/mo · 514/wk
- Author
- giladbarnea
- License
- MIT
- Types
- extension
- Size
- 42.9 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
last_updated: 2026-10-29T12-05
Custom Footer
Know how much context remains. See what each turn costs.
A Pi footer that puts your session’s context, cache usage, cost, and loaded skills around the editor.
pi install npm:@giladbarnea/pi-custom-footer
Above the editor, see your model, thinking level, session name and ID. Loaded skills get their own row, with token ages.
Below the editor, see:
- Context remaining at a glance: a color-graded gauge and used/window tokens.
- Cost across the conversation: cumulative cost and average cost per assistant turn.
- Cache behavior: session hit rate, latest hit or estimated miss, and reused/new token totals.
- Where you are: Git branch, dirty marker, directory, and other extensions’ status messages.
The layout follows your Pi theme. The header and the footer each take the fewest lines they can. To fit, they first drop labels, round readings, remove whitespace, and drop the branch icon. Only then does the footer hide facts: the reused/new split, the session hit rate, the token counts, and last the cost per turn.
Skills get one row for every eight terminal rows past the first six, with a minimum of one. A 21-row phone screen gets one row, a 27-row screen two, and a 34-row screen three. To fit, the row first drops token ages, then separators, then shortens long names in the middle (caut…ctor). Only then does it hide skills from the end, behind a +N count at the end of the last row.
Resize without rescanning the conversation. The header and footer share cached values. Session changes refresh them, including forks and compaction.
Skill age measures context-token growth since the first response after a skill load. A cache miss compares consecutive prompt sizes with reported reuse. Costs use the model’s reported pricing, including when you use a subscription.
Development
npm ci
npm test
npm run check
Tests cover rendered values, skill tracking, cache reuse, session changes, and forks. They make no model calls.