add-compact

Add a /compact command to manually compact agent conversation context.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/stevengonsalvez/nanoclaw-standalone --skill add-compact-stevengonsalvez
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-compact
Source: https://github.com/stevengonsalvez/nanoclaw-standalone/tree/main/.claude/skills/add-compact
Command: npx skills add https://github.com/stevengonsalvez/nanoclaw-standalone --skill add-compact-stevengonsalvez

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adds a /compact command to manually compact conversation context, addressing context rot that accumulates in long-running agent sessions while preserving the current session.

Core Features & Use Cases

  • Manual context compaction: expose a reliable, admin-only slash command that triggers a fresh, summarized session context without a destructive reset.
  • Session continuity: the agent keeps the same session ID (with a new init message) so conversations resume smoothly after compaction.
  • Access control & auditing: only main-group or trusted senders can invoke compaction, with device-owner exceptions, and pre-compact archiving to preserve transcripts.

Quick Start

From the main group, issue the /compact command to start a manual context compaction.

Frequently Asked Questions about add-compact

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manually compact agent context to prevent context rot in long-running sessions?▼

You can manually compact agent context by issuing a /compact slash command, which triggers a fresh summarized session context without destructive reset. This prevents context rot while preserving session continuity.

Does context compaction destroy the current session ID?▼

No, context compaction preserves session continuity. The agent keeps the same session ID with a new init message, allowing conversations to resume smoothly after the context is compacted and summarized.

How do I enforce access control for context compaction commands?▼

You can enforce access control by implementing admin checks that restrict context compaction to main-group or trusted senders. The system includes device-owner exceptions and pre-compact archiving to preserve transcripts.

What is the difference between context compaction and a session reset?▼

Context compaction summarizes and condenses the existing context into a fresh state without losing session continuity, whereas a session reset is destructive. Compaction keeps the same session ID and preserves transcripts via archiving.

Can I use slash-command handling to intercept session commands for memory management?▼

Yes, you can intercept session commands by implementing slash-command handling and session command interception code changes. This allows you to manually trigger memory compaction through the SDK's /compact command.

When should I not use manual context compaction in my agent workflow?▼

Manual context compaction should not be used by non-admin users or untrusted senders, as it enforces strict access control. It is designed for main-group contexts and requires admin permissions to execute.