What is laya-compaction?
laya-compaction is a Claude Code mod by tristankenney that verbatim context compaction for Claude Code, scored by a local Laya model. It is listed under Context & memory and has no public popularity data yet.
| Type | Claude code mod |
|---|---|
| Author | tristankenney |
| Repository | tristankenney/laya-compaction |
| Popularity | no public popularity data yet |
| Category | Context & memory |
| Security | Review before installing (72/100) |
| Rank | #4,883 of 5,272 Claude Code mods; #455 in Context & memory |
| Last commit | 2026-09-28 |
| Hooks | 2 events |
| Sees | compaction |
| Draws on | nothing |
Is laya-compaction safe to install?
laya-compaction scores 72/100 on the MCPMods security check: Review before installing. Things to review: sends data over the network; reads environment variables. It passed 5 of 8 checks.
Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.
| Check | Result |
|---|---|
| Sends data over the network | Review |
| Starts no processes | Pass |
| Writes no files or config | Pass |
| Reads environment variables | Review |
| Only sees the events it hooks | Pass |
| Doesn't drive Claude | Pass |
| Passes claude plugin validate | Pass |
| No license detected | Note |
API calls in its code
| Call | What it means |
|---|---|
$.env.get | reads env vars |
$.http.fetch | network requests |
$.session.compact | drives Claude |
$.session.usage | |
$.settings.read | reads settings |
$.ui.log | draws interface |
$.ui.toast | draws interface |
How do I install laya-compaction?
- Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
claude --version
- Read its footprint. This lists every event it hooks and every API call it makes, without running it.
git clone https://github.com/tristankenney/laya-compaction claude plugin validate ./laya-compaction/.
- Install it. Run this in your terminal, then /reload-plugins in an open session.
claude plugin marketplace add tristankenney/laya-compaction && claude plugin install laya-compaction@laya-compaction
Or ask Claude to set it up
Paste this into Claude Code and it installs laya-compaction for you:
Install the "laya-compaction" Claude Code mod from https://github.com/tristankenney/laya-compaction. Run claude plugin validate on it first and show me what it can access before you enable it.