engineering / skill
Self Compact
A Pi coding-agent extension for context monitoring, agent-triggered compaction and handoff notes.
At a glance
- Purpose
- A Pi coding-agent extension for context monitoring, agent-triggered compaction and handoff notes.
- Runs in
- Local agent with shell
- Operating systems
- Not stated
- Needs
- Runtime: Node.js 24+ and just; Needs internet: Not stated; Needs accounts or API keys beyond your agent: Not stated
- Files and data
- Reads files: Yes; Writes files: Yes; Sends data to other services: Not stated
- Tool type
- Skill
- Delivery
- From GitHub
- Version
- Latest on the main branch
- Access
- Code on GitHub
- Compatibility
- According to the README, this is an extension for the Pi coding agent. It lists Pi v0.85.1, Node 24 or later and just as prerequisites, and it shows opening the repository in Claude Code (or Pi) to run /prime.
- External costs
- The repository is MIT-licensed and states no pricing. Live runs use the model provider whose key you put in .env, which may charge for usage. The README says the demo needs no API key and the unit and end-to-end suites have no API cost.
- Permissions
- The extension acts through Pi with the access you give it. The README's manual route globally installs the Pi npm package and asks you to create a project .env file containing your model-provider key. According to the README, the extension adds self_compact and view_context, supplies context guidance to model calls, saves a handoff note and requests session compaction. The README says the hard cutoff blocks tools other than self_compact.
- Usage terms
- MIT License, as stated in the repository. See its LICENSE file for the exact terms.
Code on GitHub
disler/self-compact-pi-agent
MITA Pi coding-agent extension that lets a long-running agent watch its own context and compact itself
Public GitHub data fetched · 0 days old
Skill folders in this repository (1)
Folders that contain a SKILL.md file, from GitHub's file list on .
What it does
Self Compact is an extension for the Pi coding agent. According to the README, it lets an agent monitor context usage and request compaction.The README describes default thresholds of 10% for a notice, 20% for a warning and 30% for a hard cutoff. The README says the notice provides guidance, the warning asks for a handoff note, and the hard cutoff blocks tools other than self_compact. The README says compaction uses an editable prompt and returns the agent's note_to_self as the next message.
The README lists editable prompt files, justfile recipes, a Pi documentation bundle, the self_compact and view_context tools, and the /self-compact-info and /self-compact-now commands. The README describes a footer gauge for context usage.
Who it is for
People who run autonomous, long-running coding agents in Pi.Example tasks
Run the demo to watch an agent move through notice, warning, forced and handoff with a scripted model and no API key.Change the notice, warning and hard cutoff thresholds for a launch with the extension's flags.
Edit the summary prompt that compaction uses, which the README says is yours to edit.
Check live context numbers and thresholds with /self-compact-info inside Pi.
Run the unit and end-to-end suites, which the README says have no API cost.